mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivien Didelot <vivien.didelot@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Vivien Didelot <vivien.didelot@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	f.fainelli@gmail.com, andrew@lunn.ch
Subject: [PATCH net-next 1/4] net: dsa: do not check orig_dev in vlan del
Date: Tue, 11 Jun 2019 17:47:44 -0400	[thread overview]
Message-ID: <20190611214747.22285-2-vivien.didelot@gmail.com> (raw)
In-Reply-To: <20190611214747.22285-1-vivien.didelot@gmail.com>

The current DSA code handling switchdev objects does not recurse into
the lower devices thus is never called with an orig_dev member being
a bridge device, hence remove this useless check.

At the same time, remove the comments about the callers, which is
unlikely to be updated if the code changes and thus confusing.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
---
 net/dsa/port.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/net/dsa/port.c b/net/dsa/port.c
index 70744fec9717..f83756eaf8a5 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -336,9 +336,6 @@ int dsa_port_vlan_add(struct dsa_port *dp,
 		.vlan = vlan,
 	};
 
-	/* Can be called from dsa_slave_port_obj_add() or
-	 * dsa_slave_vlan_rx_add_vid()
-	 */
 	if (!dp->bridge_dev || br_vlan_enabled(dp->bridge_dev))
 		return dsa_port_notify(dp, DSA_NOTIFIER_VLAN_ADD, &info);
 
@@ -354,12 +351,6 @@ int dsa_port_vlan_del(struct dsa_port *dp,
 		.vlan = vlan,
 	};
 
-	if (vlan->obj.orig_dev && netif_is_bridge_master(vlan->obj.orig_dev))
-		return -EOPNOTSUPP;
-
-	/* Can be called from dsa_slave_port_obj_del() or
-	 * dsa_slave_vlan_rx_kill_vid()
-	 */
 	if (!dp->bridge_dev || br_vlan_enabled(dp->bridge_dev))
 		return dsa_port_notify(dp, DSA_NOTIFIER_VLAN_DEL, &info);
 
-- 
2.21.0


  reply	other threads:[~2019-06-11 21:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 21:47 [PATCH net-next 0/4] net: dsa: use switchdev attr and obj handlers Vivien Didelot
2019-06-11 21:47 ` Vivien Didelot [this message]
2019-06-11 23:07   ` [PATCH net-next 1/4] net: dsa: do not check orig_dev in vlan del Florian Fainelli
2019-06-11 21:47 ` [PATCH net-next 2/4] net: dsa: make cpu_dp non const Vivien Didelot
2019-06-11 23:07   ` Florian Fainelli
2019-06-11 21:47 ` [PATCH net-next 3/4] net: dsa: make dsa_slave_dev_check use const Vivien Didelot
2019-06-11 23:07   ` Florian Fainelli
2019-06-11 21:47 ` [PATCH net-next 4/4] net: dsa: use switchdev handle helpers Vivien Didelot
2019-06-11 23:10   ` Florian Fainelli
2019-06-13 17:28 ` [PATCH net-next 0/4] net: dsa: use switchdev attr and obj handlers Vivien Didelot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611214747.22285-2-vivien.didelot@gmail.com \
    --to=vivien.didelot@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome