[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b28b4e93-50c2-6183-90ea-8d33902e8f21@intel.com>
Date: Fri, 11 Sep 2020 11:04:49 -0700
From: "Samudrala, Sridhar" <sridhar.samudrala@...el.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
Magnus Karlsson <magnus.karlsson@...il.com>
Cc: Maciej Fijalkowski <maciejromanfijalkowski@...il.com>,
Network Development <netdev@...r.kernel.org>,
intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
Björn Töpel <bjorn.topel@...el.com>,
"Karlsson, Magnus" <magnus.karlsson@...el.com>,
"Nambiar, Amritha" <amritha.nambiar@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next] i40e: allow VMDQs to be used
with AF_XDP zero-copy
On 9/11/2020 6:10 AM, Maciej Fijalkowski wrote:
> On Fri, Sep 11, 2020 at 02:29:50PM +0200, Magnus Karlsson wrote:
>> On Fri, Sep 11, 2020 at 2:11 PM Maciej Fijalkowski
>> <maciej.fijalkowski@...el.com> wrote:
>>>
>>> On Fri, Sep 11, 2020 at 02:08:26PM +0200, Magnus Karlsson wrote:
>>>> From: Magnus Karlsson <magnus.karlsson@...el.com>
>>>>
>>>> Allow VMDQs to be used with AF_XDP sockets in zero-copy mode. For some
>>>> reason, we only allowed main VSIs to be used with zero-copy, but
>>>> there is now reason to not allow VMDQs also.
>>>
>>> You meant 'to allow' I suppose. And what reason? :)
>>
>> Yes, sorry. Should be "not to allow". I was too trigger happy ;-).
>>
>> I have gotten requests from users that they want to use VMDQs in
>> conjunction with containers. Basically small slices of the i40e
>> portioned out as netdevs. Do you see any problems with using a VMDQ
>> iwth zero-copy?
Today VMDQ VSIs are used when a macvlan interface is created on top of a
i40e PF with l2-fwd-offload on. But i don't think we can create an
AF_XDP zerocopy socket on top of a macvlan netdev as it doesn't support
ndo_bpf or ndo_xdp_xxx apis or expose hw queues directly.
We need to expose VMDQ VSI as a native netdev that can expose its own
queues and support ndo_ ops in order to enable AF_XDP zerocopy on a
VMDQ. We talked about this approach at the recent netdev conference to
expose VMDQ VSI as a subdevice with its own netdev.
https://netdevconf.info/0x14/session.html?talk-hardware-acceleration-of-container-networking-interfaces
>
> No, I only meant to provide the actual reason (what you wrote above) in
> the commit message.
>
>>
>> /Magnus
>>
>>>>
>>>> Signed-off-by: Magnus Karlsson <magnus.karlsson@...el.com>
>>>> ---
>>>> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
>>>> index 2a1153d..ebe15ca 100644
>>>> --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
>>>> +++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
>>>> @@ -45,7 +45,7 @@ static int i40e_xsk_pool_enable(struct i40e_vsi *vsi,
>>>> bool if_running;
>>>> int err;
>>>>
>>>> - if (vsi->type != I40E_VSI_MAIN)
>>>> + if (!(vsi->type == I40E_VSI_MAIN || vsi->type == I40E_VSI_VMDQ2))
>>>> return -EINVAL;
>>>>
>>>> if (qid >= vsi->num_queue_pairs)
>>>> --
>>>> 2.7.4
>>>>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@...osl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
>
Powered by blists - more mailing lists