Displaying 11 results from an estimated 11 matches for "build_skb_from_xdp_buff".
2023 Mar 30
1
[PATCH net-next 7/8] virtio_net: introduce receive_mergeable_xdp()
...amp;xdp, data, len, frame_sz,
> + &num_buf, &xdp_frags_truesz, stats);
> + if (unlikely(err))
> + goto err_xdp;
> +
> + act = virtnet_xdp_handler(xdp_prog, &xdp, dev, xdp_xmit, stats);
> +
> + switch (act) {
> + case VIRTNET_XDP_RES_PASS:
> + head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
> + if (unlikely(!head_skb))
> + goto err_xdp;
> + return head_skb;
> +
> + case VIRTNET_XDP_RES_CONSUMED:
> + return NULL;
> +
> + case VIRTNET_XDP_RES_DROP:
> + break;
> + }
> +
> +err_xdp:
> + put_page(page);
>...
2023 Mar 28
1
[PATCH net-next 6/8] virtio_net: auto release xdp shinfo
...p;xdp_frags_truesz, stats);
if (unlikely(err))
- goto err_xdp_frags;
+ goto err_xdp;
act = virtnet_xdp_handler(xdp_prog, &xdp, dev, xdp_xmit, stats);
@@ -1369,7 +1377,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
case VIRTNET_XDP_RES_PASS:
head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
if (unlikely(!head_skb))
- goto err_xdp_frags;
+ goto err_xdp;
rcu_read_unlock();
return head_skb;
@@ -1379,11 +1387,8 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
goto xdp_xmit;
case VIRTNET_XDP_RES_DROP:
-...
2023 Apr 03
1
[PATCH net-next 6/8] virtio_net: auto release xdp shinfo
...rr))
> - goto err_xdp_frags;
> + goto err_xdp;
>
> act = virtnet_xdp_handler(xdp_prog, &xdp, dev, xdp_xmit, stats);
>
> @@ -1369,7 +1377,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
> case VIRTNET_XDP_RES_PASS:
> head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
> if (unlikely(!head_skb))
> - goto err_xdp_frags;
> + goto err_xdp;
>
> rcu_read_unlock();
> return head_skb;
> @@ -1379,11 +1387,8 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
> goto...
2023 Mar 22
1
[PATCH net-next 7/8] virtio_net: introduce receive_mergeable_xdp()
...r = virtnet_build_xdp_buff_mrg(dev, vi, rq, &xdp, data, len, frame_sz,
+ &num_buf, &xdp_frags_truesz, stats);
+ if (unlikely(err))
+ goto err_xdp;
+
+ act = virtnet_xdp_handler(xdp_prog, &xdp, dev, xdp_xmit, stats);
+
+ switch (act) {
+ case VIRTNET_XDP_RES_PASS:
+ head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
+ if (unlikely(!head_skb))
+ goto err_xdp;
+ return head_skb;
+
+ case VIRTNET_XDP_RES_CONSUMED:
+ return NULL;
+
+ case VIRTNET_XDP_RES_DROP:
+ break;
+ }
+
+err_xdp:
+ put_page(page);
+ mergeable_buf_free(rq, num_buf, dev, stats);
+
+ stats->xdp_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 Apr 03
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...gt; - stats->xdp_packets++;
> + act = virtnet_xdp_handler(xdp_prog, &xdp, dev, xdp_xmit, stats);
>
> switch (act) {
> - case XDP_PASS:
> + case VIRTNET_XDP_RES_PASS:
> head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
> if (unlikely(!head_skb))
> goto err_xdp_frags;
>
> rcu_read_unlock();
> return head_skb;
> - case XDP_TX:
> -...
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
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...tnet_xdp_handler(xdp_prog, &xdp, dev, xdp_xmit, stats);
> > > >
> > > > switch (act) {
> > > > - case XDP_PASS:
> > > > + case VIRTNET_XDP_RES_PASS:
> > > > head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
> > > > if (unlikely(!head_skb))
> > > > goto err_xdp_frags;
> > > >
> > > > rcu_read_unlock();
> > > >...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
..., &xdp, dev, xdp_xmit, stats);
> > > > >
> > > > > switch (act) {
> > > > > - case XDP_PASS:
> > > > > + case VIRTNET_XDP_RES_PASS:
> > > > > head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
> > > > > if (unlikely(!head_skb))
> > > > > goto err_xdp_frags;
> > > > >
> > > > > rcu_read_unlock();
> > > &g...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...> > > >
> > > > > > > switch (act) {
> > > > > > > - case XDP_PASS:
> > > > > > > + case VIRTNET_XDP_RES_PASS:
> > > > > > > head_skb = build_skb_from_xdp_buff(dev, vi, &xdp, xdp_frags_truesz);
> > > > > > > if (unlikely(!head_skb))
> > > > > > > goto err_xdp_frags;
> > > > > > >
> > > > > > >...