DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/ixgbe: configure EXVET_T register
@ 2021-04-29 18:23 Lingyu Liu
  2021-05-08  1:57 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Lingyu Liu @ 2021-04-29 18:23 UTC (permalink / raw)
  To: dev; +Cc: Lingyu Liu

According to X550 datasheet (section 8.2.1.2), when setting vlan tpid,
the register EXVET_T on X550 NICs also need to be configured.

Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_type.h |  1 +
 drivers/net/ixgbe/ixgbe_ethdev.c    | 33 +++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index bc927a3..8e22be7 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -151,6 +151,7 @@
 #define IXGBE_TCPTIMER		0x0004C
 #define IXGBE_CORESPARE		0x00600
 #define IXGBE_EXVET		0x05078
+#define IXGBE_EXVET_T		0x08224
 
 /* NVM Registers */
 #define IXGBE_EEC		0x10010
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index dcd7291..b9c89e8 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1925,6 +1925,39 @@ ixgbe_vlan_tpid_set(struct rte_eth_dev *dev,
 			/* Only the high 16-bits is valid */
 			IXGBE_WRITE_REG(hw, IXGBE_EXVET, (uint32_t)tpid <<
 					IXGBE_EXVET_VET_EXT_SHIFT);
+			/* For X550, additional register need be set*/
+			switch (hw->device_id) {
+			case IXGBE_DEV_ID_X550T:
+			case IXGBE_DEV_ID_X550T1:
+			case IXGBE_DEV_ID_X550EM_A_KR:
+			case IXGBE_DEV_ID_X550EM_A_KR_L:
+			case IXGBE_DEV_ID_X550EM_A_SFP_N:
+			case IXGBE_DEV_ID_X550EM_A_SGMII:
+			case IXGBE_DEV_ID_X550EM_A_SGMII_L:
+			case IXGBE_DEV_ID_X550EM_A_10G_T:
+			case IXGBE_DEV_ID_X550EM_A_QSFP:
+			case IXGBE_DEV_ID_X550EM_A_QSFP_N:
+			case IXGBE_DEV_ID_X550EM_A_SFP:
+			case IXGBE_DEV_ID_X550EM_A_1G_T:
+			case IXGBE_DEV_ID_X550EM_A_1G_T_L:
+			case IXGBE_DEV_ID_X550EM_X_KX4:
+			case IXGBE_DEV_ID_X550EM_X_KR:
+			case IXGBE_DEV_ID_X550EM_X_SFP:
+			case IXGBE_DEV_ID_X550EM_X_10G_T:
+			case IXGBE_DEV_ID_X550EM_X_1G_T:
+			case IXGBE_DEV_ID_X550EM_X_XFI:
+			case IXGBE_DEV_ID_X550_VF_HV:
+			case IXGBE_DEV_ID_X550_VF:
+			case IXGBE_DEV_ID_X550EM_A_VF:
+			case IXGBE_DEV_ID_X550EM_A_VF_HV:
+			case IXGBE_DEV_ID_X550EM_X_VF:
+			case IXGBE_DEV_ID_X550EM_X_VF_HV:
+				IXGBE_WRITE_REG(hw, IXGBE_EXVET_T, (uint32_t)tpid <<
+					IXGBE_EXVET_VET_EXT_SHIFT);
+				break;
+			default:
+				break;
+			}
 		} else {
 			reg = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
 			reg = (reg & (~IXGBE_VLNCTRL_VET)) | (uint32_t)tpid;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH v1] net/ixgbe: configure EXVET_T register
  2021-04-29 18:23 [dpdk-dev] [PATCH v1] net/ixgbe: configure EXVET_T register Lingyu Liu
@ 2021-05-08  1:57 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-05-08  1:57 UTC (permalink / raw)
  To: Liu, Lingyu, dev; +Cc: Liu, Lingyu



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Lingyu Liu
> Sent: Friday, April 30, 2021 2:24 AM
> To: dev@dpdk.org
> Cc: Liu, Lingyu <lingyu.liu@intel.com>
> Subject: [dpdk-dev] [PATCH v1] net/ixgbe: configure EXVET_T register
> 
> According to X550 datasheet (section 8.2.1.2), when setting vlan tpid, the
> register EXVET_T on X550 NICs also need to be configured.

This looks like a fix, should we add fixline and cc stable?

> 
> Signed-off-by: Lingyu Liu <lingyu.liu@intel.com>
> ---
>  drivers/net/ixgbe/base/ixgbe_type.h |  1 +
>  drivers/net/ixgbe/ixgbe_ethdev.c    | 33 +++++++++++++++++++++++++++++
>  2 files changed, 34 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/base/ixgbe_type.h
> b/drivers/net/ixgbe/base/ixgbe_type.h
> index bc927a3..8e22be7 100644
> --- a/drivers/net/ixgbe/base/ixgbe_type.h
> +++ b/drivers/net/ixgbe/base/ixgbe_type.h
> @@ -151,6 +151,7 @@
>  #define IXGBE_TCPTIMER		0x0004C
>  #define IXGBE_CORESPARE		0x00600
>  #define IXGBE_EXVET		0x05078
> +#define IXGBE_EXVET_T		0x08224
> 
>  /* NVM Registers */
>  #define IXGBE_EEC		0x10010
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index dcd7291..b9c89e8 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -1925,6 +1925,39 @@ ixgbe_vlan_tpid_set(struct rte_eth_dev *dev,
>  			/* Only the high 16-bits is valid */
>  			IXGBE_WRITE_REG(hw, IXGBE_EXVET, (uint32_t)tpid <<
>  					IXGBE_EXVET_VET_EXT_SHIFT);
> +			/* For X550, additional register need be set*/
> +			switch (hw->device_id) {
> +			case IXGBE_DEV_ID_X550T:
> +			case IXGBE_DEV_ID_X550T1:
> +			case IXGBE_DEV_ID_X550EM_A_KR:
> +			case IXGBE_DEV_ID_X550EM_A_KR_L:
> +			case IXGBE_DEV_ID_X550EM_A_SFP_N:
> +			case IXGBE_DEV_ID_X550EM_A_SGMII:
> +			case IXGBE_DEV_ID_X550EM_A_SGMII_L:
> +			case IXGBE_DEV_ID_X550EM_A_10G_T:
> +			case IXGBE_DEV_ID_X550EM_A_QSFP:
> +			case IXGBE_DEV_ID_X550EM_A_QSFP_N:
> +			case IXGBE_DEV_ID_X550EM_A_SFP:
> +			case IXGBE_DEV_ID_X550EM_A_1G_T:
> +			case IXGBE_DEV_ID_X550EM_A_1G_T_L:
> +			case IXGBE_DEV_ID_X550EM_X_KX4:
> +			case IXGBE_DEV_ID_X550EM_X_KR:
> +			case IXGBE_DEV_ID_X550EM_X_SFP:
> +			case IXGBE_DEV_ID_X550EM_X_10G_T:
> +			case IXGBE_DEV_ID_X550EM_X_1G_T:
> +			case IXGBE_DEV_ID_X550EM_X_XFI:
> +			case IXGBE_DEV_ID_X550_VF_HV:
> +			case IXGBE_DEV_ID_X550_VF:
> +			case IXGBE_DEV_ID_X550EM_A_VF:
> +			case IXGBE_DEV_ID_X550EM_A_VF_HV:
> +			case IXGBE_DEV_ID_X550EM_X_VF:
> +			case IXGBE_DEV_ID_X550EM_X_VF_HV:
> +				IXGBE_WRITE_REG(hw, IXGBE_EXVET_T, (uint32_t)tpid <<
> +					IXGBE_EXVET_VET_EXT_SHIFT);
> +				break;
> +			default:
> +				break;
> +			}
>  		} else {
>  			reg = IXGBE_READ_REG(hw, IXGBE_VLNCTRL);
>  			reg = (reg & (~IXGBE_VLNCTRL_VET)) | (uint32_t)tpid;
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-08  1:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 18:23 [dpdk-dev] [PATCH v1] net/ixgbe: configure EXVET_T register Lingyu Liu
2021-05-08  1:57 ` Zhang, Qi Z

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 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 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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