DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [DPDK] net/ice: set vlan tpid is not supported by ice
@ 2019-10-31 10:29 taox.zhu
  2019-11-04  3:30 ` Yang, Qiming
  2019-11-08  6:55 ` Ye Xiaolong
  0 siblings, 2 replies; 3+ messages in thread
From: taox.zhu @ 2019-10-31 10:29 UTC (permalink / raw)
  To: qiming.yang, wenzhuo.lu; +Cc: dev, Zhu Tao

From: Zhu Tao <taox.zhu@intel.com>

Set vlan tpid is not supported by ice hardware. Delete driver code
that doesn't work.

Signed-off-by: Zhu Tao <taox.zhu@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 54 ------------------------------------
 1 file changed, 54 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index d74675842..ec0234091 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -69,9 +69,6 @@ static int ice_dev_set_link_down(struct rte_eth_dev *dev);
 
 static int ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
 static int ice_vlan_offload_set(struct rte_eth_dev *dev, int mask);
-static int ice_vlan_tpid_set(struct rte_eth_dev *dev,
-			     enum rte_vlan_type vlan_type,
-			     uint16_t tpid);
 static int ice_rss_reta_update(struct rte_eth_dev *dev,
 			       struct rte_eth_rss_reta_entry64 *reta_conf,
 			       uint16_t reta_size);
@@ -156,7 +153,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
 	.mac_addr_remove              = ice_macaddr_remove,
 	.vlan_filter_set              = ice_vlan_filter_set,
 	.vlan_offload_set             = ice_vlan_offload_set,
-	.vlan_tpid_set                = ice_vlan_tpid_set,
 	.reta_update                  = ice_rss_reta_update,
 	.reta_query                   = ice_rss_reta_query,
 	.rss_hash_update              = ice_rss_hash_update,
@@ -3340,56 +3336,6 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	return 0;
 }
 
-static int
-ice_vlan_tpid_set(struct rte_eth_dev *dev,
-		  enum rte_vlan_type vlan_type,
-		  uint16_t tpid)
-{
-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint64_t reg_r = 0, reg_w = 0;
-	uint16_t reg_id = 0;
-	int ret = 0;
-	int qinq = dev->data->dev_conf.rxmode.offloads &
-		   DEV_RX_OFFLOAD_VLAN_EXTEND;
-
-	switch (vlan_type) {
-	case ETH_VLAN_TYPE_OUTER:
-		if (qinq)
-			reg_id = 3;
-		else
-			reg_id = 5;
-		break;
-	case ETH_VLAN_TYPE_INNER:
-		if (qinq) {
-			reg_id = 5;
-		} else {
-			PMD_DRV_LOG(ERR,
-				    "Unsupported vlan type in single vlan.");
-			return -EINVAL;
-		}
-		break;
-	default:
-		PMD_DRV_LOG(ERR, "Unsupported vlan type %d", vlan_type);
-		return -EINVAL;
-	}
-	reg_r = ICE_READ_REG(hw, GL_SWT_L2TAGCTRL(reg_id));
-	PMD_DRV_LOG(DEBUG, "Debug read from ICE GL_SWT_L2TAGCTRL[%d]: "
-		    "0x%08"PRIx64"", reg_id, reg_r);
-
-	reg_w = reg_r & (~(GL_SWT_L2TAGCTRL_ETHERTYPE_M));
-	reg_w |= ((uint64_t)tpid << GL_SWT_L2TAGCTRL_ETHERTYPE_S);
-	if (reg_r == reg_w) {
-		PMD_DRV_LOG(DEBUG, "No need to write");
-		return 0;
-	}
-
-	ICE_WRITE_REG(hw, GL_SWT_L2TAGCTRL(reg_id), reg_w);
-	PMD_DRV_LOG(DEBUG, "Debug write 0x%08"PRIx64" to "
-		    "ICE GL_SWT_L2TAGCTRL[%d]", reg_w, reg_id);
-
-	return ret;
-}
-
 static int
 ice_get_rss_lut(struct ice_vsi *vsi, uint8_t *lut, uint16_t lut_size)
 {
-- 
2.17.1


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

* Re: [dpdk-dev] [DPDK] net/ice: set vlan tpid is not supported by ice
  2019-10-31 10:29 [dpdk-dev] [DPDK] net/ice: set vlan tpid is not supported by ice taox.zhu
@ 2019-11-04  3:30 ` Yang, Qiming
  2019-11-08  6:55 ` Ye Xiaolong
  1 sibling, 0 replies; 3+ messages in thread
From: Yang, Qiming @ 2019-11-04  3:30 UTC (permalink / raw)
  To: Zhu, TaoX, Lu, Wenzhuo; +Cc: dev

Hi,

> -----Original Message-----
> From: Zhu, TaoX
> Sent: Thursday, October 31, 2019 6:29 PM
> To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Zhu, TaoX <taox.zhu@intel.com>
> Subject: [DPDK] net/ice: set vlan tpid is not supported by ice
> 
> From: Zhu Tao <taox.zhu@intel.com>
> 
> Set vlan tpid is not supported by ice hardware. Delete driver code that
> doesn't work.
> 
> Signed-off-by: Zhu Tao <taox.zhu@intel.com>
> ---
>  drivers/net/ice/ice_ethdev.c | 54 ------------------------------------
>  1 file changed, 54 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index
> d74675842..ec0234091 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -69,9 +69,6 @@ static int ice_dev_set_link_down(struct rte_eth_dev
> *dev);
> 
>  static int ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);  static int
> ice_vlan_offload_set(struct rte_eth_dev *dev, int mask); -static int
> ice_vlan_tpid_set(struct rte_eth_dev *dev,
> -			     enum rte_vlan_type vlan_type,
> -			     uint16_t tpid);
>  static int ice_rss_reta_update(struct rte_eth_dev *dev,
>  			       struct rte_eth_rss_reta_entry64 *reta_conf,
>  			       uint16_t reta_size);
> @@ -156,7 +153,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
>  	.mac_addr_remove              = ice_macaddr_remove,
>  	.vlan_filter_set              = ice_vlan_filter_set,
>  	.vlan_offload_set             = ice_vlan_offload_set,
> -	.vlan_tpid_set                = ice_vlan_tpid_set,
>  	.reta_update                  = ice_rss_reta_update,
>  	.reta_query                   = ice_rss_reta_query,
>  	.rss_hash_update              = ice_rss_hash_update,
> @@ -3340,56 +3336,6 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int
> mask)
>  	return 0;
>  }
> 
> -static int
> -ice_vlan_tpid_set(struct rte_eth_dev *dev,
> -		  enum rte_vlan_type vlan_type,
> -		  uint16_t tpid)
> -{
> -	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data-
> >dev_private);
> -	uint64_t reg_r = 0, reg_w = 0;
> -	uint16_t reg_id = 0;
> -	int ret = 0;
> -	int qinq = dev->data->dev_conf.rxmode.offloads &
> -		   DEV_RX_OFFLOAD_VLAN_EXTEND;
> -
> -	switch (vlan_type) {
> -	case ETH_VLAN_TYPE_OUTER:
> -		if (qinq)
> -			reg_id = 3;
> -		else
> -			reg_id = 5;
> -		break;
> -	case ETH_VLAN_TYPE_INNER:
> -		if (qinq) {
> -			reg_id = 5;
> -		} else {
> -			PMD_DRV_LOG(ERR,
> -				    "Unsupported vlan type in single vlan.");
> -			return -EINVAL;
> -		}
> -		break;
> -	default:
> -		PMD_DRV_LOG(ERR, "Unsupported vlan type %d", vlan_type);
> -		return -EINVAL;
> -	}
> -	reg_r = ICE_READ_REG(hw, GL_SWT_L2TAGCTRL(reg_id));
> -	PMD_DRV_LOG(DEBUG, "Debug read from ICE
> GL_SWT_L2TAGCTRL[%d]: "
> -		    "0x%08"PRIx64"", reg_id, reg_r);
> -
> -	reg_w = reg_r & (~(GL_SWT_L2TAGCTRL_ETHERTYPE_M));
> -	reg_w |= ((uint64_t)tpid << GL_SWT_L2TAGCTRL_ETHERTYPE_S);
> -	if (reg_r == reg_w) {
> -		PMD_DRV_LOG(DEBUG, "No need to write");
> -		return 0;
> -	}
> -
> -	ICE_WRITE_REG(hw, GL_SWT_L2TAGCTRL(reg_id), reg_w);
> -	PMD_DRV_LOG(DEBUG, "Debug write 0x%08"PRIx64" to "
> -		    "ICE GL_SWT_L2TAGCTRL[%d]", reg_w, reg_id);
> -
> -	return ret;
> -}
> -
>  static int
>  ice_get_rss_lut(struct ice_vsi *vsi, uint8_t *lut, uint16_t lut_size)  {
> --
> 2.17.1

Acked-by: Qiming Yang <qiming.yang@intel.com>

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

* Re: [dpdk-dev] [DPDK] net/ice: set vlan tpid is not supported by ice
  2019-10-31 10:29 [dpdk-dev] [DPDK] net/ice: set vlan tpid is not supported by ice taox.zhu
  2019-11-04  3:30 ` Yang, Qiming
@ 2019-11-08  6:55 ` Ye Xiaolong
  1 sibling, 0 replies; 3+ messages in thread
From: Ye Xiaolong @ 2019-11-08  6:55 UTC (permalink / raw)
  To: taox.zhu; +Cc: qiming.yang, wenzhuo.lu, dev

On 10/31, taox.zhu@intel.com wrote:
>From: Zhu Tao <taox.zhu@intel.com>
>
>Set vlan tpid is not supported by ice hardware. Delete driver code
>that doesn't work.
>
>Signed-off-by: Zhu Tao <taox.zhu@intel.com>
>---
> drivers/net/ice/ice_ethdev.c | 54 ------------------------------------
> 1 file changed, 54 deletions(-)
>
>diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
>index d74675842..ec0234091 100644
>--- a/drivers/net/ice/ice_ethdev.c
>+++ b/drivers/net/ice/ice_ethdev.c
>@@ -69,9 +69,6 @@ static int ice_dev_set_link_down(struct rte_eth_dev *dev);
> 
> static int ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
> static int ice_vlan_offload_set(struct rte_eth_dev *dev, int mask);
>-static int ice_vlan_tpid_set(struct rte_eth_dev *dev,
>-			     enum rte_vlan_type vlan_type,
>-			     uint16_t tpid);
> static int ice_rss_reta_update(struct rte_eth_dev *dev,
> 			       struct rte_eth_rss_reta_entry64 *reta_conf,
> 			       uint16_t reta_size);
>@@ -156,7 +153,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
> 	.mac_addr_remove              = ice_macaddr_remove,
> 	.vlan_filter_set              = ice_vlan_filter_set,
> 	.vlan_offload_set             = ice_vlan_offload_set,
>-	.vlan_tpid_set                = ice_vlan_tpid_set,
> 	.reta_update                  = ice_rss_reta_update,
> 	.reta_query                   = ice_rss_reta_query,
> 	.rss_hash_update              = ice_rss_hash_update,
>@@ -3340,56 +3336,6 @@ ice_vlan_offload_set(struct rte_eth_dev *dev, int mask)
> 	return 0;
> }
> 
>-static int
>-ice_vlan_tpid_set(struct rte_eth_dev *dev,
>-		  enum rte_vlan_type vlan_type,
>-		  uint16_t tpid)
>-{
>-	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
>-	uint64_t reg_r = 0, reg_w = 0;
>-	uint16_t reg_id = 0;
>-	int ret = 0;
>-	int qinq = dev->data->dev_conf.rxmode.offloads &
>-		   DEV_RX_OFFLOAD_VLAN_EXTEND;
>-
>-	switch (vlan_type) {
>-	case ETH_VLAN_TYPE_OUTER:
>-		if (qinq)
>-			reg_id = 3;
>-		else
>-			reg_id = 5;
>-		break;
>-	case ETH_VLAN_TYPE_INNER:
>-		if (qinq) {
>-			reg_id = 5;
>-		} else {
>-			PMD_DRV_LOG(ERR,
>-				    "Unsupported vlan type in single vlan.");
>-			return -EINVAL;
>-		}
>-		break;
>-	default:
>-		PMD_DRV_LOG(ERR, "Unsupported vlan type %d", vlan_type);
>-		return -EINVAL;
>-	}
>-	reg_r = ICE_READ_REG(hw, GL_SWT_L2TAGCTRL(reg_id));
>-	PMD_DRV_LOG(DEBUG, "Debug read from ICE GL_SWT_L2TAGCTRL[%d]: "
>-		    "0x%08"PRIx64"", reg_id, reg_r);
>-
>-	reg_w = reg_r & (~(GL_SWT_L2TAGCTRL_ETHERTYPE_M));
>-	reg_w |= ((uint64_t)tpid << GL_SWT_L2TAGCTRL_ETHERTYPE_S);
>-	if (reg_r == reg_w) {
>-		PMD_DRV_LOG(DEBUG, "No need to write");
>-		return 0;
>-	}
>-
>-	ICE_WRITE_REG(hw, GL_SWT_L2TAGCTRL(reg_id), reg_w);
>-	PMD_DRV_LOG(DEBUG, "Debug write 0x%08"PRIx64" to "
>-		    "ICE GL_SWT_L2TAGCTRL[%d]", reg_w, reg_id);
>-
>-	return ret;
>-}
>-
> static int
> ice_get_rss_lut(struct ice_vsi *vsi, uint8_t *lut, uint16_t lut_size)
> {
>-- 
>2.17.1
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.

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

end of thread, other threads:[~2019-11-08  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-31 10:29 [dpdk-dev] [DPDK] net/ice: set vlan tpid is not supported by ice taox.zhu
2019-11-04  3:30 ` Yang, Qiming
2019-11-08  6:55 ` Ye Xiaolong

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).