diff mbox series

[RFC,bpf-next,4/4] net: xdp: update csum building the skb

Message ID ed81f12a1e8804bb9fb207a2569d3086320869a7.1622222367.git.lorenzo@kernel.org
State New
Headers show
Series add partial rx hw csum offload support for XDP | expand

Commit Message

Lorenzo Bianconi May 28, 2021, 5:43 p.m. UTC
update skb->ip_summed and skb->csum filed building the skb in
__xdp_build_skb_from_frame routine

Co-developed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 net/core/xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/core/xdp.c b/net/core/xdp.c
index 725d20f1b100..aadcbbc438c3 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -555,10 +555,10 @@  struct sk_buff *__xdp_build_skb_from_frame(struct xdp_frame *xdpf,
 	skb->protocol = eth_type_trans(skb, dev);
 
 	/* Optional SKB info, currently missing:
-	 * - HW checksum info		(skb->ip_summed)
 	 * - HW RX hash			(skb_set_hash)
 	 * - RX ring dev queue index	(skb_record_rx_queue)
 	 */
+	xdp_frame_get_csum(xdpf, skb);
 
 	/* Until page_pool get SKB return path, release DMA here */
 	xdp_release_frame(xdpf);