From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id C0DF85B3C for ; Mon, 30 Jul 2018 18:20:05 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAsD-00009D-2s; Mon, 30 Jul 2018 16:18:17 +0000 From: Christian Ehrhardt To: Andrew Rybchenko Cc: Ivan Malov , dpdk stable Date: Mon, 30 Jul 2018 18:13:11 +0200 Message-Id: <20180730161342.16566-146-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'net/sfc: move Rx checksum offload check to device level' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:20:05 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From b943c5d49dfe64ffb3151c0bad65ba87aded9dbc Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Sun, 15 Jul 2018 10:56:13 +0100 Subject: [PATCH] net/sfc: move Rx checksum offload check to device level [ upstream commit eacbad76325e592f9f6a7601d35b176887777044 ] Rx checksum offloads are on device level and should be checked and enforced on device level. Avoid logging of Rx checksum offloads enforced for each Rx queue. Fixes: ff6a1197c3b1 ("net/sfc: convert to new Rx offload API") Signed-off-by: Andrew Rybchenko Reviewed-by: Ivan Malov --- drivers/net/sfc/sfc_rx.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index cc76a5b15..dd23e7464 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -817,10 +817,8 @@ sfc_rx_get_queue_offload_caps(struct sfc_adapter *sa) static int sfc_rx_qcheck_conf(struct sfc_adapter *sa, unsigned int rxq_max_fill_level, const struct rte_eth_rxconf *rx_conf, - uint64_t offloads) + __rte_unused uint64_t offloads) { - uint64_t offloads_supported = sfc_rx_get_dev_offload_caps(sa) | - sfc_rx_get_queue_offload_caps(sa); int rc = 0; if (rx_conf->rx_thresh.pthresh != 0 || @@ -842,14 +840,6 @@ sfc_rx_qcheck_conf(struct sfc_adapter *sa, unsigned int rxq_max_fill_level, rc = EINVAL; } - if ((offloads & DEV_RX_OFFLOAD_CHECKSUM) != - DEV_RX_OFFLOAD_CHECKSUM) - sfc_warn(sa, "Rx checksum offloads cannot be disabled - always on (IPv4/TCP/UDP)"); - - if ((offloads_supported & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) && - (~offloads & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)) - sfc_warn(sa, "Rx outer IPv4 checksum offload cannot be disabled - always on"); - return rc; } @@ -1424,6 +1414,8 @@ sfc_rx_qinit_info(struct sfc_adapter *sa, unsigned int sw_index) static int sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode) { + uint64_t offloads_supported = sfc_rx_get_dev_offload_caps(sa) | + sfc_rx_get_queue_offload_caps(sa); struct sfc_rss *rss = &sa->rss; int rc = 0; @@ -1449,6 +1441,18 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode) rxmode->hw_strip_crc = 1; } + if ((rxmode->offloads & DEV_RX_OFFLOAD_CHECKSUM) != + DEV_RX_OFFLOAD_CHECKSUM) { + sfc_warn(sa, "Rx checksum offloads cannot be disabled - always on (IPv4/TCP/UDP)"); + rxmode->offloads |= DEV_RX_OFFLOAD_CHECKSUM; + } + + if ((offloads_supported & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) && + (~rxmode->offloads & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)) { + sfc_warn(sa, "Rx outer IPv4 checksum offload cannot be disabled - always on"); + rxmode->offloads |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM; + } + return rc; } -- 2.17.1