[v1] net/ice/base: don't set VLAN mode in DCF mode

Message ID 20210127160516.5718-1-haiyue.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/ice/base: don't set VLAN mode in DCF mode |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-testing warning Testing issues

Commit Message

Wang, Haiyue Jan. 27, 2021, 4:05 p.m. UTC
  The PF will set the VLAN mode globally, DCF just needs to get the VLAN
mode.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/base/ice_vlan_mode.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Qiming Yang Jan. 28, 2021, 8:21 a.m. UTC | #1
Acked-by: Qiming Yang <qiming.yang@intel.com>

> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Thursday, January 28, 2021 00:05
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>
> Subject: [PATCH v1] net/ice/base: don't set VLAN mode in DCF mode
> 
> The PF will set the VLAN mode globally, DCF just needs to get the VLAN mode.
> 
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
>  drivers/net/ice/base/ice_vlan_mode.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ice/base/ice_vlan_mode.c
> b/drivers/net/ice/base/ice_vlan_mode.c
> index 2e4c3f62c4..460c4f902b 100644
> --- a/drivers/net/ice/base/ice_vlan_mode.c
> +++ b/drivers/net/ice/base/ice_vlan_mode.c
> @@ -354,6 +354,12 @@ static enum ice_status ice_set_svm(struct ice_hw
> *hw)
>   */
>  enum ice_status ice_set_vlan_mode(struct ice_hw *hw)  {
> +	/* DCF only has the ability to query the VLAN mode. Setting the VLAN
> +	 * mode is done by the PF.
> +	 */
> +	if (hw->dcf_enabled)
> +		return ICE_SUCCESS;
> +
>  	if (!ice_is_dvm_supported(hw))
>  		return ICE_SUCCESS;
> 
> --
> 2.30.0
  
Qi Zhang Jan. 28, 2021, 1:29 p.m. UTC | #2
> -----Original Message-----
> From: Yang, Qiming <qiming.yang@intel.com>
> Sent: Thursday, January 28, 2021 4:22 PM
> To: Wang, Haiyue <haiyue.wang@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v1] net/ice/base: don't set VLAN mode in DCF mode
> 
> Acked-by: Qiming Yang <qiming.yang@intel.com>
> 
> > -----Original Message-----
> > From: Wang, Haiyue <haiyue.wang@intel.com>
> > Sent: Thursday, January 28, 2021 00:05
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>
> > Subject: [PATCH v1] net/ice/base: don't set VLAN mode in DCF mode
> >
> > The PF will set the VLAN mode globally, DCF just needs to get the VLAN
> mode.
> >
> > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ice/base/ice_vlan_mode.c b/drivers/net/ice/base/ice_vlan_mode.c
index 2e4c3f62c4..460c4f902b 100644
--- a/drivers/net/ice/base/ice_vlan_mode.c
+++ b/drivers/net/ice/base/ice_vlan_mode.c
@@ -354,6 +354,12 @@  static enum ice_status ice_set_svm(struct ice_hw *hw)
  */
 enum ice_status ice_set_vlan_mode(struct ice_hw *hw)
 {
+	/* DCF only has the ability to query the VLAN mode. Setting the VLAN
+	 * mode is done by the PF.
+	 */
+	if (hw->dcf_enabled)
+		return ICE_SUCCESS;
+
 	if (!ice_is_dvm_supported(hw))
 		return ICE_SUCCESS;