diff mbox series

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

Message ID ed81f12a1e8804bb9fb207a2569d3086320869a7.1622222367.git.lorenzo@kernel.org (mailing list archive)
State RFC
Delegated to: BPF
Headers show
Series add partial rx hw csum offload support for XDP | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 6 maintainers not CCed: yhs@fb.com kpsingh@kernel.org hawk@kernel.org andrii@kernel.org kafai@fb.com songliubraving@fb.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/header_inline success Link

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);