DPDK patches and discussions
 help / color / mirror / Atom feed
From: Paul Emmerich <emmericp@net.in.tum.de>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/3] i40e: use crc checksum disable flag
Date: Mon, 15 Feb 2016 17:55:25 +0100	[thread overview]
Message-ID: <1455555325-20046-4-git-send-email-emmericp@net.in.tum.de> (raw)
In-Reply-To: <1455555325-20046-1-git-send-email-emmericp@net.in.tum.de>

Signed-off-by: Paul Emmerich <emmericp@net.in.tum.de>
---
 drivers/net/i40e/i40e_rxtx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 40cffc1..52f7955 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -799,6 +799,11 @@ i40e_txd_enable_checksum(uint64_t ol_flags,
 		*td_offset |= (tx_offload.l2_len >> 1)
 			<< I40E_TX_DESC_LENGTH_MACLEN_SHIFT;
 
+	/* Enable L2 checksum offload */
+	if (!(ol_flags & PKT_TX_NO_CRC_CSUM))
+		*td_cmd |= I40E_TX_DESC_CMD_ICRC;
+
+
 	/* Enable L3 checksum offloads */
 	if (ol_flags & PKT_TX_IP_CKSUM) {
 		*td_cmd |= I40E_TX_DESC_CMD_IIPT_IPV4_CSUM;
@@ -1613,9 +1618,6 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 						I40E_TX_FLAG_L2TAG1_SHIFT;
 		}
 
-		/* Always enable CRC offload insertion */
-		td_cmd |= I40E_TX_DESC_CMD_ICRC;
-
 		/* Enable checksum offloading */
 		cd_tunneling_params = 0;
 		if (ol_flags & I40E_TX_CKSUM_OFFLOAD_MASK) {
-- 
1.9.1

  parent reply	other threads:[~2016-02-15 16:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 16:55 [dpdk-dev] [PATCH 0/3] add flag to disable CRC checksum offloading Paul Emmerich
2016-02-15 16:55 ` [dpdk-dev] [PATCH 1/3] add tx crc disable flag Paul Emmerich
2016-03-04  9:18   ` Olivier MATZ
2016-02-15 16:55 ` [dpdk-dev] [PATCH 2/3] ixgbe: use crc checksum " Paul Emmerich
2016-02-15 16:55 ` Paul Emmerich [this message]
2016-03-02 21:15 ` [dpdk-dev] [PATCH 0/3] add flag to disable CRC checksum offloading Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455555325-20046-4-git-send-email-emmericp@net.in.tum.de \
    --to=emmericp@net.in.tum.de \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).