[Intel-wired-lan] [PATCH iwl-next v2 3/4] ice: Fix VLAN and CRC strip co-existence

Tony Nguyen anthony.l.nguyen at intel.com
Thu Aug 31 20:33:12 UTC 2023



On 8/30/2023 2:48 PM, Ahmed Zaki wrote:
> From: Haiyue Wang <haiyue.wang at intel.com>

...

> @@ -2673,10 +2696,15 @@ static int ice_vf_init_vlan_stripping(struct ice_vf *vf)
>   	if (ice_vf_is_port_vlan_ena(vf) && !ice_is_dvm_ena(&vsi->back->hw))
>   		return 0;
>   
> -	if (ice_vf_vlan_offload_ena(vf->driver_caps))
> -		return vsi->inner_vlan_ops.ena_stripping(vsi, ETH_P_8021Q);
> -	else
> -		return vsi->inner_vlan_ops.dis_stripping(vsi);
> +	if (ice_vf_vlan_offload_ena(vf->driver_caps)) {
> +		int err = vsi->inner_vlan_ops.ena_stripping(vsi,
> +							    ETH_P_8021Q);
> +		if (!err)
> +			vf->vlan_strip_ena |= ICE_INNER_VLAN_STRIP_ENA;

Need a newline separator for declarations. This supersedes the no 
newline between function call and error check. However, since your 
declaration line wraps, it would be preferred to do this:

		int err;

		err = vsi->inner_vlan_ops.ena_stripping(vsi, ETH_P_8021Q);
		if (!err)
			...

which should resolve all the issues.


> +		return err;
> +	}
> +



More information about the Intel-wired-lan mailing list