Message ID | 1518446598-24238-1-git-send-email-ophirmu@mellanox.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8E3DC1B367; Mon, 12 Feb 2018 15:43:36 +0100 (CET) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50057.outbound.protection.outlook.com [40.107.5.57]) by dpdk.org (Postfix) with ESMTP id 663061B352; Mon, 12 Feb 2018 15:43:35 +0100 (CET) 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=7IJzQcsoeeTpDR9F0EIoH1KwZuP3VAFQHV3USiJG8gY=; b=hvod1dVIkXWiIsr7VfEPwIw4MUtUcBPaj6ccj8uqB3agq54YmIrc5xuVDkKiAryIe5SmbPPpwFPSXW9gjCkMrjPxH5bmi6h3TAf2aMerzse6DI1n6vnrO8jb5I2Z+XFyPb+BkojoOoL3zHcjMkGyRJGftwCejRWGVbNTIK/mT0k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by VI1PR0502MB3887.eurprd05.prod.outlook.com (52.134.6.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 14:43:32 +0000 From: Ophir Munk <ophirmu@mellanox.com> To: dev@dpdk.org, Pascal Mazon <pascal.mazon@6wind.com> Cc: Thomas Monjalon <thomas@monjalon.net>, Olga Shern <olgas@mellanox.com>, Ophir Munk <ophirmu@mellanox.com>, stable@dpdk.org Date: Mon, 12 Feb 2018 14:43:18 +0000 Message-Id: <1518446598-24238-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0701CA0055.eurprd07.prod.outlook.com (10.168.131.145) To VI1PR0502MB3887.eurprd05.prod.outlook.com (52.134.6.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 433c607d-0364-41a9-1e63-08d57226fd7f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:VI1PR0502MB3887; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0502MB3887; 3:Dnkr+liQRTtYaf1y6/0GBcjSI+sqUzJCv9qQr/c9sQwPIZPO6d9Hrn88sR33EdM0Q+tRb6f/Z0ErZRvSYeIn8asE/Tqba27q0T2jLb931dlXNbbxXxUHDLRyaTTnJEDC9BaapMN2510e43Kgqb13W1tVonBCaO4oCv9mIWv1RTjxnBVyBfWm4G58B1o0UcrODLgyZ3mqUDVGcYjrYvkRwStmV5FEB8wxAoIcBtcg+Xni3iK5XIYn0GDANC1OziQP; 25:xjPf7YDyI14sRnNOAdhmrhx8ORnS5PBKXCyOfP1wWVzuFw0tXHGnf23mirbmHM9/Lw5+zkJ/VMD5nI+gm5Gsj5Do/IilsUuQzxAauT3K6E18Ky9F2AgYAiEmuNosBU1qcOlh02/iLpMXUhbEklnFecyO1pokabwvawPvV6P6ZRDUiMyr1+76d+CTnBrnmpP9mh/b1/jwVxh8qUEko4CUos3b8+Xs8PZPjvTvJ14Bjt3WgNTVIbS2nDi7inT1SCJUSxKpqNqm3W6pz8GnDo0hwJnguGTIuFaduSYkc90sUUsEQmiY12aYaaaFb9zrbuWxIemM/kavM/u+VXIPea31jA==; 31:0b3GU3QZIXFOe0Q3vJZGTMYuZvc53cPw2xO/HN2iQ0IGlYLI9jBeGaFLVTfX4GaHcizAhl87WEBuGQg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E/Ur4jrvZLrLdLjgWQVqg/QaZ8yoIVNr X-Microsoft-Antispam-PRVS: <VI1PR0502MB38878BA8872A7DF06A947A3ED1F70@VI1PR0502MB3887.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(20558992708506); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041288)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:VI1PR0502MB3887; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0502MB3887; X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(396003)(376002)(39380400002)(366004)(199004)(189003)(16526019)(186003)(5660300001)(53936002)(97736004)(36756003)(55016002)(26005)(7696005)(52116002)(51416003)(4326008)(25786009)(7736002)(69596002)(105586002)(66066001)(6666003)(305945005)(6916009)(47776003)(4720700003)(6116002)(68736007)(33026002)(478600001)(86362001)(50466002)(106356001)(3846002)(575784001)(21086003)(48376002)(8676002)(2906002)(81156014)(81166006)(50226002)(54906003)(316002)(8936002)(16586007)(386003)(168613001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0502MB3887; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0502MB3887; 23:Mk7NKG3K3oRdbBbQIP47SOOOR6octnI8dQHTRba?= yv+2rubLvqFt6PMIb7yU5P0LvlaS442NO9EJfo+5AyBCcjifn2YpZhOpa4tWbSy0zSKjk/lXpxZXSPTQ052srJhFxMvaIAcXDrUP1wJeyqhxkCkmmwdKJvqbZbf5A+b2Q1XqMOVWZ+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B3887; 6:tXQYbxLjMnG1M2z/qXeDgS2qbEdka8392S65CNqAqnAaBqxUf4PbQOBGx9neXJdjFB9+OSBKphxeqcrLZnp5LowqYernx/yFtoVX8PMmgGp2lEic3mF7+AB51QeTls1MVRtfjRusuQotZXjJLFMcc83O1IW9Kw5hkfPJq/ZNAk1xbmWOs8tT4uq1rPjqGn3LL/QI5dbGdXHbyBf0+ookTnqQPaKCMwDSRNuPoRUerFOj3aZ3y9n7TXZsCmVz6/OlLvBRA1qhIJw2QE1Fo/1DaqP/B79aTCEsbS6XyLqa0RyQsrzvq/ZweVHSnPBKgi6pu7QS8rrANJSi97IXYCmgEtCfcgKnv2/NFyPVu7BNJw8=; 5:hmhbVaD//mTz/V/WkrqihWIsU2cLQN0Qt2pGMS56QpgdbsI4n5Ua3urP4Vb/V2/yTf75FlT1Ul62LyrloBmWA3aMcg9mHlmJTa8EHXsUlla1LJq7aDMM62niB9BWOjh3KvQVXU/nBnF6p72YwZsgjMtzN0L+dwCacmYMX3W2kzs=; 24:TRVkYNSsRVK8uT8zcLVB3ZN212hJEjzbgBvI03+Myxnh1+sC9gb71Q1kOYzPObTyaH8BjF+v8OwYB/+FlxzWAaZW7l0eSD9LzXwrK7kk/WU=; 7:Fmn4DCMuYZRFGqoU1RO9J3uOgTL+UYUq46Nt9xDVrC2a+kJRknDCMUZ+19nRGq3/X/ASO8spJBHBTE7977I0zH3pLC58CfR1rBswjTbqrxOPkSZh7F50EIdKSijbR19EJDoMdtHp1+iLRnBw9gFtHeVRjvnOgXRtc3E+FiCifub9JaX2K3plmro47g3hSlFMkBVlpa2ElctMF1vIrLmcL1UqnVl/ViRYC0BMPC563L5eSpV6lq9MszX7KLaVssd/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 14:43:32.1489 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 433c607d-0364-41a9-1e63-08d57226fd7f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3887 Subject: [dpdk-dev] [PATCH v1] net/tap: fix CRC stripping capability report X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Ophir Munk
Feb. 12, 2018, 2:43 p.m. UTC
CRC stripping is executed outside of TAP PMD scope. There is no
prevention that TAP reports on Rx CRC stripping capability.
It is especially required when TAP is operating as failsafe sub-device
with another PCI sub-device which supports CRC stripping.
In the corrupted code TAP did not report on this capability which
caused failsafe to not report on it as well.
The fix is for TAP to report that Rx CRC stripping is supported.
Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
drivers/net/tap/rte_eth_tap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Comments
The title should be "add CRC stripping capability". 12/02/2018 15:43, Ophir Munk: > CRC stripping is executed outside of TAP PMD scope. There is no > prevention that TAP reports on Rx CRC stripping capability. We could mention that the CRC stripping is done in the kernel. > It is especially required when TAP is operating as failsafe sub-device > with another PCI sub-device which supports CRC stripping. > In the corrupted code TAP did not report on this capability which > caused failsafe to not report on it as well. You discover the bug with failsafe but it is not related at all. I think you squeeze this part of the explanation. > The fix is for TAP to report that Rx CRC stripping is supported. > > Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API") I don't think it is a root cause. This capability is missing from day one: Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") > Cc: stable@dpdk.org > > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Will issue v2 with commit message updated > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Monday, February 12, 2018 7:55 PM > To: Ophir Munk <ophirmu@mellanox.com> > Cc: dev@dpdk.org; Pascal Mazon <pascal.mazon@6wind.com>; Olga Shern > <olgas@mellanox.com> > Subject: Re: [dpdk-stable] [PATCH v1] net/tap: fix CRC stripping capability > report > > The title should be "add CRC stripping capability". > > 12/02/2018 15:43, Ophir Munk: > > CRC stripping is executed outside of TAP PMD scope. There is no > > prevention that TAP reports on Rx CRC stripping capability. > > We could mention that the CRC stripping is done in the kernel. > > > It is especially required when TAP is operating as failsafe sub-device > > with another PCI sub-device which supports CRC stripping. > > In the corrupted code TAP did not report on this capability which > > caused failsafe to not report on it as well. > > You discover the bug with failsafe but it is not related at all. > I think you squeeze this part of the explanation. > > > The fix is for TAP to report that Rx CRC stripping is supported. > > > > Fixes: 95ae196ae10b ("net/tap: use new Rx offloads API") > > I don't think it is a root cause. > This capability is missing from day one: > Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD") > > > Cc: stable@dpdk.org > > > > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 9d39384..f09db0e 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -261,7 +261,8 @@ tap_rx_offload_get_port_capa(void) return DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP; } static uint64_t @@ -270,7 +271,8 @@ tap_rx_offload_get_queue_capa(void) return DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | - DEV_RX_OFFLOAD_TCP_CKSUM; + DEV_RX_OFFLOAD_TCP_CKSUM | + DEV_RX_OFFLOAD_CRC_STRIP; } static bool