On 4/25/19 12:54 PM, Maciej Fijalkowski wrote: >> >> virtio_net hits this because of: >> xdp_prog = rcu_dereference(rq->xdp_prog); >> >> in its ndo_xdp_xmit. Scanning ndo_xdp_xmit for other nics does not show >> this same check. Is it really required? If so, why don't other drivers >> do it? > > That was my initial thought as well. Can't we just check that > vi->xdp_queue_pairs was set in virtnet_xdp_xmit? It is being done just before > assigning the XDP prog pointers for rqs. Haven't looked at veth though. >
or change the dereference to just rcu_access_pointer. The xdp_prog is not needed; it only checks if set.