From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 6BD57F3E for ; Mon, 30 Apr 2018 16:55:08 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id p5-v6so8310531wre.12 for ; Mon, 30 Apr 2018 07:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bbp5ZJs7IA5zMJswurnHWid7JtBi4wn1IQizZozr1YY=; b=FoizkR881pJng0Ije9ziUPuFC4YF/63qOcdUk1B+K47tAOCuaaXdegQegkAT8rgFMM JGdm2v0psWkm0RQVSangd0WEa6DeVcto3FrGcSfAIbKAEwuiH+XO77yBpiBJwSoAcCTj MuHV58d/+0K+tb6/ZzdiBdxgq9mSnX9bM8huXEnFsJkGBdyTqBR+g6mVKBqnedIXZC9Z w10J4ohmfPad5FDkvQKLcxiseXaW5wLxUHoHHqPCYpiidabkkbx5JLqY/FrJSgbNh4KM ZJOzi33Hnxbm8MihJAPTRvAybKknJuff0z56Mlj3iIJIzbONOZ0xzSxqlGp0RZr9XR5E ZGxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Bbp5ZJs7IA5zMJswurnHWid7JtBi4wn1IQizZozr1YY=; b=YZ5mSIAHAPPE3OYQrHZw9hFwpc3Y6EeiiKhwdwXvrPpIo/YKdeTCeNm1T6ybI1R/63 2I3DfQkT62j5h+OFFpcGl3EVXxLdsPoqy65KqAICuz47RTEUIHPx+xaF5/t2ru6iD7CQ D1nNHdUYd8Bj58sHYnSEc5nktkQ0Gv2GNTeI2CkeF6qsSJhUnMdQoIyw6sZdduDaRrBU V2W5yhblw1rLsCIvh/d4q+uKo8+2FtKowhJpaaJDxLkY5LS5Ci/q2kzywZDTiXSyCxc8 rIehyfVS9PHTSbOCJGxtYbskxyzQUUFBOD/wlIobdNgAZcULwQ2Gkg+TAXpwP45HsevA wkOQ== X-Gm-Message-State: ALQs6tDTSzysC9YEiYL01aVVUkYf1qAmyjgVH1qKFr+Z4U/I16+8TM5V peNbmIPN36lQAKIDIBiwzSI= X-Google-Smtp-Source: AB8JxZq4MlUp5YddQbhty+jVD8FObLdLuD/LQQySWEncVu0yPA2cJce49B8JbmlT+uLfrU16wTUaww== X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr9311393wrd.205.1525100108143; Mon, 30 Apr 2018 07:55:08 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id a10-v6sm9849117wri.10.2018.04.30.07.55.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:55:07 -0700 (PDT) From: luca.boccassi@gmail.com To: Ophir Munk Cc: dpdk stable Date: Mon, 30 Apr 2018 15:54:00 +0100 Message-Id: <20180430145402.23057-41-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430145402.23057-1-luca.boccassi@gmail.com> References: <20180430144223.18657-85-luca.boccassi@gmail.com> <20180430145402.23057-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/tap: return empty port offload capabilities' has been queued to stable release 18.02.2 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 Apr 2018 14:55:08 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From b3f92645149b009c1488c022b0d934f69c89d0ad Mon Sep 17 00:00:00 2001 From: Ophir Munk Date: Thu, 26 Apr 2018 11:13:02 +0000 Subject: [PATCH] net/tap: return empty port offload capabilities [ upstream commit ead63dd3181c9fdf4a191072f622ad2b934a4b9f ] Fix internal report on port specific offload capabilities to be 0 (no capabilities). Before this commit port capabilities were a clone of queue capabilities, however the current TAP offload capabilities (e.g. checksum calculation) are per queue and are not specific per port. This commit fixes an internal validation check for new configured queue offloads. The port capability API keeps reporting all queue capabilities as port capabilities. Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API") Fixes: 818fe14a9891 ("net/tap: use new Tx offloads API") Signed-off-by: Ophir Munk --- drivers/net/tap/rte_eth_tap.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index a55bf8463..7f85d4133 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -255,14 +255,9 @@ static uint64_t tap_rx_offload_get_port_capa(void) { /* - * In order to support legacy apps, - * report capabilities also as port capabilities. + * No specific port Rx offload capabilities. */ - return DEV_RX_OFFLOAD_SCATTER | - DEV_RX_OFFLOAD_IPV4_CKSUM | - DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM | - DEV_RX_OFFLOAD_CRC_STRIP; + return 0; } static uint64_t @@ -389,13 +384,9 @@ static uint64_t tap_tx_offload_get_port_capa(void) { /* - * In order to support legacy apps, - * report capabilities also as port capabilities. + * No specific port Tx offload capabilities. */ - return DEV_TX_OFFLOAD_MULTI_SEGS | - DEV_TX_OFFLOAD_IPV4_CKSUM | - DEV_TX_OFFLOAD_UDP_CKSUM | - DEV_TX_OFFLOAD_TCP_CKSUM; + return 0; } static uint64_t @@ -652,7 +643,8 @@ tap_dev_stop(struct rte_eth_dev *dev) static int tap_dev_configure(struct rte_eth_dev *dev) { - uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa(); + uint64_t supp_tx_offloads = tap_tx_offload_get_port_capa() | + tap_tx_offload_get_queue_capa(); uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads; if ((tx_offloads & supp_tx_offloads) != tx_offloads) { @@ -1157,7 +1149,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev, " or supported offloads 0x%" PRIx64, (void *)dev, tx_conf->offloads, dev->data->dev_conf.txmode.offloads, - tap_tx_offload_get_port_capa()); + (tap_tx_offload_get_port_capa() | + tap_tx_offload_get_queue_capa())); return -rte_errno; } } -- 2.14.2