search for: xdp_pass

Displaying 20 results from an estimated 100 matches for "xdp_pass".

Did you mean: xdp_page
2016 Dec 23
1
[PATCH net 4/9] virtio-net: correctly handle XDP_PASS for linearized packets
On 16-12-23 06:37 AM, Jason Wang wrote: > When XDP_PASS were determined for linearized packets, we try to get > new buffers in the virtqueue and build skbs from them. This is wrong, > we should create skbs based on existed buffers instead. Fixing them by > creating skb based on xdp_page. > > With this patch "ping 192.168.100.4 -s 39...
2016 Dec 23
1
[PATCH net 4/9] virtio-net: correctly handle XDP_PASS for linearized packets
On 16-12-23 06:37 AM, Jason Wang wrote: > When XDP_PASS were determined for linearized packets, we try to get > new buffers in the virtqueue and build skbs from them. This is wrong, > we should create skbs based on existed buffers instead. Fixing them by > creating skb based on xdp_page. > > With this patch "ping 192.168.100.4 -s 39...
2016 Dec 23
0
[PATCH net 4/9] virtio-net: correctly handle XDP_PASS for linearized packets
When XDP_PASS were determined for linearized packets, we try to get new buffers in the virtqueue and build skbs from them. This is wrong, we should create skbs based on existed buffers instead. Fixing them by creating skb based on xdp_page. With this patch "ping 192.168.100.4 -s 3900 -M do" works for...
2016 Dec 23
0
[PATCH net 5/9] virtio-net: unbreak csumed packets for XDP_PASS
We drop csumed packet when do XDP for packets. This breaks XDP_PASS when GUEST_CSUM is supported. Fix this by allowing csum flag to be set. With this patch, simple TCP works for XDP_PASS. Cc: John Fastabend <john.r.fastabend at intel.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insert...
2018 Sep 06
2
[PATCH net-next 06/11] tuntap: split out XDP logic
...RECT: > + *err = xdp_do_redirect(tun->dev, xdp, xdp_prog); > + xdp_do_flush_map(); > + if (*err) > + break; > + goto out; > + case XDP_TX: > + *err = tun_xdp_tx(tun->dev, xdp); > + if (*err < 0) > + break; > + *err = 0; > + goto out; > + case XDP_PASS: > + goto out; Do we need goto? why not just return? > + default: > + bpf_warn_invalid_xdp_action(act); > + /* fall through */ > + case XDP_ABORTED: > + trace_xdp_exception(tun->dev, xdp_prog, act); > + /* fall through */ > + case XDP_DROP: > + break; > + }...
2018 Sep 06
2
[PATCH net-next 06/11] tuntap: split out XDP logic
...RECT: > + *err = xdp_do_redirect(tun->dev, xdp, xdp_prog); > + xdp_do_flush_map(); > + if (*err) > + break; > + goto out; > + case XDP_TX: > + *err = tun_xdp_tx(tun->dev, xdp); > + if (*err < 0) > + break; > + *err = 0; > + goto out; > + case XDP_PASS: > + goto out; Do we need goto? why not just return? > + default: > + bpf_warn_invalid_xdp_action(act); > + /* fall through */ > + case XDP_ABORTED: > + trace_xdp_exception(tun->dev, xdp_prog, act); > + /* fall through */ > + case XDP_DROP: > + break; > + }...
2016 Dec 23
21
[PATCH net 0/9] several fixups for virtio-net XDP
Merry Xmas and a Happy New year to all: This series tries to fixes several issues for virtio-net XDP which could be categorized into several parts: - fix several issues during XDP linearizing - allow csumed packet to work for XDP_PASS - make EWMA rxbuf size estimation works for XDP - forbid XDP when GUEST_UFO is support - remove big packet XDP support - add XDP support or small buffer Please see individual patches for details. Thanks Jason Wang (9): virtio-net: remove the warning before XDP linearizing virtio-net: correct...
2016 Dec 23
21
[PATCH net 0/9] several fixups for virtio-net XDP
Merry Xmas and a Happy New year to all: This series tries to fixes several issues for virtio-net XDP which could be categorized into several parts: - fix several issues during XDP linearizing - allow csumed packet to work for XDP_PASS - make EWMA rxbuf size estimation works for XDP - forbid XDP when GUEST_UFO is support - remove big packet XDP support - add XDP support or small buffer Please see individual patches for details. Thanks Jason Wang (9): virtio-net: remove the warning before XDP linearizing virtio-net: correct...
2020 May 06
4
performance bug in virtio net xdp
So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen to have before we attach XDP, will mostly stay around. The fix is probably to update ewma unconditionally. -- MST
2020 May 06
4
performance bug in virtio net xdp
So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen to have before we attach XDP, will mostly stay around. The fix is probably to update ewma unconditionally. -- MST
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...DP action > > > and it needs to be extended when XDP action is extended. (And we've > > > already had: VIRTIO_XDP_REDIR and VIRTIO_XDP_TX ...) > > > > No, these are the three states of buffer after XDP processing. > > > > * PASS: goto make skb > > XDP_PASS goes for this. > > > * DROP: we should release buffer > > XDP_DROP and error conditions go with this. > > > * CUNSUMED: xdp prog used the buffer, we do nothing > > XDP_TX/XDP_REDIRECTION goes for this. > > So t virtnet_xdp_handler() just maps XDP ACTION plus the...
2018 Sep 07
1
[PATCH net-next 06/11] tuntap: split out XDP logic
On Fri, Sep 07, 2018 at 11:29:34AM +0800, Jason Wang wrote: > > > + if (act != XDP_PASS) > > > + goto out; > > likely? > > It depends on the XDP program, so I tend not to use it. Point is XDP_PASS is already slow. -- MST
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...ds to be extended when XDP action is extended. (And we've > > > > already had: VIRTIO_XDP_REDIR and VIRTIO_XDP_TX ...) > > > > > > No, these are the three states of buffer after XDP processing. > > > > > > * PASS: goto make skb > > > > XDP_PASS goes for this. > > > > > * DROP: we should release buffer > > > > XDP_DROP and error conditions go with this. > > > > > * CUNSUMED: xdp prog used the buffer, we do nothing > > > > XDP_TX/XDP_REDIRECTION goes for this. > > > > So t vi...
2018 Sep 07
0
[PATCH net-next 06/11] tuntap: split out XDP logic
...;dev, xdp, xdp_prog); >> + xdp_do_flush_map(); >> + if (*err) >> + break; >> + goto out; >> + case XDP_TX: >> + *err = tun_xdp_tx(tun->dev, xdp); >> + if (*err < 0) >> + break; >> + *err = 0; >> + goto out; >> + case XDP_PASS: >> + goto out; > Do we need goto? why not just return? I don't see any difference. > >> + default: >> + bpf_warn_invalid_xdp_action(act); >> + /* fall through */ >> + case XDP_ABORTED: >> + trace_xdp_exception(tun->dev, xdp_prog, act); >&gt...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...; > > > > already had: VIRTIO_XDP_REDIR and VIRTIO_XDP_TX ...) > > > > > > > > > > No, these are the three states of buffer after XDP processing. > > > > > > > > > > * PASS: goto make skb > > > > > > > > XDP_PASS goes for this. > > > > > > > > > * DROP: we should release buffer > > > > > > > > XDP_DROP and error conditions go with this. > > > > > > > > > * CUNSUMED: xdp prog used the buffer, we do nothing > > > > >...
2023 Apr 03
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...struct virtnet_rq_stats *stats) > +{ > + struct xdp_frame *xdpf; > + int err; > + u32 act; > + > + act = bpf_prog_run_xdp(xdp_prog, xdp); > + stats->xdp_packets++; > + > + switch (act) { > + case XDP_PASS: > + return VIRTNET_XDP_RES_PASS; > + > + case XDP_TX: > + stats->xdp_tx++; > + xdpf = xdp_convert_buff_to_frame(xdp); > + if (unlikely(!xdpf)) > + return VIRTNET_XDP_RES_DROP; > + > +...
2017 Jul 03
2
[PATCH net] virtio-net: unbreak cusmed packet for small buffer XDP
...n Wang wrote: > > > > > > > On 2017?06?28? 10:02, Michael S. Tsirkin wrote: > > > > > > > > On Wed, Jun 28, 2017 at 09:54:03AM +0800, Jason Wang wrote: > > > > > > > > > We should allow csumed packet for small buffer, otherwise XDP_PASS > > > > > > > > > won't work correctly. > > > > > > > > > > > > > > > > > > Fixes commit bb91accf2733 ("virtio-net: XDP support for small buffers") > > > > > > > > > Signed-off...
2017 Jul 03
2
[PATCH net] virtio-net: unbreak cusmed packet for small buffer XDP
...n Wang wrote: > > > > > > > On 2017?06?28? 10:02, Michael S. Tsirkin wrote: > > > > > > > > On Wed, Jun 28, 2017 at 09:54:03AM +0800, Jason Wang wrote: > > > > > > > > > We should allow csumed packet for small buffer, otherwise XDP_PASS > > > > > > > > > won't work correctly. > > > > > > > > > > > > > > > > > > Fixes commit bb91accf2733 ("virtio-net: XDP support for small buffers") > > > > > > > > > Signed-off...
2016 Dec 23
0
[PATCH net 0/9] several fixups for virtio-net XDP
...16-12-23 06:37 AM, Jason Wang wrote: > Merry Xmas and a Happy New year to all: > > This series tries to fixes several issues for virtio-net XDP which > could be categorized into several parts: > > - fix several issues during XDP linearizing > - allow csumed packet to work for XDP_PASS > - make EWMA rxbuf size estimation works for XDP > - forbid XDP when GUEST_UFO is support > - remove big packet XDP support > - add XDP support or small buffer > > Please see individual patches for details. > > Thanks > > Jason Wang (9): > virtio-net: remove t...
2017 Sep 19
0
[PATCH net-next 2/3] virtio-net: add packet len average only when needed during XDP
There's no need to add packet len average in the case of XDP_PASS since it will be done soon after skb is created. Cc: John Fastabend <john.fastabend at gmail.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio_net.c b/driver...