diff mbox series

linux-next: manual merge of the net-next tree with the net tree

Message ID 20210802202531.40356-1-broonie@kernel.org (mailing list archive)
State Not Applicable
Headers show
Series linux-next: manual merge of the net-next tree with the net tree | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Mark Brown Aug. 2, 2021, 8:25 p.m. UTC
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.

+++ 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,

Comments

Vladimir Oltean Aug. 2, 2021, 8:31 p.m. UTC | #1
Hello Mark,

On Mon, Aug 02, 2021 at 09:25:31PM +0100, Mark Brown wrote:
> 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.

The conflict resolution I intended (not the one you came up with) is
described in the commit message of patch 589918df9322 ("net: dsa:
sja1105: be stateless with FDB entries on SJA1105P/Q/R/S/SJA1110 too").
diff mbox series

Patch

diff --cc drivers/net/dsa/sja1105/sja1105_main.c
index 8667c9754330,5ab1676a7448..000000000000
--- a/drivers/net/dsa/sja1105/sja1105_main.c