netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] s390/qeth: fixes 2020-06-17
@ 2020-06-17 14:54 Julian Wiedmann
  2020-06-17 14:54 ` [PATCH net 1/2] s390/qeth: fix error handling for isolation mode cmds Julian Wiedmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Julian Wiedmann @ 2020-06-17 14:54 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun, Karsten Graul,
	Julian Wiedmann

Hi Dave & Jakub,

please apply the following patch series for qeth to netdev's net tree.

The first patch fixes a regression in the error handling for a specific
cmd type. I have some follow-ups queued up for net-next to clean this
up properly...

The second patch fine-tunes the HW offload restrictions that went in
with this merge window. In some setups we don't need to apply them.

Thanks,
Julian

Julian Wiedmann (2):
  s390/qeth: fix error handling for isolation mode cmds
  s390/qeth: let isolation mode override HW offload restrictions

 drivers/s390/net/qeth_core_main.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

-- 
2.17.1


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

* [PATCH net 1/2] s390/qeth: fix error handling for isolation mode cmds
  2020-06-17 14:54 [PATCH net 0/2] s390/qeth: fixes 2020-06-17 Julian Wiedmann
@ 2020-06-17 14:54 ` Julian Wiedmann
  2020-06-17 14:54 ` [PATCH net 2/2] s390/qeth: let isolation mode override HW offload restrictions Julian Wiedmann
  2020-06-19  3:27 ` [PATCH net 0/2] s390/qeth: fixes 2020-06-17 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Julian Wiedmann @ 2020-06-17 14:54 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun, Karsten Graul,
	Julian Wiedmann

Current(?) OSA devices also store their cmd-specific return codes for
SET_ACCESS_CONTROL cmds into the top-level cmd->hdr.return_code.
So once we added stricter checking for the top-level field a while ago,
none of the error logic that rolls back the user's configuration to its
old state is applied any longer.

For this specific cmd, go back to the old model where we peek into the
cmd structure even though the top-level field indicated an error.

Fixes: 686c97ee29c8 ("s390/qeth: fix error handling in adapter command callbacks")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 18a0fb75a710..9636415f810b 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -4544,9 +4544,6 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card,
 	int fallback = *(int *)reply->param;
 
 	QETH_CARD_TEXT(card, 4, "setaccb");
-	if (cmd->hdr.return_code)
-		return -EIO;
-	qeth_setadpparms_inspect_rc(cmd);
 
 	access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl;
 	QETH_CARD_TEXT_(card, 2, "rc=%d",
@@ -4556,7 +4553,7 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card,
 		QETH_DBF_MESSAGE(3, "ERR:SET_ACCESS_CTRL(%#x) on device %x: %#x\n",
 				 access_ctrl_req->subcmd_code, CARD_DEVID(card),
 				 cmd->data.setadapterparms.hdr.return_code);
-	switch (cmd->data.setadapterparms.hdr.return_code) {
+	switch (qeth_setadpparms_inspect_rc(cmd)) {
 	case SET_ACCESS_CTRL_RC_SUCCESS:
 		if (card->options.isolation == ISOLATION_MODE_NONE) {
 			dev_info(&card->gdev->dev,
-- 
2.17.1


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

* [PATCH net 2/2] s390/qeth: let isolation mode override HW offload restrictions
  2020-06-17 14:54 [PATCH net 0/2] s390/qeth: fixes 2020-06-17 Julian Wiedmann
  2020-06-17 14:54 ` [PATCH net 1/2] s390/qeth: fix error handling for isolation mode cmds Julian Wiedmann
@ 2020-06-17 14:54 ` Julian Wiedmann
  2020-06-19  3:27 ` [PATCH net 0/2] s390/qeth: fixes 2020-06-17 David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Julian Wiedmann @ 2020-06-17 14:54 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun, Karsten Graul,
	Julian Wiedmann

When a device is configured with ISOLATION_MODE_FWD, traffic never goes
through the internal switch. Don't apply the offload restrictions in
this case.

Fixes: c619e9a6f52f ("s390/qeth: don't use restricted offloads for local traffic")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
 drivers/s390/net/qeth_core_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 9636415f810b..88e998de2d03 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -6837,9 +6837,11 @@ netdev_features_t qeth_features_check(struct sk_buff *skb,
 				      struct net_device *dev,
 				      netdev_features_t features)
 {
+	struct qeth_card *card = dev->ml_priv;
+
 	/* Traffic with local next-hop is not eligible for some offloads: */
-	if (skb->ip_summed == CHECKSUM_PARTIAL) {
-		struct qeth_card *card = dev->ml_priv;
+	if (skb->ip_summed == CHECKSUM_PARTIAL &&
+	    card->options.isolation != ISOLATION_MODE_FWD) {
 		netdev_features_t restricted = 0;
 
 		if (skb_is_gso(skb) && !netif_needs_gso(skb, features))
-- 
2.17.1


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

* Re: [PATCH net 0/2] s390/qeth: fixes 2020-06-17
  2020-06-17 14:54 [PATCH net 0/2] s390/qeth: fixes 2020-06-17 Julian Wiedmann
  2020-06-17 14:54 ` [PATCH net 1/2] s390/qeth: fix error handling for isolation mode cmds Julian Wiedmann
  2020-06-17 14:54 ` [PATCH net 2/2] s390/qeth: let isolation mode override HW offload restrictions Julian Wiedmann
@ 2020-06-19  3:27 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-06-19  3:27 UTC (permalink / raw)
  To: jwi; +Cc: kuba, netdev, linux-s390, heiko.carstens, ubraun, kgraul

From: Julian Wiedmann <jwi@linux.ibm.com>
Date: Wed, 17 Jun 2020 16:54:51 +0200

> please apply the following patch series for qeth to netdev's net tree.
> 
> The first patch fixes a regression in the error handling for a specific
> cmd type. I have some follow-ups queued up for net-next to clean this
> up properly...
> 
> The second patch fine-tunes the HW offload restrictions that went in
> with this merge window. In some setups we don't need to apply them.

Series applied, thanks.

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

end of thread, other threads:[~2020-06-19  3:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 14:54 [PATCH net 0/2] s390/qeth: fixes 2020-06-17 Julian Wiedmann
2020-06-17 14:54 ` [PATCH net 1/2] s390/qeth: fix error handling for isolation mode cmds Julian Wiedmann
2020-06-17 14:54 ` [PATCH net 2/2] s390/qeth: let isolation mode override HW offload restrictions Julian Wiedmann
2020-06-19  3:27 ` [PATCH net 0/2] s390/qeth: fixes 2020-06-17 David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).