[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MN2PR21MB1375147709E57BA25F661505CA0F0@MN2PR21MB1375.namprd21.prod.outlook.com>
Date: Thu, 23 Jan 2020 17:44:52 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "sashal@...nel.org" <sashal@...nel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"olaf@...fle.de" <olaf@...fle.de>, vkuznets <vkuznets@...hat.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V3,net-next, 1/2] hv_netvsc: Add XDP support
> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Thursday, January 23, 2020 12:30 PM
> To: Haiyang Zhang <haiyangz@...rosoft.com>
> Cc: sashal@...nel.org; linux-hyperv@...r.kernel.org; netdev@...r.kernel.org;
> KY Srinivasan <kys@...rosoft.com>; Stephen Hemminger
> <sthemmin@...rosoft.com>; olaf@...fle.de; vkuznets
> <vkuznets@...hat.com>; davem@...emloft.net; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH V3,net-next, 1/2] hv_netvsc: Add XDP support
>
> On Thu, 23 Jan 2020 17:14:06 +0000, Haiyang Zhang wrote:
> > > > Changes:
> > > > v3: Minor code and comment updates.
> > > > v2: Added XDP_TX support. Addressed review comments.
> > >
> > > How does the locking of the TX path work? You seem to be just
> > > calling the normal xmit method, but you don't hold the xmit queue
> > > lock, so the stack can start xmit concurrently, no?
> >
> > The netvsc and vmbus can handle concurrent transmits, except the msd
> > (Multi-Send Data) field which can only be used by one queue.
> >
> > I already added a new flag to netvsc_send(), so packets from XDP_TX
> > won't use the msd.
>
> I see, there's a few non-atomic counters there, but maybe that's not a big deal.
Yes, those error counters are used less frequently, and not necessary to be precise.
> What frees the skb if the ring is full, and netvsc_send_pkt() returns -EAGAIN?
> Nothing checks the return value from netvsc_xdp_xmit().
Good catch! I will add skb free when -EAGAIN is returned for XDP_TX.
I will update the patch.
Thanks,
- Haiyang
Powered by blists - more mailing lists