search for: virtio_xdp_redir

Displaying 12 results from an estimated 12 matches for "virtio_xdp_redir".

2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...; > > > I'd prefer this to be done on top unless it is a must. But I don't see > > > any advantage of introducing this, it's partial mapping of XDP 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. > > >...
2023 Apr 03
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...nothing. */ > + VIRTNET_XDP_RES_CONSUMED, > +}; I'd prefer this to be done on top unless it is a must. But I don't see any advantage of introducing this, it's partial mapping of XDP action and it needs to be extended when XDP action is extended. (And we've already had: VIRTIO_XDP_REDIR and VIRTIO_XDP_TX ...) > + > static void virtnet_rq_free_unused_buf(struct virtqueue *vq, void *buf); > static void virtnet_sq_free_unused_buf(struct virtqueue *vq, void *buf); > > @@ -789,6 +798,59 @@ static int virtnet_xdp_xmit(struct net_device *dev, > return ret; &g...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...; I'd prefer this to be done on top unless it is a must. But I don't see > > > > any advantage of introducing this, it's partial mapping of XDP 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...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...ne on top unless it is a must. But I don't see > > > > > > any advantage of introducing this, it's partial mapping of XDP 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. > > > > > &g...
2023 Mar 28
1
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...} *xdp_xmit |= VIRTIO_XDP_TX; - if (unlikely(xdp_page != page)) - put_page(page); rcu_read_unlock(); goto xdp_xmit; case XDP_REDIRECT: @@ -1307,8 +1309,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, if (err) goto err_xdp_frags; *xdp_xmit |= VIRTIO_XDP_REDIR; - if (unlikely(xdp_page != page)) - put_page(page); rcu_read_unlock(); goto xdp_xmit; default: @@ -1321,9 +1321,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, goto err_xdp_frags; } err_xdp_frags: - if (unlikely(xdp_page != page)) - __free_pages(xdp...
2023 Mar 28
1
[PATCH net-next 6/8] virtio_net: auto release xdp shinfo
...o drop; } *xdp_xmit |= VIRTIO_XDP_TX; @@ -850,7 +850,7 @@ static int virtnet_xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp, stats->xdp_redirects++; err = xdp_do_redirect(dev, xdp, xdp_prog); if (err) - return VIRTNET_XDP_RES_DROP; + goto drop; *xdp_xmit |= VIRTIO_XDP_REDIR; return VIRTNET_XDP_RES_CONSUMED; @@ -862,8 +862,12 @@ static int virtnet_xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp, trace_xdp_exception(dev, xdp_prog, act); fallthrough; case XDP_DROP: - return VIRTNET_XDP_RES_DROP; + goto drop; } + +drop: + put_xdp_frags(xdp); + r...
2023 Mar 31
1
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...goto xdp_xmit; > case XDP_REDIRECT: > @@ -1307,8 +1309,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > if (err) > goto err_xdp_frags; > *xdp_xmit |= VIRTIO_XDP_REDIR; > - if (unlikely(xdp_page != page)) > - put_page(page); > rcu_read_unlock(); > goto xdp_xmit; > default: > @@ -1321,9 +1321,6 @@ static struct sk_buff *receive_merg...
2023 Apr 03
1
[PATCH net-next 6/8] virtio_net: auto release xdp shinfo
...> @@ -850,7 +850,7 @@ static int virtnet_xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp, > stats->xdp_redirects++; > err = xdp_do_redirect(dev, xdp, xdp_prog); > if (err) > - return VIRTNET_XDP_RES_DROP; > + goto drop; > > *xdp_xmit |= VIRTIO_XDP_REDIR; > return VIRTNET_XDP_RES_CONSUMED; > @@ -862,8 +862,12 @@ static int virtnet_xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp, > trace_xdp_exception(dev, xdp_prog, act); > fallthrough; > case XDP_DROP: > - return VIRTNET_XDP_RES_DROP; > + goto drop;...
2023 Mar 28
8
[PATCH net-next 0/8] virtio_net: refactor xdp codes
Due to historical reasons, the implementation of XDP in virtio-net is relatively chaotic. For example, the processing of XDP actions has two copies of similar code. Such as page, xdp_page processing, etc. The purpose of this patch set is to refactor these code. Reduce the difficulty of subsequent maintenance. Subsequent developers will not introduce new bugs because of some complex logical
2023 Mar 23
1
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...t; - put_page(page); > > rcu_read_unlock(); > > goto xdp_xmit; > > case XDP_REDIRECT: > > @@ -1307,8 +1309,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > > if (err) > > goto err_xdp_frags; > > *xdp_xmit |= VIRTIO_XDP_REDIR; > > - if (unlikely(xdp_page != page)) > > - put_page(page); > > rcu_read_unlock(); > > goto xdp_xmit; > > default: > > @@ -1321,9 +1321,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > > goto err_xdp_frags; > &...
2023 Mar 22
9
[PATCH net-next 0/8] virtio_net: refactor xdp codes
Due to historical reasons, the implementation of XDP in virtio-net is relatively chaotic. For example, the processing of XDP actions has two copies of similar code. Such as page, xdp_page processing, etc. The purpose of this patch set is to refactor these code. Reduce the difficulty of subsequent maintenance. Subsequent developers will not introduce new bugs because of some complex logical
2023 Mar 15
10
[RFC net-next 0/8] virtio_net: refactor xdp codes
Due to historical reasons, the implementation of XDP in virtio-net is relatively chaotic. For example, the processing of XDP actions has two copies of similar code. Such as page, xdp_page processing, etc. The purpose of this patch set is to refactor these code. Reduce the difficulty of subsequent maintenance. Subsequent developers will not introduce new bugs because of some complex logical