From patchwork Mon Aug 7 10:54:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahaf Shuler X-Patchwork-Id: 27469 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id F3E3258CB; Mon, 7 Aug 2017 12:54:51 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0066.outbound.protection.outlook.com [104.47.1.66]) by dpdk.org (Postfix) with ESMTP id A65E2374C for ; Mon, 7 Aug 2017 12:54:48 +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=JSHJT7Sxhh805TzSI6c5zBoWeupgE3YtJv5peEX912g=; b=iY1mEYrQcoIQGMB/5Aoam8t2nWqjVBgdqRmHa/8C1kGP58Sh1SSE0/w4XGXc8M2bxaDOFyf8J4C0acbxzQTlSELMxwKZkk8cP0CoIUhKGML34daYWjnwPq4L4Mawtz8yUJthhXsHc+vI+G6JH+CB+NbJegFA2juAcyFGwkNi3To= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1304.22; Mon, 7 Aug 2017 10:54:46 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Mon, 7 Aug 2017 13:54:28 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: AM5PR0701CA0022.eurprd07.prod.outlook.com (2603:10a6:203:51::32) To VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 86be1b8b-8f41-4526-dd86-08d4dd82b813 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB3151; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 3:QNXIvJNJH6ptrOfSAxtxr7r+NGqyq2ZNcQu0HS23Sj1/dcElAtuXYNdIrPTYGrMCGBQwScB6dhVJbYETIB3m4eE914cLqwXFR37VC6/AW4/seiyVPg+Za2lVTKbPMIVxEVLvfOcRv4l4rNS0oAsoqItKQghV3J8nBTBBbuh/QKozF104hOxId4hLungVC/I18CI4e7PFXdW02dDfu9V3lN9qRI1gY99FXcAnguiAi6JVj8KRnFpctzV67D2nEcsX; 25:vENNY+YnvzK7heepB3nHtOtVE0iz63RvzcgDlyCNJUTxwtWYpX+MK+aEL4qZZTmSBJPN9Wg3IVtSu4KNVGFZzRwTRMx0JDb7yhjOAvaN2jQJ5XLsL32n9kpmQ4CidJMje9q1aw+oD2pwXb+OfFQKP0kewJkSb9sf4UH8ka8s/9ZOff4X0ptF8FPs/MrzohXnbTUzyM1C7Mgd2Y0M2/zi9ifvMaYxDv3pNWBx+p8XMj/sQuvJ4p2SHlR4LtWhkl8Ae/+Jk3ZHZKmszD1tFyW1Ng8rEMshzt5DgaAT+vAcoG35t+y/CgaF+0OfhJx3e1GN+k5hkBEhcFbaSYBx0Uwfqg==; 31:SN84eoGYsCbw0LBUw/uEOlo60Ii0tRD6EQsD6a7nAyMQKbpl67/404MOPhGn90HEJOrnGHT4U+6hCh5yuF7MB1zvX46gDP/CGFQBMfdujfyJ5qj/pzpAvMo5Wtnl22CJoxYT2oagtlpq4Ywv77W5yTSXgK8oqCaXVGvk6LZtiEKBhrnkhi8UDkZ846aDDjk3xPDKpuA1WwzXAd2s1XL+NAnVbebA7fteYfFT80G3Q5c= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:7fjBauaGb+MlRmkJEbX/fnAjEvp7z/RcpRNRvApyUeM5RMIM26fKov2olhWSz9q2a7+QZLBZAJ32AjzKH/OeqLmzXgfCCbmTMtbwUthNsvEi+DHuzowY99+Lsai5MWymRUbETDHy8hLRGKGhf4aIy9KldDkYQUtdKnh+eU+OyCyQctdxPnMKGJuoLiHyG7XIoIu5d7IeCqZhYGHsAftOKPB7snhcXql9EVKuTA+21F39j1ZgJqAr8dqqgq26zvYfg9+LiKCPaZwmgHbVyEUUrEvSeIFJZaBQta0JQNpyNrbE6NBisl/wqHjgl2nI+fiTtCKYsKnkFWs5ngw9sWj6JyKT28xOjTbyqbOuZFIvV0LCGhb5VSHwf1GntrYMTZxeyKKwII/MCAfcnOVFvtR987CaZDhrlBb1ceu7Y3yYI2C6GsyM4Yj1jXGdUozGysdhYCtqxKxTV9OHQA6wRDpEcFARl+8zDLsOsCu9FkaQvbIJR13iYJFZHUTEk04l/ZQ8; 4:qr2kxSAKTNprxZNHK+3dR+p2EBegvJLvpX50dKp5EfBABwcA5BOFzKy8UkZwXlbuRBAORjOPp6BKt8TeLSuRU7A9AJAZ17Fe7YqgAnWnfoe76kAy+yn0l0SEies+EpA0w+ydc0/bp1YzUhH8WIiy0n/cdI74MGV+3/NQJ3yilfWcPemdRXitM9S8cm05JJkYGSn7k0uE/UrF0HK4/OUFfPPm8rMGUtaLqXeSi9CpSYaiCpSVGnbzQ2rhuRArtbka X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3151; X-Forefront-PRVS: 0392679D18 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39450400003)(39860400002)(39410400002)(39840400002)(39850400002)(39400400002)(199003)(189002)(6116002)(33646002)(50986999)(5660300001)(69596002)(305945005)(86362001)(105586002)(106356001)(8676002)(66066001)(101416001)(97736004)(47776003)(7736002)(76176999)(50226002)(3846002)(42186005)(48376002)(50466002)(6666003)(478600001)(118296001)(53936002)(2361001)(7350300001)(25786009)(6916009)(2906002)(33026002)(68736007)(81166006)(2351001)(36756003)(5003940100001)(38730400002)(81156014)(21086003)(55016002)(2950100002)(189998001)(110136004)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3151; 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; VI1PR05MB3151; 23:vGra2Pn6t7ILEjWvzEoiF4Fy+hFCMaaGsIX90Oy2r?= Sn0CntXURHWX5ctNXdvzjdwQx27ozb0AokUJy3kKiqeL//X0fzkt/cDMv0kVpDbFZuVWEpxY0MErxPMkjsK966e6JlDbnyIMWU6ts924IMVnaH598IJz3XXQq68rci+SjtbbM2kkxPEbXzaeBHmpRh5xjLf9YyrnSh0xMzbz8YwFtus6duBFFEwA9QCrkSA4wmEjL6q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Nm0G7JoIyFZN45mCZYKLHh4kaZt8JLsi9dpwO9jXUiHsoQfguuw== X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 6:GuArZBGv3un5eH5hIUEkQybcMv1CWW2H05CwcFrNlzFJsvGKa0aTqIIlSuaTFmV6xh8i+oi+qJB9AMpa1rpCTAgMPVYW0K8R9DWrZCzw9oCR8D9reZENMLOHzskZ7DZO+FsXBzlkOv/iuC2VIMZOMmdRBQJToCVFedAAyKKAgHXGLA6eP+eQ9m3FdV6zoBVfc/3eePYH33nrgxPUWo2a8vc3l3l7drt7Jbq4DniPr6X47CBZI1JSHoQEIkSW/0qRmj1UNTAnSaN1bCJoWmOIughdK6++3ekV5awbagimTC9M/V6h7DPcJVF4Jj20FPmlA0PDnycSY+3pI46L/SfWaQ==; 5:Xctj/93V5p+KRU5sAJzHkISB50mEze9ck+p0yHY5IrUDmUO/jijn5rqg6WK+V5xlfny2vcaSjvQgQfiuBfGA4arYfemy5hXnzQ8FqoCDhn3JzbYL71uwa+KtV/4VG1tnV6YveSe5Hy/c/X4f5tdoTg==; 24:MyExN7SqFmqG2/Qi2fJ6LMYJsNgUN/UQN5HSpHYtLr7JVO0GeizojVXe3nwFamQo8TwtM0QPpfbsd52WK98N8fWURre1NPiPSFSycktxkaQ=; 7:yE2Fytv+nv52zpGLFJ8loEJ0hJ623WqtoTfLdkoNmzQLGqkfhndSwjZcu4PYm3B2w3lspaDka2Cvut53coTub5tLgaLN3aBIJCSz2cMtIEmuOgTEBtSeRc/mFhXZJzMOYjKXkkh0BmgEy9od7AcS4Q2QdV75I+yDs3Lw41ILbi2aZkRH88thITC6eHOpPe4IoKTquTC/lyVyAL5xxPe9X8mrzgwYmhTNX8u8JOAj++4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2017 10:54:46.6910 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-dev] [RFC PATCH 1/4] ethdev: rename Rx and Tx configuration structs 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Rename the structs rte_eth_txconf and rte_eth_rxconf to rte_eth_txq_conf and rte_eth_rxq_conf respectively as those structs represent per queue configuration. Signed-off-by: Shahaf Shuler Acked-by: Thomas Monjalon --- lib/librte_ether/rte_ethdev.c | 4 ++-- lib/librte_ether/rte_ethdev.h | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index d4ebb1b67..f73307e99 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1006,7 +1006,7 @@ rte_eth_dev_close(uint8_t port_id) int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, - const struct rte_eth_rxconf *rx_conf, + const struct rte_eth_rxq_conf *rx_conf, struct rte_mempool *mp) { int ret; @@ -1097,7 +1097,7 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, - const struct rte_eth_txconf *tx_conf) + const struct rte_eth_txq_conf *tx_conf) { struct rte_eth_dev *dev; struct rte_eth_dev_info dev_info; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 0e99090f6..f7a44578c 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -686,7 +686,7 @@ struct rte_eth_txmode { /** * A structure used to configure an RX ring of an Ethernet port. */ -struct rte_eth_rxconf { +struct rte_eth_rxq_conf { struct rte_eth_thresh rx_thresh; /**< RX ring threshold registers. */ uint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */ uint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */ @@ -709,7 +709,7 @@ struct rte_eth_rxconf { /** * A structure used to configure a TX ring of an Ethernet port. */ -struct rte_eth_txconf { +struct rte_eth_txq_conf { struct rte_eth_thresh tx_thresh; /**< TX ring threshold registers. */ uint16_t tx_rs_thresh; /**< Drives the setting of RS bit on TXDs. */ uint16_t tx_free_thresh; /**< Start freeing TX buffers if there are @@ -956,8 +956,10 @@ struct rte_eth_dev_info { uint8_t hash_key_size; /**< Hash key size in bytes */ /** Bit mask of RSS offloads, the bit offset also means flow type */ uint64_t flow_type_rss_offloads; - struct rte_eth_rxconf default_rxconf; /**< Default RX configuration */ - struct rte_eth_txconf default_txconf; /**< Default TX configuration */ + struct rte_eth_rxq_conf default_rx_conf; + /**< Default RX queue configuration */ + struct rte_eth_txq_conf default_tx_conf; + /**< Default TX queue configuration */ uint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */ uint16_t vmdq_queue_num; /**< Queue number for VMDQ pools. */ uint16_t vmdq_pool_base; /**< First ID of VMDQ pools. */ @@ -975,7 +977,7 @@ struct rte_eth_dev_info { */ struct rte_eth_rxq_info { struct rte_mempool *mp; /**< mempool used by that queue. */ - struct rte_eth_rxconf conf; /**< queue config parameters. */ + struct rte_eth_rxq_conf conf; /**< queue config parameters. */ uint8_t scattered_rx; /**< scattered packets RX supported. */ uint16_t nb_desc; /**< configured number of RXDs. */ } __rte_cache_min_aligned; @@ -985,7 +987,7 @@ struct rte_eth_rxq_info { * Used to retieve information about configured queue. */ struct rte_eth_txq_info { - struct rte_eth_txconf conf; /**< queue config parameters. */ + struct rte_eth_txq_conf conf; /**< queue config parameters. */ uint16_t nb_desc; /**< configured number of TXDs. */ } __rte_cache_min_aligned; @@ -1185,7 +1187,7 @@ typedef int (*eth_rx_queue_setup_t)(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, - const struct rte_eth_rxconf *rx_conf, + const struct rte_eth_rxq_conf *rx_conf, struct rte_mempool *mb_pool); /**< @internal Set up a receive queue of an Ethernet device. */ @@ -1193,7 +1195,7 @@ typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, - const struct rte_eth_txconf *tx_conf); + const struct rte_eth_txq_conf *tx_conf); /**< @internal Setup a transmit queue of an Ethernet device. */ typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev, @@ -1936,7 +1938,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev); */ int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, - const struct rte_eth_rxconf *rx_conf, + const struct rte_eth_rxq_conf *rx_conf, struct rte_mempool *mb_pool); /** @@ -1984,7 +1986,7 @@ int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, */ int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, - const struct rte_eth_txconf *tx_conf); + const struct rte_eth_txq_conf *tx_conf); /** * Return the NUMA socket to which an Ethernet device is connected @@ -2971,7 +2973,7 @@ static inline int rte_eth_tx_descriptor_status(uint8_t port_id, * * If the PMD is DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads can * invoke this function concurrently on the same tx queue without SW lock. - * @see rte_eth_dev_info_get, struct rte_eth_txconf::txq_flags + * @see rte_eth_dev_info_get, struct rte_eth_txq_conf::txq_flags * * @param port_id * The port identifier of the Ethernet device.