[dpdk-dev] nfp: fix how tx checksum is advertised to firmware

Message ID 1457004367-18993-1-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Alejandro Lucero March 3, 2016, 11:26 a.m. UTC
  Even with tx checksum offload available, do not set the flag by default.

Fixes: b812daadad0d (\"nfp: add Rx and Tx\")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Bruce Richardson March 11, 2016, 3:50 p.m. UTC | #1
On Thu, Mar 03, 2016 at 11:26:07AM +0000, Alejandro Lucero wrote:
> Even with tx checksum offload available, do not set the flag by default.
> 
> Fixes: b812daadad0d (\"nfp: add Rx and Tx\")
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
> ---
Applied to dpdk-next-net/rel_16_04

/Bruce
  

Patch

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 0e3705e..6078e9f 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1543,7 +1543,8 @@  nfp_net_tx_cksum(struct nfp_net_txq *txq, struct nfp_net_tx_desc *txd,
 		break;
 	}
 
-	txd->flags |= PCIE_DESC_TX_CSUM;
+	if (ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK))
+		txd->flags |= PCIE_DESC_TX_CSUM;
 }
 
 /* nfp_net_rx_cksum - set mbuf checksum flags based on RX descriptor flags */