lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200221101235.3db4fc56@canb.auug.org.au>
Date:   Fri, 21 Feb 2020 10:12:35 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     David Miller <davem@...emloft.net>,
        Networking <netdev@...r.kernel.org>
Cc:     Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Brett Creeley <brett.creeley@...el.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: linux-next: manual merge of the net-next tree with the net tree

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

between commit:

  c54d209c78b8 ("ice: Wait for VF to be reset/ready before configuration")

from the net tree and commits:

  b093841f9ac9 ("ice: Refactor port vlan configuration for the VF")
  61c9ce86a6f5 ("ice: Fix Port VLAN priority bits")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 75c70d432c72,a21f9d2edbbb..000000000000
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@@ -2738,7 -2786,8 +2828,8 @@@ ice_set_vf_port_vlan(struct net_device 
  	struct ice_vsi *vsi;
  	struct device *dev;
  	struct ice_vf *vf;
+ 	u16 vlanprio;
 -	int ret = 0;
 +	int ret;
  
  	dev = ice_pf_to_dev(pf);
  	if (ice_validate_vf_id(pf, vf_id))
@@@ -2756,47 -2806,58 +2848,59 @@@
  
  	vf = &pf->vf[vf_id];
  	vsi = pf->vsi[vf->lan_vsi_idx];
 -	if (ice_check_vf_init(pf, vf))
 -		return -EBUSY;
 +
 +	ret = ice_check_vf_ready_for_cfg(vf);
 +	if (ret)
 +		return ret;
  
- 	if (le16_to_cpu(vsi->info.pvid) == vlanprio) {
+ 	vlanprio = vlan_id | (qos << VLAN_PRIO_SHIFT);
+ 
+ 	if (vf->port_vlan_info == vlanprio) {
  		/* duplicate request, so just return success */
  		dev_dbg(dev, "Duplicate pvid %d request\n", vlanprio);
 -		return ret;
 +		return 0;
  	}
  
- 	/* If PVID, then remove all filters on the old VLAN */
- 	if (vsi->info.pvid)
- 		ice_vsi_kill_vlan(vsi, (le16_to_cpu(vsi->info.pvid) &
- 				  VLAN_VID_MASK));
- 
  	if (vlan_id || qos) {
+ 		/* remove VLAN 0 filter set by default when transitioning from
+ 		 * no port VLAN to a port VLAN. No change to old port VLAN on
+ 		 * failure.
+ 		 */
+ 		ret = ice_vsi_kill_vlan(vsi, 0);
+ 		if (ret)
+ 			return ret;
  		ret = ice_vsi_manage_pvid(vsi, vlanprio, true);
  		if (ret)
  			return ret;
  	} else {
- 		ice_vsi_manage_pvid(vsi, 0, false);
- 		vsi->info.pvid = 0;
+ 		/* add VLAN 0 filter back when transitioning from port VLAN to
+ 		 * no port VLAN. No change to old port VLAN on failure.
+ 		 */
+ 		ret = ice_vsi_add_vlan(vsi, 0);
+ 		if (ret)
+ 			return ret;
+ 		ret = ice_vsi_manage_pvid(vsi, 0, false);
+ 		if (ret)
 -			goto error_manage_pvid;
++			return ret;
  	}
  
  	if (vlan_id) {
  		dev_info(dev, "Setting VLAN %d, QoS 0x%x on VF %d\n",
  			 vlan_id, qos, vf_id);
  
- 		/* add new VLAN filter for each MAC */
+ 		/* add VLAN filter for the port VLAN */
  		ret = ice_vsi_add_vlan(vsi, vlan_id);
  		if (ret)
 -			goto error_manage_pvid;
 +			return ret;
  	}
+ 	/* remove old port VLAN filter with valid VLAN ID or QoS fields */
+ 	if (vf->port_vlan_info)
+ 		ice_vsi_kill_vlan(vsi, vf->port_vlan_info & VLAN_VID_MASK);
  
- 	/* The Port VLAN needs to be saved across resets the same as the
- 	 * default LAN MAC address.
- 	 */
- 	vf->port_vlan_id = le16_to_cpu(vsi->info.pvid);
+ 	/* keep port VLAN information persistent on resets */
+ 	vf->port_vlan_info = le16_to_cpu(vsi->info.pvid);
  
 -error_manage_pvid:
 -	return ret;
 +	return 0;
  }
  
  /**

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ