Thread (28 messages) flat view 28 messages, 4 authors, 2020-02-25

Re: [PATCH bpf-next v4] virtio_net: add XDP meta data support

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2020-02-05 05:34:04
Also in: bpf, lkml

On Tue, Feb 04, 2020 at 04:16:55PM +0900, Yuya Kusakabe wrote:
quoted hunk ↗ jump to hunk
@@ -852,8 +868,9 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
 			 * adjustments. Note other cases do not build an
 			 * skb and avoid using offset
 			 */
-			offset = xdp.data -
-					page_address(xdp_page) - vi->hdr_len;
+			metasize = xdp.data - xdp.data_meta;
+			offset = xdp.data - page_address(xdp_page) -
+				 vi->hdr_len - metasize;
 
 			/* recalculate len if xdp.data or xdp.data_end were
 			 * adjusted
Tricky to get one's head around.
Can you pls update the comment above to document the new math?

-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help