search for: xdp_frags_truesz

Displaying 14 results from an estimated 14 matches for "xdp_frags_truesz".

2023 Mar 30
1
[PATCH net-next 7/8] virtio_net: introduce receive_mergeable_xdp()
...it, > + struct virtnet_rq_stats *stats) > +{ > + struct virtio_net_hdr_mrg_rxbuf *hdr = buf; > + int num_buf = virtio16_to_cpu(vi->vdev, hdr->num_buffers); > + struct page *page = virt_to_head_page(buf); > + int offset = buf - page_address(page); > + unsigned int xdp_frags_truesz = 0; > + struct sk_buff *head_skb; > + unsigned int frame_sz; > + struct xdp_buff xdp; > + void *data; > + u32 act; > + int err; > + > + data = mergeable_xdp_prepare(vi, rq, xdp_prog, ctx, &frame_sz, &num_buf, &page, > + offset, &len, hdr); > +...
2023 Mar 28
1
[PATCH net-next 6/8] virtio_net: auto release xdp shinfo
...dev->name, len, (unsigned long)(truesize - room)); dev->stats.rx_length_errors++; - return -EINVAL; + goto err; } frag = &shinfo->frags[shinfo->nr_frags++]; @@ -1233,6 +1237,10 @@ static int virtnet_build_xdp_buff_mrg(struct net_device *dev, *xdp_frags_truesize = xdp_frags_truesz; return 0; + +err: + put_xdp_frags(xdp); + return -EINVAL; } static void *mergeable_xdp_prepare(struct virtnet_info *vi, @@ -1361,7 +1369,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, err = virtnet_build_xdp_buff_mrg(dev, vi, rq, &xdp, data, len, frame_sz,...
2023 Apr 03
1
[PATCH net-next 6/8] virtio_net: auto release xdp shinfo
...); > dev->stats.rx_length_errors++; > - return -EINVAL; > + goto err; > } > > frag = &shinfo->frags[shinfo->nr_frags++]; > @@ -1233,6 +1237,10 @@ static int virtnet_build_xdp_buff_mrg(struct net_device *dev, > > *xdp_frags_truesize = xdp_frags_truesz; > return 0; > + > +err: > + put_xdp_frags(xdp); > + return -EINVAL; > } > > static void *mergeable_xdp_prepare(struct virtnet_info *vi, > @@ -1361,7 +1369,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > err = virtnet_build_xdp_buf...
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 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 22
1
[PATCH net-next 7/8] virtio_net: introduce receive_mergeable_xdp()
...en, + unsigned int *xdp_xmit, + struct virtnet_rq_stats *stats) +{ + struct virtio_net_hdr_mrg_rxbuf *hdr = buf; + int num_buf = virtio16_to_cpu(vi->vdev, hdr->num_buffers); + struct page *page = virt_to_head_page(buf); + int offset = buf - page_address(page); + unsigned int xdp_frags_truesz = 0; + struct sk_buff *head_skb; + unsigned int frame_sz; + struct xdp_buff xdp; + void *data; + u32 act; + int err; + + data = mergeable_xdp_prepare(vi, rq, xdp_prog, ctx, &frame_sz, &num_buf, &page, + offset, &len, hdr); + if (!data) + goto err_xdp; + + err = virtnet_buil...
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 03
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...DP_DROP: > + > + case VIRTNET_XDP_RES_DROP: > goto err_xdp; > } > } > @@ -1277,7 +1313,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > if (xdp_prog) { > unsigned int xdp_frags_truesz = 0; > struct skb_shared_info *shinfo; > - struct xdp_frame *xdpf; > struct page *xdp_page; > struct xdp_buff xdp; > void *data; > @@ -1294,49 +1329,22 @@ static struct sk_buff *receive_mergeable(struct...
2023 Mar 28
1
[PATCH net-next 4/8] virtio_net: separate the logic of freeing xdp shinfo
...xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp, struct net_device *dev, unsigned int *xdp_xmit, @@ -1312,12 +1327,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, xdp_prog = rcu_dereference(rq->xdp_prog); if (xdp_prog) { unsigned int xdp_frags_truesz = 0; - struct skb_shared_info *shinfo; - struct page *xdp_page; struct xdp_buff xdp; void *data; u32 act; - int i; data = mergeable_xdp_prepare(vi, rq, xdp_prog, ctx, &frame_sz, &num_buf, &page, offset, &len, hdr); @@ -1348,14 +1360,7 @@ static struct sk_...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...goto err_xdp; > > > > } > > > > } > > > > @@ -1277,7 +1313,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > > > > if (xdp_prog) { > > > > unsigned int xdp_frags_truesz = 0; > > > > struct skb_shared_info *shinfo; > > > > - struct xdp_frame *xdpf; > > > > struct page *xdp_page; > > > > struct xdp_buff xdp; > > > > void *data; &g...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...r_xdp; > > > > > } > > > > > } > > > > > @@ -1277,7 +1313,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > > > > > if (xdp_prog) { > > > > > unsigned int xdp_frags_truesz = 0; > > > > > struct skb_shared_info *shinfo; > > > > > - struct xdp_frame *xdpf; > > > > > struct page *xdp_page; > > > > > struct xdp_buff xdp; > > > > >...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...} > > > > > > > } > > > > > > > @@ -1277,7 +1313,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > > > > > > > if (xdp_prog) { > > > > > > > unsigned int xdp_frags_truesz = 0; > > > > > > > struct skb_shared_info *shinfo; > > > > > > > - struct xdp_frame *xdpf; > > > > > > > struct page *xdp_page; > > > > > > > struct xdp_...
2023 Mar 28
1
[PATCH net-next 2/8] virtio_net: mergeable xdp: introduce mergeable_xdp_prepare
...len); - frame_sz = PAGE_SIZE; - offset = VIRTIO_XDP_HEADROOM; - - put_page(page); - page = xdp_page; - } else { - xdp_page = page; - } - - data = page_address(xdp_page) + offset; err = virtnet_build_xdp_buff_mrg(dev, vi, rq, &xdp, data, len, frame_sz, &num_buf, &xdp_frags_truesz, stats); if (unlikely(err)) -- 2.32.0.3.g01195cf9f
2023 Mar 31
1
[PATCH net-next 2/8] virtio_net: mergeable xdp: introduce mergeable_xdp_prepare
..._XDP_HEADROOM; > - > - put_page(page); > - page = xdp_page; > - } else { > - xdp_page = page; > - } > - > - data = page_address(xdp_page) + offset; > err = virtnet_build_xdp_buff_mrg(dev, vi, rq, &xdp, data, len, frame_sz, > &num_buf, &xdp_frags_truesz, stats); > if (unlikely(err))