[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5861350a-a0f6-9a74-e06d-4b7fd688e5e7@gmail.com>
Date: Tue, 25 Feb 2020 21:35:04 -0700
From: David Ahern <dsahern@...il.com>
To: Jason Wang <jasowang@...hat.com>,
David Ahern <dahern@...italocean.com>,
David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org,
"Michael S . Tsirkin" <mst@...hat.com>
Subject: Re: [PATCH RFC net-next] virtio_net: Relax queue requirement for
using XDP
On 2/25/20 8:52 PM, Jason Wang wrote:
>
> On 2020/2/26 上午11:34, David Ahern wrote:
>> On 2/25/20 8:29 PM, Jason Wang wrote:
>>> TAP uses spinlock for XDP_TX.
>> code reference? I can not find that.
>>
>
> In tun_xdp_xmit(), ptr_ring is synchronized through producer_lock.
>
thanks. I was confused by the tap comment when it is the tun code.
So you mean a spinlock around virtnet_xdp_xmit for XDP_TX:
+ if (!vi->can_do_xdp_tx)
+ spin_lock(&vi->xdp_tx_lock);
err = virtnet_xdp_xmit(dev, 1, &xdpf, 0);
+ if (!vi->can_do_xdp_tx)
+ spin_unlock(&vi->xdp_tx_lock);
Powered by blists - more mailing lists