From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30048.outbound.protection.outlook.com [40.107.3.48]) by dpdk.org (Postfix) with ESMTP id 4B8D4DED for ; Mon, 30 Apr 2018 14:24:08 +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=d/Luacd0cMT8325wi0R1Pb2C2IMwLsQqVcAer+fT9iE=; b=KXpNeswWXkedO1YzdJ8A+20K7L2ree1zmDy5A/k4mqXyGQni6oxc9l99S9Agkbz5Odq1Z/tCqVeTbrkL0ZDMcngpH9hsJtrA4Uk57rfiprZ4COBfmJptOY6ZSdHsX4SnShz8jN43bycFUuQR+iD/LsJJUEK0MynorVcAkSh78Pk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by DB6PR0501MB2312.eurprd05.prod.outlook.com (2603:10a6:4:4c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.18; Mon, 30 Apr 2018 12:24:05 +0000 From: Ophir Munk To: Ophir Munk Cc: stable@dpdk.org Date: Mon, 30 Apr 2018 12:23:52 +0000 Message-Id: <1525091032-10700-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: VI1PR08CA0125.eurprd08.prod.outlook.com (2603:10a6:800:d4::27) To DB6PR0501MB2312.eurprd05.prod.outlook.com (2603:10a6:4:4c::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2312; X-Micro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cHNOJ/gwjIuvaOeU0DPe/zwvLUQbU2YZamgXBVRp3bNS3pEbY6teG8jnbmfWECrapKkvlpB/5IgIE3km88I1q6j1+Ihqj2b9pK4C2uminB1DuSrI+5EvTt3WM4cAvsaZjP6wU+srLw+d2azKLz/zyFxV4uWxIiSmnRKZbgCvlrP74e4k+VbWR7fLX+3OUApC2ntmQRLgagKaEAA66EMoCRSkAMTVS6YPgzMmJNR0srYQv46zVab8sh512foBd++jw9HYS740bB8hg9uYIzohr6qhvWvn09Bm/88dCNCeFV1wnZRZfda07gPim9tdE3Sm8TFY+Mo6a7KEL+ChnmNpqpbLi7Px0A+UYcKviT1vVEdZxEf4UkegqS9VHU3qlbLbsXXN/PwFKxCK5JYur; 4:yNyPEBYli0HmishQoUI1NB9f5FWId7NgCeiTmq3AKbftyjziyrqnu+/9kmGxBu2R8mKyMqWzD4IggPa0596ZJo5LT43xcaskb/69eHQYFTYyxcCyL5e56EGhThL/qKGU/ZRtHkLaerriOdPcTf7J9V9d1HZXAUBbpFQKULq2uTCIVluwk+8dDN2M+n6ih2o6pd9UQy00TeCJIn4FquwU766b6o21hkGaqfkIUEYdjOC3jHRVNishlYk9HPagk03SCIgPmhjPv4DmL/e0VaOv5A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231254)(944501410)(52105095)(6055026)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:DB6PR0501MB2312; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2312; X-Forefront-PRVS: 0658BAF71F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(366004)(376002)(39860400002)(346002)(189003)(199004)(305945005)(3846002)(6116002)(2906002)(478600001)(68736007)(5660300001)(6666003)(55016002)(25786009)(4720700003)(86362001)(7736002)(53936002)(26005)(81166006)(8676002)(6200100001)(8936002)(16526019)(81156014)(69596002)(47776003)(36756003)(7696005)(51416003)(4326008)(16586007)(21086003)(37006003)(386003)(105586002)(956004)(6862004)(48376002)(50226002)(2616005)(66066001)(476003)(106356001)(316002)(52116002)(33026002)(7049001)(50466002)(486006)(97736004)(168613001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2312; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2312; 23:ytB0SMjDX08BRp3bxFKjghUoR5YwDw0+M5dUYdL?= =?us-ascii?Q?kFNjLzyKeI8f2ordZYTjH1S3Hy+97Kpms7KlncfOgiZPvSCcbZawk0A/JHMQ?= =?us-ascii?Q?xPbrGb9drrNpUy8DcdkQ1RRGqoUJvkXb3WAdYHnQX5FKlnzNXISMQZVAQz78?= =?us-ascii?Q?AVrarDbD23ZOtG3geyAbWEi3yRoOGq9fNi+rHRD/ayv/ei1z5w1DJpf0zkPt?= =?us-ascii?Q?jQWS1/ieEMzLv92TNDIR71wQjVwNMF0nL1wTuC0zNvpTuh8pJAm9e65flrIX?= =?us-ascii?Q?gQzw/QwRgiNGBy113zLMSWFmiY0k5NGR7I/qqMX6XaqRXcDcC01bIbxLqe7P?= =?us-ascii?Q?mW6OS9ftsXU+roKKxmYFgCIPFgakAJkGNkT9hvWtlVkjfhOC5BbgwhE3rDcw?= =?us-ascii?Q?KK2BtsZCT3ooXep+rdyrJMynX82Ly+c6gPGDsU27wt7UIJSKzTLGdA+AxjSX?= =?us-ascii?Q?OOEApyGFafIRILxLq+OlG3ENS2NSHqvvU3A34UGZM+EESwrUvkUv9WHtcBMb?= =?us-ascii?Q?zdtCnEnmSAqPnwyYfD4MJ49j3UX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aV4R0YYGLW2357IH2U0rUwoVomuTSQ X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2312; 6:MhMClfpPuD9f7ylLAnhv7gzSMpxjIwJ+34t/+cvNcorasJjRp9Qu3dEWk+wvCn2U2sbBtSekL5n7FwSNpQnIcwGuX6npzBHlCKSRcNbO5JuNMAzzn9KHevIkT0VtJlrPcw87RrKbapxcz/3tu3GAiNnKzEJdD5gdWV1mUQOj3PQV9sRHqlaxTj7YZVe6CvH7SKN26DvWwWETvlxcnCp3yjV9V18P5k9KLLp1ZPdSmylZOZZakxwc9oXTYD9dFByQCoYeVJixp4Ain3T3Y7SVhglKqC05RmPVjyv7dDovJsy1qlYo5ya9JhVQsiiDy3cmCuBVn7LhJuB4VlxkwAxJZsPUYfbiaVxqERfvM5loZOw05Hy8mlhXWEfev63WXVu5JxBH4mIEjPhU2BlpkczuSfsn5fwbMLUrTzxrslxN+bQWXVErklv+Og9g2lOawxjBf3WgFWQj6gAZpAstSLC7qw==; 5:c5hGNLP7+RvuOQhr3jknCM8Ibx1gs9EpX/QOEwMMJjVFwpFVQcsSLhaG3FDtMp2SjIlRWmyN6IdgvSfkiFU7uG/WerNdOXxch7cnFYHlDP/ABDkYoys7OTLnbAM9Xvc52ZaH753ocguYmoEpUPhbQyjiP/jgAMoXAHOlG2HXPtw=; 24:r4jJi1fXV5ki1+58PXkziV1mow3LguJLjEoQTLPBXVIUNqzQ2ywrCQsEyc6B1EeU1TImg3WJk/sY9awsRZ88cyUUZYtfgoeL5FyivM0iJlk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2312; 7:J4aHWMiMYqfRTJ+g2JW/3oAYtK/kExnhnhF1julUzoQs5jz2ZIw0Cie6HQN5+giPAb7HObPu9udzrp67TZSbd/la/jAcHO56uQkiiOFmf1IYDFXH0Kiq3OWjaofebvwn36eNV+XeYu20XJgXV9vvCK/VtOMROTLelww73bVa3D4rTtRDWm+s5m7AH60jAoK9FeiLUmJWEfg9/YViXXQDxY0zTVljAZ6ySeAIOoHYD/b7dJgBijD2PphWkKU7ylok X-MS-Office365-Filtering-Correlation-Id: f50be6dd-832d-44d6-1d2a-08d5ae95446d X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2018 12:24:05.8373 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f50be6dd-832d-44d6-1d2a-08d5ae95446d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2312 Subject: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report 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 12:24:08 -0000 There are two capabilities related to CRC stripping: 1. mlx4 HW capability to perform CRC stripping on a recieved packet. This capability is built in mlx4 HW. It should be returned by the API call mlx4_get_rx_queue_offloads(). 2. mlx4 driver capability to enable/disable HW CRC stripping. This capability is dependent on the driver version. Before this commit the seccond capability was falsely returned by the mentioned API. This commit fixes it by returning the first capability. Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling") Cc: stable@dpdk.org Signed-off-by: Ophir Munk --- drivers/net/mlx4/mlx4_rxq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c index b430678..88e5912 100644 --- a/drivers/net/mlx4/mlx4_rxq.c +++ b/drivers/net/mlx4/mlx4_rxq.c @@ -658,10 +658,9 @@ mlx4_rxq_detach(struct rxq *rxq) uint64_t mlx4_get_rx_queue_offloads(struct priv *priv) { - uint64_t offloads = DEV_RX_OFFLOAD_SCATTER; + uint64_t offloads = DEV_RX_OFFLOAD_SCATTER | + DEV_RX_OFFLOAD_CRC_STRIP; - if (priv->hw_fcs_strip) - offloads |= DEV_RX_OFFLOAD_CRC_STRIP; if (priv->hw_csum) offloads |= DEV_RX_OFFLOAD_CHECKSUM; return offloads; -- 2.7.4