DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/enic: set L4 checksum flags for IPv6 packets
@ 2018-01-23  1:05 John Daley
  2018-01-23  1:05 ` [dpdk-dev] [PATCH] net/enic: fix segfault due to static max number of queues John Daley
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: John Daley @ 2018-01-23  1:05 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Hyong Youb Kim

From: Hyong Youb Kim <hyonkim@cisco.com>

enic_cq_rx_to_pkt_flags() currently sets checksum good/bad flags only
for IPv4.  The hardware actually validates the TCP/UDP checksum of
IPv6 packets too. Set PKT_RX_L4_CKSUM_{GOOD,BAD} accordingly.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index 98902caa0..8157697a0 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -185,14 +185,14 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
 	}
 
 	/* checksum flags */
-	if (mbuf->packet_type & RTE_PTYPE_L3_IPV4) {
+	if (mbuf->packet_type & (RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L3_IPV6)) {
 		if (!enic_cq_rx_desc_csum_not_calc(cqrd)) {
 			uint32_t l4_flags;
 			l4_flags = mbuf->packet_type & RTE_PTYPE_L4_MASK;
 
 			if (enic_cq_rx_desc_ipv4_csum_ok(cqrd))
 				pkt_flags |= PKT_RX_IP_CKSUM_GOOD;
-			else
+			else if (mbuf->packet_type & RTE_PTYPE_L3_IPV4)
 				pkt_flags |= PKT_RX_IP_CKSUM_BAD;
 
 			if (l4_flags == RTE_PTYPE_L4_UDP ||
-- 
2.12.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-24 17:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23  1:05 [dpdk-dev] [PATCH] net/enic: set L4 checksum flags for IPv6 packets John Daley
2018-01-23  1:05 ` [dpdk-dev] [PATCH] net/enic: fix segfault due to static max number of queues John Daley
2018-01-24 17:19   ` Ferruh Yigit
2018-01-23  1:05 ` [dpdk-dev] [PATCH] net/enic: add a Tx prepare handler John Daley
2018-01-24 17:20   ` Ferruh Yigit
2018-01-24 17:18 ` [dpdk-dev] [PATCH] net/enic: set L4 checksum flags for IPv6 packets Ferruh Yigit
2018-01-24 17:30   ` Hyong Youb Kim
2018-01-24 17:45     ` Ferruh Yigit
2018-01-24 17:48       ` Hyong Youb Kim
2018-01-24 17:48 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).