From patchwork Wed Jan 10 09:17:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John Daley (johndale)" X-Patchwork-Id: 33400 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9161C1B1C7; Wed, 10 Jan 2018 10:18:23 +0100 (CET) Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by dpdk.org (Postfix) with ESMTP id 120DD1B1B1 for ; Wed, 10 Jan 2018 10:18:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1138; q=dns/txt; s=iport; t=1515575901; x=1516785501; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=y3OMfK3U5AnHxb476sL43l8p3I+PaKPb6VnFNKy9CJY=; b=RlysiN6dgJNWe/eBzWEuE8xEYczwT2NSX0IH8iH+GmrljBprgE3unZu3 dvOaXodyU5ssUfMXQKsV9Nu1AQlhk+Vzz13s79ZyJ/ie0n669Few07Q8V YOL6ikqlEBxE8MwSigoWkdVKXl+9vsYPFBdI40+70dIbQusf6rGmLJkrC U=; X-IronPort-AV: E=Sophos;i="5.46,339,1511827200"; d="scan'208";a="341247141" Received: from alln-core-1.cisco.com ([173.36.13.131]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2018 09:18:13 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id w0A9IDeV019278; Wed, 10 Jan 2018 09:18:13 GMT Received: by cisco.com (Postfix, from userid 392789) id 46D7320F2001; Wed, 10 Jan 2018 01:18:13 -0800 (PST) From: John Daley To: ferruh.yigit@intel.com Cc: dev@dpdk.org, John Daley Date: Wed, 10 Jan 2018 01:17:12 -0800 Message-Id: <20180110091712.32198-12-johndale@cisco.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180110091712.32198-1-johndale@cisco.com> References: <20180110091712.32198-1-johndale@cisco.com> Subject: [dpdk-dev] [PATCH] net/enic: remove a conditional from the Tx path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The VLAN insert flag and VLAN tag used in the VIC write descriptor can be set unconditionally. Signed-off-by: John Daley Reviewed-by: Hyong Youb Kim --- drivers/net/enic/enic_rxtx.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 08d600ffb..e2002e136 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -490,8 +490,8 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, } mss = 0; - vlan_id = 0; - vlan_tag_insert = 0; + vlan_id = tx_pkt->vlan_tci; + vlan_tag_insert = !!(ol_flags & PKT_TX_VLAN_PKT); bus_addr = (dma_addr_t) (tx_pkt->buf_iova + tx_pkt->data_off); @@ -531,10 +531,6 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, } } - if (ol_flags & PKT_TX_VLAN_PKT) { - vlan_tag_insert = 1; - vlan_id = tx_pkt->vlan_tci; - } wq_enet_desc_enc(&desc_tmp, bus_addr, data_len, mss, header_len, offload_mode, eop, eop, 0, vlan_tag_insert,