Skip to contentSkip to conversation

s390/qeth: fixes 2020-06-17

PATCH In review Julian Wiedmann 2 participants 4 messages Jun 17, 2020 – Jun 19, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover s390/qeth: fixes 2020-06-17

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(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 s390/qeth: fix error handling for isolation mode cmds

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")
---
 drivers/s390/net/qeth_core_main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/s390/net/qeth_core_main.c +1 -4
index 18a0fb75a710..9636415f810b 100644
@@ -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,
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 s390/qeth: let isolation mode override HW offload restrictions

In reply to 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")
---
 drivers/s390/net/qeth_core_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_core_main.c +4 -2
index 9636415f810b..88e998de2d03 100644
@@ -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))
Signature · 1 line
2.17.1
maintainer
#3 lore raw
In reply to Julian Wiedmann

From: Julian Wiedmann <[email protected]>
Date: Wed, 17 Jun 2020 16:54:51 +0200

Quoted 8 lines

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.