search for: xdp_room

Displaying 9 results from an estimated 9 matches for "xdp_room".

2023 Mar 28
1
[PATCH net-next 2/8] virtio_net: mergeable xdp: introduce mergeable_xdp_prepare
...int *num_buf, + struct page **page, + int offset, + unsigned int *len, + struct virtio_net_hdr_mrg_rxbuf *hdr) +{ + unsigned int truesize = mergeable_ctx_to_truesize(ctx); + unsigned int headroom = mergeable_ctx_to_headroom(ctx); + struct page *xdp_page; + unsigned int xdp_room; + + /* Transient failure which in theory could occur if + * in-flight packets from before XDP was enabled reach + * the receive path after XDP is loaded. + */ + if (unlikely(hdr->hdr.gso_type)) + return NULL; + + /* Now XDP core assumes frag size is PAGE_SIZE, but buffers + * with headroom...
2023 Mar 31
1
[PATCH net-next 2/8] virtio_net: mergeable xdp: introduce mergeable_xdp_prepare
...**page, > + int offset, > + unsigned int *len, > + struct virtio_net_hdr_mrg_rxbuf *hdr) > +{ > + unsigned int truesize = mergeable_ctx_to_truesize(ctx); > + unsigned int headroom = mergeable_ctx_to_headroom(ctx); > + struct page *xdp_page; > + unsigned int xdp_room; > + > + /* Transient failure which in theory could occur if > + * in-flight packets from before XDP was enabled reach > + * the receive path after XDP is loaded. > + */ > + if (unlikely(hdr->hdr.gso_type)) > + return NULL; > + > + /* Now XDP core assumes frag size...
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 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 Mar 28
1
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...b/drivers/net/virtio_net.c @@ -1245,6 +1245,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, if (!xdp_page) goto err_xdp; offset = VIRTIO_XDP_HEADROOM; + + put_page(page); + page = xdp_page; } else if (unlikely(headroom < virtnet_get_headroom(vi))) { xdp_room = SKB_DATA_ALIGN(VIRTIO_XDP_HEADROOM + sizeof(struct skb_shared_info)); @@ -1259,6 +1262,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, page_address(page) + offset, len); frame_sz = PAGE_SIZE; offset = VIRTIO_XDP_HEADROOM; + + put_page(page); +...
2023 Mar 31
1
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...goto err_xdp; > offset = VIRTIO_XDP_HEADROOM; > + > + put_page(page); > + page = xdp_page; > } else if (unlikely(headroom < virtnet_get_headroom(vi))) { > xdp_room = SKB_DATA_ALIGN(VIRTIO_XDP_HEADROOM + > sizeof(struct skb_shared_info)); > @@ -1259,6 +1262,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > page_address(page) + offset, len); >...
2023 Mar 23
1
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...m_buf, page, ...); This does look better. In fact, we already have vq reset, we can load XDP based on vq reset. In this way, we can run without xdp_linearize_page. > > > > + page = xdp_page; > > } else if (unlikely(headroom < virtnet_get_headroom(vi))) { > > xdp_room = SKB_DATA_ALIGN(VIRTIO_XDP_HEADROOM + > > sizeof(struct skb_shared_info)); > > @@ -1259,6 +1262,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > > page_address(page) + offset, len); > > frame_sz = PAGE_SIZE; > > offse...
2023 Mar 23
0
[PATCH net-next 1/8] virtio_net: mergeable xdp: put old page immediately
...we can run without xdp_linearize_page. > > For compatibility, it is still needed, right? Yes > > > > > > >> > >> > >>> + page = xdp_page; > >>> } else if (unlikely(headroom < virtnet_get_headroom(vi))) { > >>> xdp_room = SKB_DATA_ALIGN(VIRTIO_XDP_HEADROOM + > >>> sizeof(struct skb_shared_info)); > >>> @@ -1259,6 +1262,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, > >>> page_address(page) + offset, len); > >>> frame_sz...