DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
	"xiao.w.wang@intel.com" <xiao.w.wang@intel.com>
Subject: [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency
Date: Mon, 18 Mar 2019 09:56:37 +0000	[thread overview]
Message-ID: <20190318095613.28167-1-ndabilpuram@marvell.com> (raw)
Message-ID: <20190318095637.cmv4Fluozof3DKvKrmlKdi1GkfWDPc0t5KyIGt6fVT8@z> (raw)
In-Reply-To: <20190219064840.12046-1-ndabilpuram@marvell.com>

Tx VLAN & QinQ insert enable need not depend on
Rx VLAN offload ETH_VLAN_EXTEND_OFFLOAD.

Fixes: 6a34f91690d0 ("app/testpmd: fix error message when setting Tx VLAN")
Cc: xiao.w.wang@intel.com

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
v2:
* Split change into two seperate patches as suggested.

 app/test-pmd/config.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index b9e5dd9..f800503 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2955,7 +2955,6 @@ vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type, uint16_t tp_id)
 void
 tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2963,11 +2962,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) {
-		printf("Error, as QinQ has been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) == 0) {
 		printf("Error: vlan insert is not supported by port %d\n",
@@ -2983,7 +2977,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 void
 tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 {
-	int vlan_offload;
 	struct rte_eth_dev_info dev_info;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -2993,11 +2986,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	if (vlan_id_is_invalid(vlan_id_outer))
 		return;
 
-	vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
-	if (!(vlan_offload & ETH_VLAN_EXTEND_OFFLOAD)) {
-		printf("Error, as QinQ hasn't been enabled.\n");
-		return;
-	}
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if ((dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) == 0) {
 		printf("Error: qinq insert not supported by port %d\n",
-- 
2.8.4


  parent reply	other threads:[~2019-03-18  9:56 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  6:48 [dpdk-dev] [PATCH] app/testpmd: fix tx vlan and qinq insert enable Nithin Kumar Dabilpuram
2019-03-01 16:29 ` Ferruh Yigit
2019-03-18  9:56 ` Nithin Kumar Dabilpuram [this message]
2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Nithin Kumar Dabilpuram
2019-03-18  9:56   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: fix tx qinq insert enable Nithin Kumar Dabilpuram
2019-03-18  9:56     ` Nithin Kumar Dabilpuram
2019-03-26 17:40     ` Iremonger, Bernard
2019-03-26 17:40       ` Iremonger, Bernard
2019-03-21 17:11   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: fix tx vlan and qinq dependency Ferruh Yigit
2019-03-21 17:11     ` Ferruh Yigit
2019-03-26 17:33     ` Iremonger, Bernard
2019-03-26 17:33       ` Iremonger, Bernard
2019-03-27  9:52       ` Iremonger, Bernard
2019-03-27  9:52         ` Iremonger, Bernard
2019-03-31 18:58     ` [dpdk-dev] [EXT] " Nithin Kumar Dabilpuram
2019-03-31 18:58       ` Nithin Kumar Dabilpuram
2019-04-01 19:10       ` Ferruh Yigit
2019-04-01 19:10         ` Ferruh Yigit
2019-04-02  2:35         ` Wang, Xiao W
2019-04-02  2:35           ` Wang, Xiao W
2019-04-05  7:36 ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Nithin Kumar Dabilpuram
2019-04-05  7:36   ` Nithin Kumar Dabilpuram
2019-04-05  7:36   ` [dpdk-dev] [PATCH v3 2/2] app/testpmd: fix Tx QinQ set Nithin Kumar Dabilpuram
2019-04-05  7:36     ` Nithin Kumar Dabilpuram
2019-04-05 13:36   ` [dpdk-dev] [PATCH v3 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
2019-04-05 13:36     ` Ferruh Yigit
2019-04-05 12:04 ` [dpdk-dev] [PATCH v4 " Nithin Dabilpuram
2019-04-05 12:04   ` Nithin Dabilpuram
2019-04-05 12:04   ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix Tx QinQ set Nithin Dabilpuram
2019-04-05 12:04     ` Nithin Dabilpuram
2019-04-05 12:06   ` [dpdk-dev] [PATCH v4 1/2] app/testpmd: fix Tx VLAN and QinQ dependency Ferruh Yigit
2019-04-05 12:06     ` Ferruh Yigit
2019-04-05 13:10     ` Nithin Kumar D
2019-04-05 13:10       ` Nithin Kumar D
2019-04-05 13:32       ` Ferruh Yigit
2019-04-05 13:32         ` Ferruh Yigit

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=20190318095613.28167-1-ndabilpuram@marvell.com \
    --to=ndabilpuram@marvell.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiao.w.wang@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).