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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  2 Aug 2021 21:25:31 +0100
From:   Mark Brown <broonie@...nel.org>
To:     David Miller <davem@...emloft.net>,
        Networking <netdev@...r.kernel.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Vladimir Oltean <vladimir.oltean@....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/dsa/sja1105/sja1105_main.c

between commit:

  589918df9322 ("net: dsa: sja1105: be stateless with FDB entries on SJA1105P/Q/R/S/SJA1110 too")

from the net tree and commit:

  0fac6aa098ed ("net: dsa: sja1105: delete the best_effort_vlan_filtering mode")

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.

diff --cc drivers/net/dsa/sja1105/sja1105_main.c
index 8667c9754330,5ab1676a7448..000000000000
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@@ -1445,23 -1474,25 +1499,29 @@@ int sja1105pqrs_fdb_add(struct dsa_swit
  	/* Search for an existing entry in the FDB table */
  	l2_lookup.macaddr = ether_addr_to_u64(addr);
  	l2_lookup.vlanid = vid;
 -	l2_lookup.iotag = SJA1105_S_TAG;
  	l2_lookup.mask_macaddr = GENMASK_ULL(ETH_ALEN * 8 - 1, 0);
- 	l2_lookup.mask_vlanid = VLAN_VID_MASK;
+ 	if (priv->vlan_aware) {
+ 		l2_lookup.mask_vlanid = VLAN_VID_MASK;
+ 		l2_lookup.mask_iotag = BIT(0);
+ 	} else {
+ 		l2_lookup.mask_vlanid = 0;
+ 		l2_lookup.mask_iotag = 0;
+ 	}
  	l2_lookup.destports = BIT(port);
  
 +	tmp = l2_lookup;
 +
  	rc = sja1105_dynamic_config_read(priv, BLK_IDX_L2_LOOKUP,
 -					 SJA1105_SEARCH, &l2_lookup);
 -	if (rc == 0) {
 -		/* Found and this port is already in the entry's
 +					 SJA1105_SEARCH, &tmp);
 +	if (rc == 0 && tmp.index != SJA1105_MAX_L2_LOOKUP_COUNT - 1) {
 +		/* Found a static entry and this port is already in the entry's
  		 * port mask => job done
  		 */
 -		if (l2_lookup.destports & BIT(port))
 +		if ((tmp.destports & BIT(port)) && tmp.lockeds)
  			return 0;
 +
 +		l2_lookup = tmp;
 +
  		/* l2_lookup.index is populated by the switch in case it
  		 * found something.
  		 */
@@@ -1536,8 -1537,15 +1596,14 @@@ int sja1105pqrs_fdb_del(struct dsa_swit
  
  	l2_lookup.macaddr = ether_addr_to_u64(addr);
  	l2_lookup.vlanid = vid;
 -	l2_lookup.iotag = SJA1105_S_TAG;
  	l2_lookup.mask_macaddr = GENMASK_ULL(ETH_ALEN * 8 - 1, 0);
- 	l2_lookup.mask_vlanid = VLAN_VID_MASK;
+ 	if (priv->vlan_aware) {
+ 		l2_lookup.mask_vlanid = VLAN_VID_MASK;
+ 		l2_lookup.mask_iotag = BIT(0);
+ 	} else {
+ 		l2_lookup.mask_vlanid = 0;
+ 		l2_lookup.mask_iotag = 0;
+ 	}
  	l2_lookup.destports = BIT(port);
  
  	rc = sja1105_dynamic_config_read(priv, BLK_IDX_L2_LOOKUP,

Powered by blists - more mailing lists