* [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