From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0061.outbound.protection.outlook.com [104.47.1.61]) by dpdk.org (Postfix) with ESMTP id 7F3528E68 for ; Tue, 17 Apr 2018 10:33:37 +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=LafqpXHyAe1gOnZWwY7YT4w/+NDqXCGdRwnXLXUzSKM=; b=iq0SaDWd+biBjREPYLXQhgPRN0ynJBHopRy+HJrSBARp8zv3VAojxpKtU/C51bfvraFUlQmW9g+QwEhWoFTKP+nyQzUYhl4ri3Lc0ptj6pfI2l8z4AVmToI+ycyak4E/7aFT6GvAFmIDKbjeBnnSn3EH4y0yt4+zxFelK6WGqOg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by VI1PR05MB4432.eurprd05.prod.outlook.com (2603:10a6:803:42::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Tue, 17 Apr 2018 08:33:34 +0000 From: Shahaf Shuler To: thomas@monjalon.net, ferruh.yigit@intel.com Cc: dev@dpdk.org Date: Tue, 17 Apr 2018 11:33:24 +0300 Message-Id: <20180417083324.13167-1-shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180416060203.57358-1-shahafs@mellanox.com> References: <20180416060203.57358-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [141.226.120.58] X-ClientProxiedBy: HE1PR07CA0002.eurprd07.prod.outlook.com (2603:10a6:7:67::12) To VI1PR05MB4432.eurprd05.prod.outlook.com (2603:10a6:803:42::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4432; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4432; 3:wvaqO6iaEaInigvDq/7tVzN0U4b2LIbON2z51Z8ryWsGI9HN13V7Fp8EWPZR5nTfKOTBzLx5KXpCQYqAfI96RZRPAyChmTyqZPnnjpdbppMo+vpIbF2FOC0hVjYrUb3boNvTS3uUz8GFFKkkR4Ib5jdJWNmvS1MQH2gjhBko+52nr7EF07k5otVmlqI0dAncWVpTG0yHq3hKKDDJksOhbiz3PqQX4e6IwiyozVRpDYmnAT/RVDWu7jbzFYxzuyAj; 25:/UKR1icH4ZYShOlflYPGc1L92aj1ezf3BgwnI806zcHUTAfrmmFxne5K65zluasP3X7YcMMlNeuWuIP1rSIv4BovqTwQdt59E/hG0fBd18TMROLU1kBbVFB0m2SvN/97LGC1fpTFc1dU95Ilk3nwqPlWJT+pTlRbYvubJPqWDi0133Fc5XuTRzF4W/9E7wsN6fHL8xZKPdXmw89aDLUffkfyUp4do03tjMPxPcCdLU9gYQ78Gmir0Zfey7ayJlwYwOuELN3ep7HpDUQCibiZZv9aTL7XLTANfK+qUfsbTsC0s5/gNef/jsAOQwY36OL9u0pG6pBDHGcg22Zlz0spOA==; 31:oZG9tsg7GXuFkB9hqX3YIclvGTJ2q91RBhn4e1eHYQIoPm0C7ENY+xAVumT7QbPGFAKUzrjc2dN2om/X5MbDBpMhJobW/2jH2j/R+sfL0EXvw8w5CpDSgYP+K+nfalRAqC6nnpRDcShenOBn6glaAe/aEThJz9XWfm6sWrW+w3j5Nq5ImcWZEd8+hgk1kRYGi2YDQvRwlbmAy9trnjtJCeSNQeaqJ6VGK36fRUssP4A= X-MS-TrafficTypeDiagnostic: VI1PR05MB4432: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB4432; 20:SDjmn/9DOOH309Fw0npJlEMVj/BpuwmMM+Qdyq4V7lvyabQ27zUzo0MNI2K9WkiIZKC9/YiQv1PT/07s5Meu32fCMMX8UKOOTJR3AI6yc5e+YyynjAQNkAJtviYzSNUVN+lYYWugqlb/c/fIY13EJLrJY01X1YgntXR8MvTczd0BkCmWCmAQIoM/u29LgEbBiKGrl4JWXKGYDuIzfwgCeaOd8lDRWUorpexRihwZxMlPby2W1pF8qXoFtNrVgOko/ENwJhPX4nHUEVE4N1n3RjxMEErZzkEx5PwxCSfX9+Dvhp7wJIVnqbVh7oAljrZyDvcArq5ZpgeLKg2Ft3q9MmgblhQ3352woD36NxaMZzwN0MXejFZUBbg0QkxLUNRftMomirXBKLpBfJGwQzaOlRhzb+l7Rs+Nj+5gVi1XGzrW5zj+jeL71si+VPEw0vsb2bik2L3M91Tw1lPT3yIHimHbPuA8kZUmpTYlNanaBk+J/tG3M/NAnlRHUZcl7Qul; 4:cPCnJn69G8OS5KLKyLAb/NW0WIBSSHGKNeVh7JFRK/nK7xtuUA1NxCF8DgrcsiMTHCFQ3XgIayY3jp+QVBPX7H8wI2abQDRKXqCzB3atCBp0glKvVtuEWnIveH/sjcmhRcBa+p0bBCe5RhRtAjhMmReq70gzNl688l0onlVX6zS5xlkhPPIQLhtoa2yLzvo8hLNu3P0tTrY3RP7ApPIwpEzvk20uUbQwY/m/pvhQ7/WZgKFgnZcIYpKdgfVekFWU5njP68QDthQdZYHaqjwE1Ntk26WiiKxNUWaQ2DaOKNFWR70Jq2Ky4UlPHZPsG4Rk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501327)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR05MB4432; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB4432; X-Forefront-PRVS: 0645BEB7AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(39860400002)(346002)(39380400002)(189003)(199004)(8936002)(486006)(2616005)(5660300001)(53936002)(956004)(36756003)(4326008)(11346002)(97736004)(52116002)(16526019)(76176011)(47776003)(51416003)(476003)(186003)(7696005)(6116002)(3846002)(55016002)(106356001)(446003)(48376002)(25786009)(69596002)(59450400001)(50466002)(66066001)(105586002)(1076002)(2906002)(305945005)(7736002)(16586007)(6666003)(316002)(68736007)(21086003)(478600001)(81156014)(81166006)(26005)(8676002)(575784001)(386003)(86362001)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4432; 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; VI1PR05MB4432; 23:oDZRy99us4us9C1pFKx8mLZkgpngYZnkP0uLYlNjY?= =?us-ascii?Q?hFeQleW6G6P95PHjZHxaZZQChfvhtjTslUqKQ8t9iLyuozcNQwvm4nDM+K+T?= =?us-ascii?Q?9KDgkx/cA5mewVsQeH/cG7XflvYf6dcjAaYixK8Sqawbu0VIeob7Yep8XjYC?= =?us-ascii?Q?lloCGMQJQcE8+HPB3H7JP9cDRph1asQUeCvxnrsnm8oWT6tHTKLInv2h1l1U?= =?us-ascii?Q?wu72bf26GiVNOW/KhVgCIc/tBqwjvdCWEADs81vgFiQ4OMv4IHXz0yYpL5pR?= =?us-ascii?Q?Z0Q/ms39pqwOgh7TqAHbNltwvBW6Vbb92FxYhv21IWqP0oLjV2AeKpSejm9b?= =?us-ascii?Q?6lEjVv5ZEqQTwoivELkfGGOqjT1z6RlYVT1uD54NA5P5UdI9dmq6TtkEiDT/?= =?us-ascii?Q?ewO9xW9YT7HaCOapABdwdpaasujopx/LFJH1aapV60VnzaeECsLabD+OEiVO?= =?us-ascii?Q?88/XIQjpcELzkoLvgCOZoj8qgLpwUvw/2MPsKop9bBoXI49m3WvUEJU0UVpw?= =?us-ascii?Q?ziAMxgF1ksJC/cLAvDIOBUgOn886t3eke21NMsmOzbnyUfEXqt2UxuKfIYNQ?= =?us-ascii?Q?BzTfUkDFXI3E2ewFD6yQ1lVcCKFpRnFJs9FlXVwo226ysrxd6ZkrlYLInTMu?= =?us-ascii?Q?2OsgUWqmJ5X4SWTQRbhwdfUC1+H6Y6lgFw1kks/NGQwOKjgFdMzGlM5ACoXC?= =?us-ascii?Q?IK6NxkkPiw3KAKc5ttsaC4NmgbrxD0AjO7z9IofJmTZZWtnrAsRdOycDQyNb?= =?us-ascii?Q?UYUEmfH5E+/3rIOkWH+GWXl9sm7QvenJyezVp17f6Q+S8NUdGvSVAJ7RpMhD?= =?us-ascii?Q?tQIZE08EhMzcW/OPry8ZmyChjK3t6nP/RZyLuKa04T/NbcPfXqShklcyBEmi?= =?us-ascii?Q?UmbA5wzb1rfmZKHOnF+P4HNKKiI1TiFbAI6D/UwouEbtIlvZUiG1S35/aMun?= =?us-ascii?Q?2chjJufiIm69vgwjsTtPaOoQ9sVPoPSV/K0NX7R3v4Y/9LJowJLmaSIlM5m+?= =?us-ascii?Q?jId9fEFjAXFUVM/vfdTClN24e3d0He4VNslz+cJARq6JjdBAiVwBYuDYs7ow?= =?us-ascii?Q?i1TUJcH0nrt83P8G6zlnpjZioISqfEW4z2NWJDAm2zxf8uSFVsJbftzeACNx?= =?us-ascii?Q?TSDeaK/LoQC/f1tXIAt99WOnCocuR+2QMzr2vX7dyqvZTPJeHWg69ip7tESm?= =?us-ascii?Q?IFm+G4wCruNhfOZWSUfNt0pwop79SEb3bdUAX432ag2NPNZQEz4yZPB2W2ya?= =?us-ascii?Q?+RIGjfsrAa0aBPy5NA=3D?= X-Microsoft-Antispam-Message-Info: MpXyd7abWBR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JAxo91hyW30ppCQFfi+hLLf/u/5hd7T9V18+97HEWZTZaAYUbEtTTLExgbiWj61VPtRgTVNIgAXXL0CmW6fSEs2+h84yhlkeGbfn+ptcXMWFuSDLy3mYnbP5ytIcDsPLd5+lAtpfogCngER4nTXuqmpkxWhZP7pgKoGu3RYvC/CURMUWOzjt8ghMuVLH1vd3qMbfgYJrl2SgkRVcotEI35wcj5PX8bG3HyPISwbmw5tp8xE X-MS-Office365-Filtering-Correlation-Id: f9aab6e8-8ebf-4bdf-6ac5-08d5a43de94f X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 08:33:34.8768 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9aab6e8-8ebf-4bdf-6ac5-08d5a43de94f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4432 Subject: [dpdk-dev] [PATCH v2] ethdev: remove new to old offloads API helpers 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: Tue, 17 Apr 2018 08:33:37 -0000 According to commit 315ee8374e0e ("doc: reduce initial offload API rework scope to drivers") All PMDs should have moved to the new offloads API. Therefore it is safe to remove the new->old convert helps. The old->new helpers will remain to support application which still use the old API. Signed-off-by: Shahaf Shuler --- On v2: - Remove the deprecation notice as well. --- doc/guides/rel_notes/deprecation.rst | 4 -- lib/librte_ether/rte_ethdev.c | 100 +---------------------------------- 2 files changed, 2 insertions(+), 102 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index fd9def20c2..93747bf244 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -73,10 +73,6 @@ Deprecation Notices In the new API, offloads are divided into per-port and per-queue offloads. Offloads are disabled by default and enabled per application request. - The old ethdev - drivers offload interface will be deprecated on 18.05. - This includes: - - removal of the conversion in ethdev from new offloading API to old API for drivers. - In later releases the old offloading API will be deprecated, which will include: - removal of ``ETH_TXQ_FLAGS_NO*`` flags. - removal of ``txq_flags`` field from ``rte_eth_txconf`` struct. diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 3c049ef43c..e568b8ba91 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -964,60 +964,6 @@ rte_eth_convert_rx_offload_bitfield(const struct rte_eth_rxmode *rxmode, *rx_offloads = offloads; } -/** - * A conversion function from rxmode offloads API. - */ -static void -rte_eth_convert_rx_offloads(const uint64_t rx_offloads, - struct rte_eth_rxmode *rxmode) -{ - - if (rx_offloads & DEV_RX_OFFLOAD_HEADER_SPLIT) - rxmode->header_split = 1; - else - rxmode->header_split = 0; - if (rx_offloads & DEV_RX_OFFLOAD_CHECKSUM) - rxmode->hw_ip_checksum = 1; - else - rxmode->hw_ip_checksum = 0; - if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER) - rxmode->hw_vlan_filter = 1; - else - rxmode->hw_vlan_filter = 0; - if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP) - rxmode->hw_vlan_strip = 1; - else - rxmode->hw_vlan_strip = 0; - if (rx_offloads & DEV_RX_OFFLOAD_VLAN_EXTEND) - rxmode->hw_vlan_extend = 1; - else - rxmode->hw_vlan_extend = 0; - if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) - rxmode->jumbo_frame = 1; - else - rxmode->jumbo_frame = 0; - if (rx_offloads & DEV_RX_OFFLOAD_CRC_STRIP) - rxmode->hw_strip_crc = 1; - else - rxmode->hw_strip_crc = 0; - if (rx_offloads & DEV_RX_OFFLOAD_SCATTER) - rxmode->enable_scatter = 1; - else - rxmode->enable_scatter = 0; - if (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) - rxmode->enable_lro = 1; - else - rxmode->enable_lro = 0; - if (rx_offloads & DEV_RX_OFFLOAD_TIMESTAMP) - rxmode->hw_timestamp = 1; - else - rxmode->hw_timestamp = 0; - if (rx_offloads & DEV_RX_OFFLOAD_SECURITY) - rxmode->security = 1; - else - rxmode->security = 0; -} - const char * __rte_experimental rte_eth_dev_rx_offload_name(uint64_t offload) { @@ -1108,13 +1054,9 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, * Convert between the offloads API to enable PMDs to support * only one of them. */ - if (dev_conf->rxmode.ignore_offload_bitfield == 0) { + if (dev_conf->rxmode.ignore_offload_bitfield == 0) rte_eth_convert_rx_offload_bitfield( &dev_conf->rxmode, &local_conf.rxmode.offloads); - } else { - rte_eth_convert_rx_offloads(dev_conf->rxmode.offloads, - &local_conf.rxmode); - } /* Copy the dev_conf parameter into the dev structure */ memcpy(&dev->data->dev_conf, &local_conf, sizeof(dev->data->dev_conf)); @@ -1566,30 +1508,6 @@ rte_eth_convert_txq_flags(const uint32_t txq_flags, uint64_t *tx_offloads) *tx_offloads = offloads; } -/** - * A conversion function from offloads API. - */ -static void -rte_eth_convert_txq_offloads(const uint64_t tx_offloads, uint32_t *txq_flags) -{ - uint32_t flags = 0; - - if (!(tx_offloads & DEV_TX_OFFLOAD_MULTI_SEGS)) - flags |= ETH_TXQ_FLAGS_NOMULTSEGS; - if (!(tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT)) - flags |= ETH_TXQ_FLAGS_NOVLANOFFL; - if (!(tx_offloads & DEV_TX_OFFLOAD_SCTP_CKSUM)) - flags |= ETH_TXQ_FLAGS_NOXSUMSCTP; - if (!(tx_offloads & DEV_TX_OFFLOAD_UDP_CKSUM)) - flags |= ETH_TXQ_FLAGS_NOXSUMUDP; - if (!(tx_offloads & DEV_TX_OFFLOAD_TCP_CKSUM)) - flags |= ETH_TXQ_FLAGS_NOXSUMTCP; - if (tx_offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) - flags |= (ETH_TXQ_FLAGS_NOREFCOUNT | ETH_TXQ_FLAGS_NOMULTMEMP); - - *txq_flags = flags; -} - int rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, @@ -1654,12 +1572,7 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, * only one of them. */ local_conf = *tx_conf; - if (tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE) { - rte_eth_convert_txq_offloads(tx_conf->offloads, - &local_conf.txq_flags); - /* Keep the ignore flag. */ - local_conf.txq_flags |= ETH_TXQ_FLAGS_IGNORE; - } else { + if (!(tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE)) { rte_eth_convert_txq_flags(tx_conf->txq_flags, &local_conf.offloads); } @@ -2632,19 +2545,10 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask) return ret; RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP); - - /* - * Convert to the offload bitfield API just in case the underlying PMD - * still supporting it. - */ - rte_eth_convert_rx_offloads(dev->data->dev_conf.rxmode.offloads, - &dev->data->dev_conf.rxmode); ret = (*dev->dev_ops->vlan_offload_set)(dev, mask); if (ret) { /* hit an error restore original values */ dev->data->dev_conf.rxmode.offloads = orig_offloads; - rte_eth_convert_rx_offloads(dev->data->dev_conf.rxmode.offloads, - &dev->data->dev_conf.rxmode); } return eth_err(port_id, ret); -- 2.12.0