[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>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Fri, 22 May 2020 09:25:45 +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=RNCa96JLCRBSccjpUgMoGQO3IFUEWUejdi8Mpr4pH6I=; b=m31LmrFcP+Fwq7/GBOHQ7XP98g+06N6M3WL9fgX4RAsFGCiJ+mjmQM8E6LkJurGWKveHBU/kLmnCVI6VGwd4WzSkuaPcdmjmeXXO5RUD35UKEfOFNNGhoaGd4VYpVMRFx2yTxhsoeMoj+XzXEhdnt2L57agtwPC+0UfrT8cCFFbzMsdLTinPizyp/Zl+8dRG2o4EiVORAh6wm6M7rYlYI5sQW7nd9lKiam/WMRT8g/78rF+z8UTHsit9Bm2f+3SPZkdgT6foJlPEixICuXFjxT6Cn7EwqCi7Bng1TiygbFbmnHx2h+PflpMdDin1LoQwY4QNJqpP94FXDIr4xLkJAA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WlHBJayJwfAeqv+M3KTCfFgQ8HCkznBbda8IoTQIzcdqIrsIF5mT+GVuyf4iUhxPMrPDd3hbOqwqnYBkMuI/5Zq49sw1TBxO+AY1DU1NHuD/X5FlEhF3lfRm04iDC3533hlRHB2iYcHhwndHNL5IpR45vjykJMHq7xOOITDGQISNg2Ruo8WWHORibc1B5u91/sdTjWh3vk9joikilOsitwUvXDZfWbsUL+gzXGrflLdlJCoPYDDnVTLMrRah0moqTzYzHAZXEEhP9qppOgLmx+Yu5eY7dNTDmATVIgOrIyiOGNJlQMkyTTmWkf3a7p2UR85cdLC2iGQIJbdx+aPKzA==
  • 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>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>
  • Delivery-date: Fri, 22 May 2020 09:25:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWMBiqME7497+04E6+8Omw+GVY7aiz01kAgAACZQA=
  • Thread-topic: [PATCH v4] public/io/netif.h: add a new extra type for XDP

On 5/22/20 12:17 PM, Denis Kirjanov wrote:
> On 5/22/20, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx> wrote:
>> 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
> sure, but since the public header mixes it I've decided to use that word.
>
>
>>> + * 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?
> To state that we have a fixed size available.

Well, I would expect "reserved" or something in that case and "pad" in case

there are other fields following (see gso above).

But here I think "pad" is not required, just like mcast doesn't add any

>
>>> +            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®.