From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0075.outbound.protection.outlook.com [104.47.0.75]) by dpdk.org (Postfix) with ESMTP id 056BA5F16; Thu, 26 Apr 2018 13:13:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YpXHrlFqEwBSD+asvlE7ypoPbRF4UCz9vHITuk/KZXc=; b=tIId0SVmv7dGFichct2/MPf5lASqRfYPaNnHyErL1LA4BO0bwo2IylIxLSXQoi1k42PO+lzBBAeaXEiMxybx1nt9dBGq7kwylxvMjPlaE187HovXeej7ewG8LJqzOCCHnKTtCUVLtgxadOKpYBICLsBvbtNw9wylC1+k/prqjEA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR0501MB2313.eurprd05.prod.outlook.com (2603:10a6:3:27::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Thu, 26 Apr 2018 11:13:26 +0000 From: Ophir Munk To: dev@dpdk.org, Pascal Mazon Cc: Thomas Monjalon , Olga Shern , Ferruh Yigit , Ophir Munk , stable@dpdk.org Date: Thu, 26 Apr 2018 11:13:02 +0000 Message-Id: <1524741182-5758-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1524672957-4018-1-git-send-email-ophirmu@mellanox.com> References: <1524672957-4018-1-git-send-email-ophirmu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: PR2P264CA0008.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::20) To HE1PR0501MB2313.eurprd05.prod.outlook.com (2603:10a6:3:27::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2313; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2313; 3:W0BgNogxWBQhkC8JnYF+srwZzXDH8a2RUWj6O0BRB3tTO8s96+V+ChA7/XriETidVcJPLDylswZ6uSGOZx8NQ00e9ttLH4u1lT5UTpFJLJGHYAMO3gYVxmbejC88GoLmHvCYX1xVdv+pEKMvdbTZjp2jYcCb3aH2IpTAoMswtBDsC5TRXJMSfPm2CQRptxVpVWa7D8vre9UwyjsJPQNnS33/Agnf/iFBPs1H2hLB7F0iW8K+5UyoMktSYvEs8NAR; 25:t7UYqtD3k4PpXi7Dq4+huMHT7WFYQV5W/526p0syD7HqE/HCHDkAIhowkjhA05DUHNAj3ZC0zRGbxnTiNbOtoZPIapC+ueirFjwg7HocmYFk6rifqNyWlQFF8oApLOIQsCW5nluvVwkYznp+SlDu0Y2APinmJPSlNGViMIhGLHId9/6uxBzG+4/nWvTF9asZA09OstkN3I5kGOUBCB4y7p1+XRij+utpdBYegakQAqP9A+l4w6CIEVl3g8iUmrQjPyc4wiieUH7sRU6FtLNpWfFGv6GeJJdDynEFeCzeF0bfcy77LtxGJa+VRcJoWNuLFRiE3HBOMD9MUk0I8tDhqg==; 31:HbaTtJ4jHCqkDl+/8+01USNDN+MFL+QTnruXjkEH1h9Yw7QI8b07BLBAO1SID7T9Hx7kHP6/ytb850dW+GoSiH91Fi56WjKF/KDzfTeorinGLAT5aCuTXsVSS6bBeW2tcZP+2v4Hfis9TaMSSXy8lJ1/96IZ3lXn5+SaRo4+qP1u+Z+8zam98wMkC1N0QtaT/POSgEwUFUo8J6vg+2k57KMiWRCIZWcCchc7yJDBH8E= X-MS-TrafficTypeDiagnostic: HE1PR0501MB2313: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2313; 20:DiZSKEJphb/AwO5rkWT6d7/aFwxbXvQmN3BvU+XiQbeS608DnXnT56+5vSp/k+SSzACt33XewFqc5OJUEj5S7VGzvV3V61X1D11F16O2RRmVRsN47fxT1Fs63+i6ZL1baMGvEJYAvgIvrKg+tLky0KWpo6DFKwFrJd8z0Bkt2vtrq1q/elr+8BpxlqMTRXoML4oD8EqFh+T2Qb0L3HGd61sLhH85pJqUiv63u/pVfBU+yxuW3sVagHNllanr3TLVOldyCw2gLuvZ1+i87mBAY2KUMIsdFi/oSL9TimMHj6i5wD2xzBVvwRZZFqlqYbJJ5DBT4PtNWktlGjW9Wi52OZKmyELDneKV6MkmmAgCvDdBH2HW3sbZUAliNeGcxbyKN1MqYLU0vrnLpYaV6wvGurwtTJUSqThBgJeS9dDlt36R2RavEimgGl5BTQU9+fr5iqjzk7IBgkGynz5PPX4i9tu1q+Np8aZ5YvmqkZzWkMZM423IlL5NbC+Fa5VmjPFv; 4:pycGTkXhwl4Ey7UmBqdL7AseCeGGYtZFlLREV/gUFklzFwjzdLvYIhS1zcTWVRqOr5z8Z3ZzMTROSP4o7v71wjLP87AuwbNJUuPcGO1GFHppWqapB123bRrcGm8A6yK+aN0j/aIFgibcRA4k2jVUYJWDp3BFhXZyP3Vd3zQ+0fBiSfom4gRZEgisz6C8LE+wl/PWJOZP/OVjggDMJ33QK7ZxpucnFrWtVP+ob5YJQOfFjunBd8AnGK6RCi1UvIS1I3KMmRQ3VMvYn0a0e94iKZkX/qcXY+hEWXC9KKhzg5/H3cT81m69wn62IUqcJL4n X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231232)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:HE1PR0501MB2313; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2313; X-Forefront-PRVS: 0654257CF5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(39380400002)(376002)(346002)(199004)(189003)(76176011)(51416003)(4720700003)(53936002)(69596002)(6916009)(478600001)(52116002)(486006)(33026002)(476003)(8676002)(86362001)(81166006)(105586002)(97736004)(6666003)(8936002)(7696005)(81156014)(36756003)(11346002)(16526019)(2616005)(956004)(2906002)(25786009)(50226002)(68736007)(186003)(21086003)(305945005)(47776003)(26005)(59450400001)(106356001)(4326008)(446003)(5660300001)(66066001)(55016002)(7736002)(54906003)(3846002)(6116002)(16586007)(48376002)(50466002)(316002)(386003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2313; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2313; 23:sopogQusPNV0crkUkqhxCYgooPX9TRFrHAJHBgJ?= =?us-ascii?Q?MahS2ZX8F/RPmcJefXxtSYfE6yhQ+vvs01g4MoyENsRN+fHM/YGAbD9aCtZ9?= =?us-ascii?Q?xImZCExEUBuoCQWZtvsi74iyi9TWTGE8kUno7oveAdjeIDy6Bd1ZZcWje627?= =?us-ascii?Q?i/Va20CTxBqr3m/7OCqXhGe8UDEgZ/gWjfwhf2G5cQbblGxIlN6TSL7kTgc0?= =?us-ascii?Q?Y7ql1zgug/dxQdLd0iQsmYuDdenFyIa6FtZXmUgb2Ae7hgaeAC8q0WTe91VE?= =?us-ascii?Q?HPBL82bzdTYkAZ0jSUOZebfSYqTyAbKbclcwCftoKm6FAUcj2/1SDW9BZvLT?= =?us-ascii?Q?Q9uM1Y6WEZOlk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SPkqBju/mBPqGSSlGZK0YIvSD8Bs17H30w/fluI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2313; 7:TPsFCQJo2bJTHI8VYRDJMXn7kmeoiojIIKs2Z163WI/uzr8EtfNOqgdeotkvwHvyHpidgkVMiGOKyl0Z9ycbX6GZ1rpb1MeEDBOo2EfYAY13oNYo+qtG0NrbZQK4zKzHMtVY/NhGqrpQ0O9FnbZcv8+ggWex8r2E3NsAjgX4jpUTmH4a5REKENhv3Vtftxb3NZnB0BcgZwZQnZOSv1Ts3hUWW0gUwlt+nU+pLB8bUS9vo2OmFci5a+ATAi1ssUNC X-MS-Office365-Filtering-Correlation-Id: 19bc1557-63ae-4c75-114f-08d5ab66bc43 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2018 11:13:26.3037 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 19bc1557-63ae-4c75-114f-08d5ab66bc43 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2313 Subject: [dpdk-dev] [PATCH v2] net/tap: return empty port offload capabilities X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2018 11:13:29 -0000 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") Cc: stable@dpdk.org Signed-off-by: Ophir Munk --- v1: initial release v2: Fix log error message and update commit message drivers/net/tap/rte_eth_tap.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index fe62ab3..b4420ce 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -269,14 +269,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 @@ -403,14 +398,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 | - DEV_TX_OFFLOAD_TCP_TSO; + return 0; } static uint64_t @@ -787,7 +777,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) { @@ -1351,7 +1342,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.7.4