[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] public/io/netif.h: add a new extra type for XDP


  • To: Denis Kirjanov <kda@xxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Fri, 22 May 2020 09:09:15 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gUkDOpjBQ1w1/LQCwIUaJ8oAJ006qfQg6XBe7g8l6ws=; b=OMM7Dr6KDYUCQdWLgVmmwdjsNQTWWi1/q6tgZbPGKC1L4X9DRdCDwyEAaiezPHUAmoTEz1JavDnBVVKgDcM7gOrWTyifnCWebwJhH6CLAgpMVAdQfCAEfVl3wPRTepfQ8+V5d6o9hMOLJc9WArAHtJFupFr8IvrjKzENWmQC+PtXPZJEkB/CR+ndYM59rGJ84JW5YOe9EqaO15NJQeZrbL0oWauP2SU9ozdJO6Pb9eMbxaiOGzK9IEm5LWbzGiIeWXApUCNay5pf3GN2WO08CXzIgfgIp6DAV5i1QriCA6LH/uzaax3I7osS6qrG1LlPzOPMuxeYJ233nllgvFVx1A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XcZi4PqRHOmUL0cH9zEctVXORqZyRB3eQTjh0+9upJhspmodIyPuPvuEecNUyRO7jM5cKGNQnVcd7vMzUqTwA/pK/48bAWyU9C6b/cmJuPu04qUKTe8REf5n1qeQojrwe06RDtst4KyxtF4IgLx5FColn48CQqi+8wwXyHCWwFyMSiOq2p+wY8Q2N7zDpW3zc81gpb6DVL3NojykdiKermokTwluZMnVjV6lms9c6pD1BiFR2vUPRy3WWj2RRsBw1fZNoZQ0u3d5GnxcmUC3PuIRhFx9OVKDlrMpTylBfg90ZrUS5PQ/S8PtdUs7CC+VtxKweneZ/dSsVuzuwsgocg==
  • Authentication-results: linux-powerpc.org; dkim=none (message not signed) header.d=none; linux-powerpc.org; dmarc=none action=none header.from=epam.com;
  • Cc: "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>
  • Delivery-date: Fri, 22 May 2020 09:09:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWMBiqME7497+04E6+8Omw+GVY7Q==
  • Thread-topic: [PATCH v4] public/io/netif.h: add a new extra type for XDP

On 5/18/20 6:04 PM, Denis Kirjanov wrote:
> The patch adds a new extra type to be able to diffirentiate
> between RX responses on xen-netfront side with the adjusted offset
> required for XDP processing.
>
> The offset value from a guest is passed via xenstore.
>
> Signed-off-by: Denis Kirjanov <denis.kirjanov@xxxxxxxx>
> ---
> v4:
> - updated the commit and documenation
>
> v3:
> - updated the commit message
>
> v2:
> - added documentation
> - fixed padding for netif_extra_info
> ---
> ---
>   xen/include/public/io/netif.h | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h
> index 9fcf91a..a92bf04 100644
> --- a/xen/include/public/io/netif.h
> +++ b/xen/include/public/io/netif.h
> @@ -161,6 +161,17 @@
>    */
>   
>   /*
> + * "xdp-headroom" is used to request that extra space is added
> + * for XDP processing.  The value is measured in bytes and passed by

not sure that we should use word "bytes" here as the rest of the 
protocol (mostly)

talks about octets. It is somewhat mixed here, no strong opinion

> + * the frontend to be consistent between both ends.
> + * If the value is greater than zero that means that
> + * an RX response is going to be passed to an XDP program for processing.
> + *
> + * "feature-xdp-headroom" is set to "1" by the netback side like other 
> features
> + * so a guest can check if an XDP program can be processed.
> + */
> +
> +/*
>    * Control ring
>    * ============
>    *
> @@ -985,7 +996,8 @@ typedef struct netif_tx_request netif_tx_request_t;
>   #define XEN_NETIF_EXTRA_TYPE_MCAST_ADD (2)  /* u.mcast */
>   #define XEN_NETIF_EXTRA_TYPE_MCAST_DEL (3)  /* u.mcast */
>   #define XEN_NETIF_EXTRA_TYPE_HASH      (4)  /* u.hash */
> -#define XEN_NETIF_EXTRA_TYPE_MAX       (5)
> +#define XEN_NETIF_EXTRA_TYPE_XDP       (5)  /* u.xdp */
> +#define XEN_NETIF_EXTRA_TYPE_MAX       (6)
>   
>   /* netif_extra_info_t flags. */
>   #define _XEN_NETIF_EXTRA_FLAG_MORE (0)
> @@ -1018,6 +1030,10 @@ struct netif_extra_info {
>               uint8_t algorithm;
>               uint8_t value[4];
>           } hash;
> +        struct {
> +            uint16_t headroom;
why do you need "pad" field here?
> +            uint16_t pad[2]
> +        } xdp;
>           uint16_t pad[3];
>       } u;
>   };

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.