DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qiming Yang <qiming.yang@intel.com>
To: dev@dpdk.org
Cc: jingjing.wu@intel.com, ferruh.yigit@intel.com,
	Qiming Yang <qiming.yang@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/i40e: remove redundant vlan insert code
Date: Mon, 20 Feb 2017 13:32:53 +0800	[thread overview]
Message-ID: <1487568773-25790-1-git-send-email-qiming.yang@intel.com> (raw)
In-Reply-To: <1486689994-37746-1-git-send-email-qiming.yang@intel.com>

This patch removed useless tx_flags and related macros
in vlan insertion.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
v2 changes:
* removed I40E_TX_FLAG_INSERT_VLAN and modified the commit log.
---
 drivers/net/i40e/i40e_rxtx.c | 8 +-------
 drivers/net/i40e/i40e_rxtx.h | 3 ---
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 48429cc..2085f4a 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -1034,7 +1034,6 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint16_t nb_tx;
 	uint32_t td_cmd;
 	uint32_t td_offset;
-	uint32_t tx_flags;
 	uint32_t td_tag;
 	uint64_t ol_flags;
 	uint16_t nb_used;
@@ -1058,7 +1057,6 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		td_cmd = 0;
 		td_tag = 0;
 		td_offset = 0;
-		tx_flags = 0;
 
 		tx_pkt = *tx_pkts++;
 		RTE_MBUF_PREFETCH_TO_FREE(txe->mbuf);
@@ -1105,12 +1103,8 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 		/* Descriptor based VLAN insertion */
 		if (ol_flags & (PKT_TX_VLAN_PKT | PKT_TX_QINQ_PKT)) {
-			tx_flags |= tx_pkt->vlan_tci <<
-				I40E_TX_FLAG_L2TAG1_SHIFT;
-			tx_flags |= I40E_TX_FLAG_INSERT_VLAN;
 			td_cmd |= I40E_TX_DESC_CMD_IL2TAG1;
-			td_tag = (tx_flags & I40E_TX_FLAG_L2TAG1_MASK) >>
-						I40E_TX_FLAG_L2TAG1_SHIFT;
+			td_tag = tx_pkt->vlan_tci;
 		}
 
 		/* Always enable CRC offload insertion */
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 9df8a56..c3ab6e4 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -38,10 +38,7 @@
  * 32 bits tx flags, high 16 bits for L2TAG1 (VLAN),
  * low 16 bits for others.
  */
-#define I40E_TX_FLAG_L2TAG1_SHIFT 16
-#define I40E_TX_FLAG_L2TAG1_MASK  0xffff0000
 #define I40E_TX_FLAG_CSUM         ((uint32_t)(1 << 0))
-#define I40E_TX_FLAG_INSERT_VLAN  ((uint32_t)(1 << 1))
 #define I40E_TX_FLAG_TSYN         ((uint32_t)(1 << 2))
 
 #define RTE_PMD_I40E_RX_MAX_BURST 32
-- 
2.7.4

  parent reply	other threads:[~2017-02-20  5:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10  1:26 [dpdk-dev] [PATCH] net/i40e: fix vlan insert code redundance Qiming Yang
2017-02-10 10:25 ` Ferruh Yigit
2017-02-10 11:21   ` Yang, Qiming
2017-02-13 10:09     ` [dpdk-dev] FW: " Yang, Qiming
2017-02-13 10:14       ` Ferruh Yigit
2017-02-20  5:32 ` Qiming Yang [this message]
2017-02-20 12:55   ` [dpdk-dev] [PATCH v2] net/i40e: remove redundant vlan insert code Ferruh Yigit
2017-02-20  5:43 ` Qiming Yang

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=1487568773-25790-1-git-send-email-qiming.yang@intel.com \
    --to=qiming.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    /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).