DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
From: Xiao Zhang <xiao.zhang@intel.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, haiyue.wang@intel.com,
	qi.z.zhang@intel.com, Xiao Zhang <xiao.zhang@intel.com>
Subject: [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16
Date: Fri, 19 Jul 2019 01:13:41 +0800
Message-ID: <1563470021-16325-1-git-send-email-xiao.zhang@intel.com> (raw)

FW4.16 of SFP X722 does not support setting TPID by set_switch_config
adminq operation, for firmware version less than 4.16 TPID is set by
register instead. Follow the same path with new firmware version for
SFP X722 to make it work.

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b9fc45..bf6dc2b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
 	}
 
 	/* 802.1ad frames ability is added in NVM API 1.7*/
-	if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) {
+	/* FW4.16 for SFP x722 does not support set_switch_config option */
+	if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) &&
+		hw->device_id != I40E_DEV_ID_SFP_X722) {
 		if (qinq) {
 			if (vlan_type == ETH_VLAN_TYPE_OUTER)
 				hw->first_tag = rte_cpu_to_le_16(tpid);
-- 
2.7.4


             reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 17:13 Xiao Zhang [this message]
2019-07-18  8:23 ` Wang, Haiyue
2019-07-18  8:25 ` Wang, Haiyue
2019-07-18  8:32   ` Zhang, Xiao
2019-07-18 22:51 ` [dpdk-dev] [v2] " Xiao Zhang
2019-07-19  0:56   ` Zhang, Qi Z
2019-07-19  1:02     ` Wang, Haiyue
2019-07-19  1:14       ` Zhang, Xiao
2019-07-19 10:26   ` [dpdk-dev] [v3] " Xiao Zhang
2019-07-19 10:59     ` [dpdk-dev] [v4] " Xiao Zhang
2019-07-19  2:17       ` Wang, Haiyue
2019-07-19  5:26         ` Zhang, Qi Z
2019-07-19 15:30       ` Stillwell Jr, Paul M
2019-07-19 18:17         ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-07-20  0:53           ` Zhang, Xiao

Reply instructions:

You may reply publically 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=1563470021-16325-1-git-send-email-xiao.zhang@intel.com \
    --to=xiao.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=qi.z.zhang@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

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox