Thread (27 messages) 27 messages, 8 authors, 2019-06-21

Re: Resource management for ndo_xdp_xmit (Was: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames)

From: Toke Høiland-Jørgensen <hidden>
Date: 2019-02-09 16:56:56

Jakub Kicinski [off-list ref] writes:
On Sat, 9 Feb 2019 00:18:31 +0000, Saeed Mahameed wrote:
quoted
On Fri, 2019-02-08 at 15:17 -0800, Saeed Mahameed wrote:
quoted
On Thu, 2019-02-07 at 19:08 +0000, Saeed Mahameed wrote:  
quoted
So 
1) on dev_map_update_elem() we will call
dev->dev->ndo_bpf() to notify the device on the intention to
start/stop
redirect, and wait for it to create/destroy the HW resources
before/after actually updating the map
  
silly me, dev_map_update_elem must be atomic, we can't hook driver
resource allocation to it, it must come as a separate request
(syscall)
from user space to request to create XDP redirect resources.
  
Well, it is possible to render dev_map_update_elem non-atomic and fail
BPF programs who try to update it in the verifier
check_map_func_compatibility.

if you know of any case where devmap needs to be updated from the BPF
program please let me know.
Did we find a solution to non-map redirect?
See my other reply to Saeed :)

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help