[v2,1/3] net/ixgbe: promiscuous mode enable on VF

Message ID 1547614920-59680-2-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/ixgbe: promiscuous mode enable on VF |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Zhao1, Wei Jan. 16, 2019, 5:01 a.m. UTC
  There is need to enable two ops of promiscuous_enable and
promiscuous_disable on VF.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
  

Comments

Qi Zhang Feb. 13, 2019, 3:35 a.m. UTC | #1
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, January 16, 2019 1:02 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH v2 1/3] net/ixgbe: promiscuous mode enable on VF
> 
> There is need to enable two ops of promiscuous_enable and
> promiscuous_disable on VF.
> 
> Fixes: af75078fece3 ("first public release")

I think this is not a fix, we just add some feature not be implemented.

Btw, you need to update doc/guides/nics/features/ixgbe_vf.ini

> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 91ba620..e8a2c6e 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -260,6 +260,8 @@ static int ixgbevf_dev_rx_queue_intr_disable(struct
> rte_eth_dev *dev,  static void ixgbevf_set_ivar_map(struct ixgbe_hw *hw,
> int8_t direction,
>  				 uint8_t queue, uint8_t msix_vector);  static void
> ixgbevf_configure_msix(struct rte_eth_dev *dev);
> +static void ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev);
> +static void ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev);
>  static void ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev);  static
> void ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev);
> 
> @@ -596,6 +598,8 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
>  	.xstats_get_names     = ixgbevf_dev_xstats_get_names,
>  	.dev_close            = ixgbevf_dev_close,
>  	.dev_reset	      = ixgbevf_dev_reset,
> +	.promiscuous_enable   = ixgbevf_dev_promiscuous_enable,
> +	.promiscuous_disable  = ixgbevf_dev_promiscuous_disable,
>  	.allmulticast_enable  = ixgbevf_dev_allmulticast_enable,
>  	.allmulticast_disable = ixgbevf_dev_allmulticast_disable,
>  	.dev_infos_get        = ixgbevf_dev_info_get,
> @@ -8290,6 +8294,22 @@ ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev
> *dev,  }
> 
>  static void
> +ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev) {
> +	struct ixgbe_hw *hw =
> IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +
> +	hw->mac.ops.update_xcast_mode(hw,
> IXGBEVF_XCAST_MODE_PROMISC); }
> +
> +static void
> +ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) {
> +	struct ixgbe_hw *hw =
> IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +
> +	hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_NONE); }
> +
> +static void
>  ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)  {
>  	struct ixgbe_hw *hw =
> IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> --
> 2.7.5
  
Zhao1, Wei Feb. 13, 2019, 3:36 a.m. UTC | #2
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Wednesday, February 13, 2019 11:35 AM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Subject: RE: [PATCH v2 1/3] net/ixgbe: promiscuous mode enable on VF
> 
> 
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Wednesday, January 16, 2019 1:02 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> > Subject: [PATCH v2 1/3] net/ixgbe: promiscuous mode enable on VF
> >
> > There is need to enable two ops of promiscuous_enable and
> > promiscuous_disable on VF.
> >
> > Fixes: af75078fece3 ("first public release")
> 
> I think this is not a fix, we just add some feature not be implemented.
> 
> Btw, you need to update doc/guides/nics/features/ixgbe_vf.ini

Ok, I will update in v3

> 
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> > b/drivers/net/ixgbe/ixgbe_ethdev.c
> > index 91ba620..e8a2c6e 100644
> > --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> > @@ -260,6 +260,8 @@ static int
> > ixgbevf_dev_rx_queue_intr_disable(struct
> > rte_eth_dev *dev,  static void ixgbevf_set_ivar_map(struct ixgbe_hw
> > *hw, int8_t direction,
> >  				 uint8_t queue, uint8_t msix_vector);  static
> void
> > ixgbevf_configure_msix(struct rte_eth_dev *dev);
> > +static void ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev);
> > +static void ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev);
> >  static void ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev);
> > static void ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev);
> >
> > @@ -596,6 +598,8 @@ static const struct eth_dev_ops
> ixgbevf_eth_dev_ops = {
> >  	.xstats_get_names     = ixgbevf_dev_xstats_get_names,
> >  	.dev_close            = ixgbevf_dev_close,
> >  	.dev_reset	      = ixgbevf_dev_reset,
> > +	.promiscuous_enable   = ixgbevf_dev_promiscuous_enable,
> > +	.promiscuous_disable  = ixgbevf_dev_promiscuous_disable,
> >  	.allmulticast_enable  = ixgbevf_dev_allmulticast_enable,
> >  	.allmulticast_disable = ixgbevf_dev_allmulticast_disable,
> >  	.dev_infos_get        = ixgbevf_dev_info_get,
> > @@ -8290,6 +8294,22 @@ ixgbe_dev_udp_tunnel_port_del(struct
> > rte_eth_dev *dev,  }
> >
> >  static void
> > +ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev) {
> > +	struct ixgbe_hw *hw =
> > IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> > +
> > +	hw->mac.ops.update_xcast_mode(hw,
> > IXGBEVF_XCAST_MODE_PROMISC); }
> > +
> > +static void
> > +ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev) {
> > +	struct ixgbe_hw *hw =
> > IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> > +
> > +	hw->mac.ops.update_xcast_mode(hw,
> IXGBEVF_XCAST_MODE_NONE); }
> > +
> > +static void
> >  ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)  {
> >  	struct ixgbe_hw *hw =
> > IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> > --
> > 2.7.5
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 91ba620..e8a2c6e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -260,6 +260,8 @@  static int ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev,
 static void ixgbevf_set_ivar_map(struct ixgbe_hw *hw, int8_t direction,
 				 uint8_t queue, uint8_t msix_vector);
 static void ixgbevf_configure_msix(struct rte_eth_dev *dev);
+static void ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev);
+static void ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev);
 static void ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev);
 static void ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev);
 
@@ -596,6 +598,8 @@  static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.xstats_get_names     = ixgbevf_dev_xstats_get_names,
 	.dev_close            = ixgbevf_dev_close,
 	.dev_reset	      = ixgbevf_dev_reset,
+	.promiscuous_enable   = ixgbevf_dev_promiscuous_enable,
+	.promiscuous_disable  = ixgbevf_dev_promiscuous_disable,
 	.allmulticast_enable  = ixgbevf_dev_allmulticast_enable,
 	.allmulticast_disable = ixgbevf_dev_allmulticast_disable,
 	.dev_infos_get        = ixgbevf_dev_info_get,
@@ -8290,6 +8294,22 @@  ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 }
 
 static void
+ixgbevf_dev_promiscuous_enable(struct rte_eth_dev *dev)
+{
+	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_PROMISC);
+}
+
+static void
+ixgbevf_dev_promiscuous_disable(struct rte_eth_dev *dev)
+{
+	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+
+	hw->mac.ops.update_xcast_mode(hw, IXGBEVF_XCAST_MODE_NONE);
+}
+
+static void
 ixgbevf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 {
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);