From 8d87b107e8c86c7821944faf173c78fc664f321b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 3 Mar 2020 11:58:21 +0100 Subject: [PATCH] 5.5-stable patches added patches: net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch net-smc-no-peer-id-in-clc-decline-for-smcd.patch selftests-install-settings-files-to-fix-timeout-failures.patch --- ...-rxfh-support-eth_rss_hash_no_change.patch | 72 +++++++++++++++++ ...c-no-peer-id-in-clc-decline-for-smcd.patch | 35 ++++++++ ...ttings-files-to-fix-timeout-failures.patch | 79 +++++++++++++++++++ queue-5.5/series | 3 + 4 files changed, 189 insertions(+) create mode 100644 queue-5.5/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch create mode 100644 queue-5.5/net-smc-no-peer-id-in-clc-decline-for-smcd.patch create mode 100644 queue-5.5/selftests-install-settings-files-to-fix-timeout-failures.patch diff --git a/queue-5.5/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch b/queue-5.5/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch new file mode 100644 index 00000000000..dedcbb83d5b --- /dev/null +++ b/queue-5.5/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch @@ -0,0 +1,72 @@ +From 470793a78ce344bd53d31e0c2d537f71ba957547 Mon Sep 17 00:00:00 2001 +From: Arthur Kiyanovski +Date: Tue, 11 Feb 2020 15:17:49 +0000 +Subject: net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE + +From: Arthur Kiyanovski + +commit 470793a78ce344bd53d31e0c2d537f71ba957547 upstream. + +As the name suggests ETH_RSS_HASH_NO_CHANGE is received upon changing +the key or indirection table using ethtool while keeping the same hash +function. + +Also add a function for retrieving the current hash function from +the ena-com layer. + +Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") +Signed-off-by: Sameeh Jubran +Signed-off-by: Saeed Bshara +Signed-off-by: Arthur Kiyanovski +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/amazon/ena/ena_com.c | 5 +++++ + drivers/net/ethernet/amazon/ena/ena_com.h | 8 ++++++++ + drivers/net/ethernet/amazon/ena/ena_ethtool.c | 3 +++ + 3 files changed, 16 insertions(+) + +--- a/drivers/net/ethernet/amazon/ena/ena_com.c ++++ b/drivers/net/ethernet/amazon/ena/ena_com.c +@@ -1046,6 +1046,11 @@ static int ena_com_get_feature(struct en + feature_ver); + } + ++int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev) ++{ ++ return ena_dev->rss.hash_func; ++} ++ + static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev) + { + struct ena_admin_feature_rss_flow_hash_control *hash_key = +--- a/drivers/net/ethernet/amazon/ena/ena_com.h ++++ b/drivers/net/ethernet/amazon/ena/ena_com.h +@@ -656,6 +656,14 @@ int ena_com_rss_init(struct ena_com_dev + */ + void ena_com_rss_destroy(struct ena_com_dev *ena_dev); + ++/* ena_com_get_current_hash_function - Get RSS hash function ++ * @ena_dev: ENA communication layer struct ++ * ++ * Return the current hash function. ++ * @return: 0 or one of the ena_admin_hash_functions values. ++ */ ++int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev); ++ + /* ena_com_fill_hash_function - Fill RSS hash function + * @ena_dev: ENA communication layer struct + * @func: The hash function (Toeplitz or crc) +--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c ++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c +@@ -736,6 +736,9 @@ static int ena_set_rxfh(struct net_devic + } + + switch (hfunc) { ++ case ETH_RSS_HASH_NO_CHANGE: ++ func = ena_com_get_current_hash_function(ena_dev); ++ break; + case ETH_RSS_HASH_TOP: + func = ENA_ADMIN_TOEPLITZ; + break; diff --git a/queue-5.5/net-smc-no-peer-id-in-clc-decline-for-smcd.patch b/queue-5.5/net-smc-no-peer-id-in-clc-decline-for-smcd.patch new file mode 100644 index 00000000000..6f8a31cc69e --- /dev/null +++ b/queue-5.5/net-smc-no-peer-id-in-clc-decline-for-smcd.patch @@ -0,0 +1,35 @@ +From 369537c97024dca99303a8d4d6ab38b4f54d3909 Mon Sep 17 00:00:00 2001 +From: Ursula Braun +Date: Fri, 14 Feb 2020 08:59:00 +0100 +Subject: net/smc: no peer ID in CLC decline for SMCD + +From: Ursula Braun + +commit 369537c97024dca99303a8d4d6ab38b4f54d3909 upstream. + +Just SMCR requires a CLC Peer ID, but not SMCD. The field should be +zero for SMCD. + +Fixes: c758dfddc1b5 ("net/smc: add SMC-D support in CLC messages") +Signed-off-by: Ursula Braun +Signed-off-by: Karsten Graul +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/smc/smc_clc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/smc/smc_clc.c ++++ b/net/smc/smc_clc.c +@@ -372,7 +372,9 @@ int smc_clc_send_decline(struct smc_sock + dclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline)); + dclc.hdr.version = SMC_CLC_V1; + dclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0; +- memcpy(dclc.id_for_peer, local_systemid, sizeof(local_systemid)); ++ if (smc->conn.lgr && !smc->conn.lgr->is_smcd) ++ memcpy(dclc.id_for_peer, local_systemid, ++ sizeof(local_systemid)); + dclc.peer_diagnosis = htonl(peer_diag_info); + memcpy(dclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER)); + diff --git a/queue-5.5/selftests-install-settings-files-to-fix-timeout-failures.patch b/queue-5.5/selftests-install-settings-files-to-fix-timeout-failures.patch new file mode 100644 index 00000000000..d69a037bacb --- /dev/null +++ b/queue-5.5/selftests-install-settings-files-to-fix-timeout-failures.patch @@ -0,0 +1,79 @@ +From b9167c8078c3527de6da241c8a1a75a9224ed90a Mon Sep 17 00:00:00 2001 +From: Michael Ellerman +Date: Thu, 20 Feb 2020 15:42:41 +1100 +Subject: selftests: Install settings files to fix TIMEOUT failures + +From: Michael Ellerman + +commit b9167c8078c3527de6da241c8a1a75a9224ed90a upstream. + +Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second +timeout per test") added a 45 second timeout for tests, and also added +a way for tests to customise the timeout via a settings file. + +For example the ftrace tests take multiple minutes to run, so they +were given longer in commit b43e78f65b1d ("tracing/selftests: Turn off +timeout setting"). + +This works when the tests are run from the source tree. However if the +tests are installed with "make -C tools/testing/selftests install", +the settings files are not copied into the install directory. When the +tests are then run from the install directory the longer timeouts are +not applied and the tests timeout incorrectly. + +So add the settings files to TEST_FILES of the appropriate Makefiles +to cause the settings files to be installed using the existing install +logic. + +Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") +Signed-off-by: Michael Ellerman +Signed-off-by: Shuah Khan +Signed-off-by: Greg Kroah-Hartman + +--- + tools/testing/selftests/ftrace/Makefile | 2 +- + tools/testing/selftests/livepatch/Makefile | 2 ++ + tools/testing/selftests/rseq/Makefile | 2 ++ + tools/testing/selftests/rtc/Makefile | 2 ++ + 4 files changed, 7 insertions(+), 1 deletion(-) + +--- a/tools/testing/selftests/ftrace/Makefile ++++ b/tools/testing/selftests/ftrace/Makefile +@@ -2,7 +2,7 @@ + all: + + TEST_PROGS := ftracetest +-TEST_FILES := test.d ++TEST_FILES := test.d settings + EXTRA_CLEAN := $(OUTPUT)/logs/* + + include ../lib.mk +--- a/tools/testing/selftests/livepatch/Makefile ++++ b/tools/testing/selftests/livepatch/Makefile +@@ -8,4 +8,6 @@ TEST_PROGS := \ + test-state.sh \ + test-ftrace.sh + ++TEST_FILES := settings ++ + include ../lib.mk +--- a/tools/testing/selftests/rseq/Makefile ++++ b/tools/testing/selftests/rseq/Makefile +@@ -19,6 +19,8 @@ TEST_GEN_PROGS_EXTENDED = librseq.so + + TEST_PROGS = run_param_test.sh + ++TEST_FILES := settings ++ + include ../lib.mk + + $(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h +--- a/tools/testing/selftests/rtc/Makefile ++++ b/tools/testing/selftests/rtc/Makefile +@@ -6,4 +6,6 @@ TEST_GEN_PROGS = rtctest + + TEST_GEN_PROGS_EXTENDED = setdate + ++TEST_FILES := settings ++ + include ../lib.mk diff --git a/queue-5.5/series b/queue-5.5/series index 58c8e9e6bb2..2296a361302 100644 --- a/queue-5.5/series +++ b/queue-5.5/series @@ -130,3 +130,6 @@ net-atlantic-fix-use-after-free-kasan-warn.patch net-atlantic-fix-potential-error-handling.patch net-atlantic-possible-fault-in-transition-to-hibernation.patch net-atlantic-fix-out-of-range-usage-of-active_vlans-array.patch +selftests-install-settings-files-to-fix-timeout-failures.patch +net-smc-no-peer-id-in-clc-decline-for-smcd.patch +net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch -- 2.47.3