public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qeth: Default to allow promiscuous mode
@ 2016-03-17 17:01 Alexander Graf
  2016-03-17 17:52 ` Evgeny Cherkashin
       [not found] ` <201603171752.u2HHq7hM025196@d06av11.portsmouth.uk.ibm.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Graf @ 2016-03-17 17:01 UTC (permalink / raw)
  To: linux-s390
  Cc: Eugene Crosser, linux-kernel, Heiko Carstens, Martin Schwidefsky,
	Ursula Braun, ihno, mt, pwieczorkiewicz

When a qeth device is in bridge role, one of the ports of an adapter can
ask for promiscuous mode and get it enabled.

The default until now was to not allow user space to enable promiscuous mode
without switching sysfs attributes as well though, diverging from usual
network device semantics.

This patch sets the default to allow promiscuous enablement. That way all
existing tools "just work", albeit only one port of an adapter can be in
promiscuous mode at a given time.

Signed-off-by: Alexander Graf <agraf@suse.de>
---
 drivers/s390/net/qeth_l2_sys.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/s390/net/qeth_l2_sys.c b/drivers/s390/net/qeth_l2_sys.c
index 692db49..98c7ac5 100644
--- a/drivers/s390/net/qeth_l2_sys.c
+++ b/drivers/s390/net/qeth_l2_sys.c
@@ -258,6 +258,10 @@ void qeth_l2_setup_bridgeport_attrs(struct qeth_card *card)
 		return;
 	if (!card->options.sbp.supported_funcs)
 		return;
+
+	/* Allow to set promiscuous by default */
+	card->options.sbp.reflect_promisc = 1;
+
 	if (card->options.sbp.role != QETH_SBP_ROLE_NONE) {
 		/* Conditional to avoid spurious error messages */
 		qeth_bridgeport_setrole(card, card->options.sbp.role);
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-18 13:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-17 17:01 [PATCH] qeth: Default to allow promiscuous mode Alexander Graf
2016-03-17 17:52 ` Evgeny Cherkashin
     [not found] ` <201603171752.u2HHq7hM025196@d06av11.portsmouth.uk.ibm.com>
2016-03-18  9:36   ` Alexander Graf
2016-03-18 13:07     ` Evgeny Cherkashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox