From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0063.outbound.protection.outlook.com [104.47.1.63]) by dpdk.org (Postfix) with ESMTP id DEB1A47CE for ; Mon, 7 Aug 2017 12:54:49 +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=bgFqySnAJAK+NUjW1qSE+S8MCUaSbs5F9fEmCPtO37I=; b=PPw3jbSDthH0KXD2eInzsv2c4AZYuCUkQ/IomIlF0qCqdGU+EXBVVhcw/IWzU2g96PauPgDLLgoK5J6/dgysh2XK6le/CiIPX6/JbHj3kHK7sMAOlW3xiYiGuQjxdKg6b7ABueFYdZqwHxwYaSPjyv5T3Ap7FVxjdRttq9psMto= 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:48 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Mon, 7 Aug 2017 13:54:31 +0300 Message-Id: <1e9c5ead0fbd92a3e7fb4c76397cb3dc369eca89.1502096064.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain 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: 469746ab-ce9a-41e4-a9ab-08d4dd82b942 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:Gk0xHRFc+RAaFLmw4+7YgFCmFJSJBf8Tkgb3PiCGYJOod/H/qlZVqM0qC6c+HNAT7W5t9ibVLPLS9j6EYHxHH0MxT2BDk6sPfqOEMIRj82mOhBtqtDPCKm4ZvA7AsRoVjbrjDGb4WtG4fGK8PXIAx9v6wr8Tqj3XQ8rN/Y2K6QUXNvx7poJXryIKefrScnhn2II4sb/7zR+T+4NtAv/25EDga9IIyhH7IVtGE8aZjvkeosy1f9cYBlfn9AuY51Ve; 25:HL11xiUDBH90nJC6mMtUqyM1IXuO03D363H/BUp+wN7TN7xfoy96SksNCjwv/9EnUPRjh9R+ESEOXRRqOtyFa1G0jCsh+anGSu5SjBkQyapCNcXFp5unHWXiBA55RXCTd84nw1ZVKMeKNBK9Z5chFNqOrhQElmBjo8FU8s4E/u/JGi7x1cu00jvQpUYy+q0xyj4liNmJb5LhGR/pT6yXSpk15pgvnHZOGhTDmixTV95h5tDq+e4PF2oNuNuxXfBkaJZsUCzYyXpnkdG2ajHziwP/DpJ4TcYkaR/vBqLCbcx1qQBbtIdYhd/RvLg0t2ZlhEWWeJactPxxcTiORaNJcA==; 31:zTbNr42ExYlnUdfzthkL0tyEf5p78+jbF3OvWZz+A9atiP33qUGJztBr0bIjyY/JCdZWcTSi7GrMC5qABz4YYxFvF/ZABpiA3xfEK7OsDZhUxnt1/5HYr//RfbOHbZG+AJWqYvIEZKqVVKrW3IARBXBwarClTxhF8MW11xnc53vfjvwZGwlGXV9Omxg9iwP7+d0xmJCoIFNkcoxob9xn5d0cuTzQJVZ2fDPAPRUX5Ow= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:2M5U/F9ZQpWRxt1WoxFEA/FpfDHhCVGPGWLes5pbTT4iuPNNFfZSCGUp6NTLnipiCHkQWJohy/Z1IQAsSRR94g0zYa5QzYHPbokrPlaq9rtLtPpv8bVgmfg4q2XNxtuLUoguQCEP3tj6uyuMwQS0+fVXGP09zYl3WbXLrIsug8WpD+ddYV6kbtLZljBeeJQ6Il9CA7CCbp8dOChGFenDK4CxmrvjvHec7wX+pqv0cLkiPlEBcPHVaPKIkewSJ+XJV29xLsenATLUcHIlv0eKuvLu2gLUmzLG96b+MMe+z5z8zFUf7z3C3UXBk9hpNVKCO+4UHTAbz4oKxnwnDj0Uz53oe31PI7CYsEDy4RPJhpiNLOdsof6RzN5MigXDf54HLwon8MW6TpfbhHHAt+nCWqRBt2UfermEsWNP+PAM8LTV5onn4uGOf2SC33AiGRtoikSBXHdF43EoVKh8oFsuk2kG8Us2IY4bSuLnJsBZ2dJXeE+fN18CTmwyClPbs40i; 4:AEl19ptlrujH0ME8ahjpCZQ3ZHcU/ZwQGWlNxcH+97U58i96ts5+HUlQxXSbHvXQANS1QnQ1oOTnNRtNOxgfDwSGudpuG7wYizhdI1smhFRzXaOwkR/AKkPYNIIcca0kHOm0V+R67W2qj4nZIPLNmCf5Bpqwx4lJx2ViK3gPy/8sxbZR6FPG1xcMCx7y+oII1WNlU4wmmjyE+MEA/nDrdf8S+jAuH4afm/kvKEoLE8sVFlgKn7ify2Di9fmrMPe+b2s+IgpugqH3MbqX9toMsWZvGVwh0XXAEa9gg/tp9UE= X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); 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)(979002)(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)(969003)(989001)(999001)(1009001)(1019001); 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:TJWhPxMoyTY5KaZWlY6j+7+3SYj2MmjfI7lsHrMPt?= =?us-ascii?Q?8RlTG1MFu87Nx8+iG75V3WyphM0ovV+3vGVeBIxZ9XEmCP5g9qR7xd+8TZnO?= =?us-ascii?Q?KK5IVsTSijTJp3f1hgILlou6ayZKe/N+TPEdPKdVPYTK8ceqq0QUOz8vPViv?= =?us-ascii?Q?eCJEoElXk+SqR+Rf0qKVaTYmlSHO1dtqccJK81O6FY3dgmph6lHfSU14/8QR?= =?us-ascii?Q?YwmszWN0lb0NGqFUwiYH9Mt4Nk8w3JEk1f/NM7DBO/0nPODNg76x4j4qSU6p?= =?us-ascii?Q?3CeDELAfatRpdsfGcOFqfVldkw1GQw4XMjvdtDdjqWUmYkBVkfQICdEUtOaa?= =?us-ascii?Q?gpQPYDpF9FXhKCf5u/kF2pd0Cb2+kv2mNh1b6cBPiWWE6cihr5GFdOA/ZXvz?= =?us-ascii?Q?Y/dgQ11WqHoD4a1u97R3ZRuf/XZ0cmRz+s7eGbPW5oPp+4LmC8k4u3wPOmYd?= =?us-ascii?Q?4OtcB7toylig70n8aBaAejc455ZIPQx/PH3Q/kaLaIaB46qtv8IzBnLy5GJr?= =?us-ascii?Q?22dAUFNYQEnEGmXNeFy4X6/AP0h8/1wAsIK467VJEgN0vvwLxlo35mnfIeF+?= =?us-ascii?Q?6Mad8H7SF1aSQuJ4yAHrXp/nrUy/+jJ67OY4j0nkrs8TAQFRbwWMPJN3DdLb?= =?us-ascii?Q?Vky6+Dv/TORxpoRkuOF8aIJtRilYLtp/GiZgF31DVo7dhCaCAe7ine1Ui7PF?= =?us-ascii?Q?pMxDVNvm6EjvTF/5fo6h0mTgkT/eVN5bzeyhbiQIzntg8f4kEsmtd6Srw8Aa?= =?us-ascii?Q?YtYiJwLAWMp475fvJTU4BqwBlVDMpwaOh6don1RM+bKmvGxiou3e2pSgbKtS?= =?us-ascii?Q?CocGc0694m88e9guKE+xIxI6Z0LgW2VNJQn3Gn8Jyu+v8bxajcVwwlht4R5q?= =?us-ascii?Q?yfZs80l3+1FjEAuvrX+rrHkx1iydOCeBcT2Nyh7YyYO4tCDtvTmepiQFVQ1o?= =?us-ascii?Q?VTBUnaLeFQXZvrW4bsAW9cUmECPxAEs//HcwjpoUg/8FjKD2T7vg+Fbsq6qs?= =?us-ascii?Q?eek82DMjOuKik0LanSS7IzT/QMmAP4D81G20bDL25t19ai3LcRMnc9p0f7DU?= =?us-ascii?Q?yoWmhRcEbVJJAoq2NWgzxHTCEpJPMsJmbPygR3bgLk171hvrJdnfptpzwzug?= =?us-ascii?Q?hl+ts3fwjmdFzVMen+1MFuwaQ8whioPs5yHL7uotWP/6TqQAmPoqL5+op4IW?= =?us-ascii?Q?RXkkGGxOCJG3ZpvefCvlLKQNGN3fszhoLDTg0wDlfnd9HfS3ex74U+qt867z?= =?us-ascii?Q?OuUfPhXItl6uAq8zVSub3wOVfsrpmChQ/dwwslHXy58gQlc+gKl8BymcOeuV?= =?us-ascii?Q?hQnn3l0zl4nv/sdsZpSDWA03CU0tgiTa+R8S4FCg7+Y/b5UA3UVYkPi/BrXF?= =?us-ascii?Q?Kz8gD+FPMNy4jxfPfzQGk10cTaolTrXby9XHsPZCYVpE9C1G/V2APvirdrL4?= =?us-ascii?Q?sLQ62/wGkqnX7SpbuPJwPesDrjPcUDoPvkKFgtYZcylDlmmVuPV?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 6:+txBsTmoOO/dF9GHnuswv/n8wdQbPKl2r0ZHz2phPVrZmW9rrEjLNMtxR6K6tGshsEPYf+tAc4JUiupsWyzB8KFgqvi9desQniyPbdNktG+W/oP9JfPi/V1MatvvJ2M2yBGiIV/9uBhxkP234VsimqW0zAgEhPyLAV2m6tpdWuq3/a/+P/6TYdxWvnJ3wpcJG8CJS4MeuYc9i83kyhGqxpu9W0u1jsHBnXf3xi64GFlNfFee5gyAStulns+is503g521PQB0bmBiILFlAXWTHjijifIRTXA/v6b0BNuKeQu/B12iOeeye88mE3BEChkGBCSRRObpnIlabrybB+ilog==; 5:f8pJxWgmU/EHZQMczJiChG10Hu2A4t+lwkvg2AMV08lDPKOgz2AlsBnzfqcWbOz97tHmPhldOW8LOrMBpHBdkxEERAiY8al3xmk+l61vcB/Nw5j7n5Gcm7FnYugEYKtyoQDrt3KZJSQRUXp7jHZjPA==; 24:guXKp3Ezmhaq8ntkTUJBQDHOB9NwT+Savs3cLeWZV0A4qIwJZV3C41c5cp36sk66OvFI5o3TFo+xxapVu0tR1e7LkvxAziXq8chom4cXItQ=; 7:WymFm1LpDYmXKkwq7Ye/4Ab/m1aH6gfZqxJCigj/Hq+fw/Se4ya1He1Wght+/GyYuQpvriDhcrEULKeXhdu9P6U21zSJ4ZDhQlrcJGfWeLDXee/OjJGNA8d9Qad5UGCEgtGm9FDcyQEzv7dpp6flXYPJm+nXGAj9z0tXrX7fA69eX+VffnUMDBUaajaEN1OOi/SYF28rouHKLp4pug/Vmdj7DpsozMvjZyLvm+iIuJI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2017 10:54:48.6598 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-dev] [RFC PATCH 4/4] ethdev: add helpers to move to the new offloads API 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: Mon, 07 Aug 2017 10:54:50 -0000 A new offloads API was introduced by commits: commit 8b07fcae6061 ("ethdev: introduce Tx queue offloads API") commit c6504557763e ("ethdev: introduce Rx queue offloads API") In order to enable PMDs to support only one of the APIs, and applications to avoid branching according to the underlying device a copy functions to/from the old/new APIs were added. Signed-off-by: Shahaf Shuler --- lib/librte_ether/rte_ethdev.c | 140 +++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index f73307e99..2b4a28c97 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1003,6 +1003,63 @@ rte_eth_dev_close(uint8_t port_id) dev->data->tx_queues = NULL; } +/** + * A copy function from rxmode offloads API to rte_eth_rxq_conf + * offloads API, to enable PMDs to support only one of the APIs. + */ +static void +rte_eth_copy_rxmode_offloads(struct rte_eth_rxmode *rxmode, + struct rte_eth_rxq_conf *rxq_conf) +{ + if (rxmode->header_split == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_HEADER_SPLIT; + if (rxmode->hw_ip_checksum == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_CHECKSUM; + if (rxmode->hw_vlan_filter == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_VLAN_FILTER; + if (rxmode->hw_vlan_strip == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_VLAN_STRIP; + if (rxmode->hw_vlan_extend == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND; + if (rxmode->jumbo_frame == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; + if (rxmode->hw_strip_crc == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_CRC_STRIP; + if (rxmode->enable_scatter == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_SCATTER; + if (rxmode->enable_lro == 1) + rxq_conf->offloads |= DEV_RX_OFFLOAD_LRO; +} + +/** + * A copy function between rte_eth_rxq_conf offloads API to rxmode + * offloads API, to enable application to be agnostic to the PMD supported + * offload API. + */ +static void +rte_eth_copy_rxq_offloads(struct rte_eth_rxmode *rxmode, + struct rte_eth_rxq_conf *rxq_conf) +{ + if (rxq_conf->offloads & DEV_RX_OFFLOAD_HEADER_SPLIT) + rxmode->header_split = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_CHECKSUM) + rxmode->hw_ip_checksum = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_VLAN_FILTER) + rxmode->hw_vlan_filter = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_VLAN_STRIP) + rxmode->hw_vlan_strip = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND) + rxmode->hw_vlan_extend = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) + rxmode->jumbo_frame = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_CRC_STRIP) + rxmode->hw_strip_crc = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_SCATTER) + rxmode->enable_scatter = 1; + if (rxq_conf->offloads & DEV_RX_OFFLOAD_LRO) + rxmode->enable_lro = 1; +} + int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, @@ -1083,6 +1140,37 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, if (rx_conf == NULL) rx_conf = &dev_info.default_rxconf; + if ((dev->data->dev_flags & RTE_ETH_DEV_RXQ_OFFLOAD) && + (dev->data->dev_conf.rxmode.ignore == 0)) { + rte_eth_copy_rxmode_offloads(&dev->data->dev_conf.rxmode, + rx_conf); + } else if ((!(dev->data->dev_flags & RTE_ETH_DEV_RXQ_OFFLOAD)) && + (dev->data->dev_conf.rxmode.ignore == 1)) { + int ret; + struct rte_eth_rxmode rxmode; + + rte_eth_copy_rxq_offloads(&rxmode, rx_conf); + if (memcmp(&rxmode, &dev->data->dev_conf.rxmode, + sizeof(rxmode))) { + /* + * device which work with rxmode offloads API requires + * a re-configuration in order to apply the new offloads + * configuration. + */ + dev->data->dev_conf.rxmode = rxmode; + ret = rte_eth_dev_configure(port_id, + dev->data->nb_rx_queues, + dev->data->nb_tx_queues, + &dev->data->dev_conf); + if (ret < 0) { + RTE_PMD_DEBUG_TRACE( + "unable to re-configure port %d " + "in order to apply rxq offloads " + "configuration\n", port_id); + } + } + } + ret = (*dev->dev_ops->rx_queue_setup)(dev, rx_queue_id, nb_rx_desc, socket_id, rx_conf, mp); if (!ret) { @@ -1094,6 +1182,51 @@ rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id, return ret; } +/** + * A copy function from txq_flags to rte_eth_txq_conf offloads API, + * to enable PMDs to support only one of the APIs. + */ +static void +rte_eth_copy_txq_flags(struct rte_eth_txq_conf *txq_conf) +{ + uint32_t txq_flags = txq_conf->txq_flags + uint64_t *offloads = &txq_conf->offloads; + + if (!(txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS)) + *offloads |= DEV_TX_OFFLOAD_MULTI_SEGS; + if (!(txq_flags & ETH_TXQ_FLAGS_NOVLANOFFL)) + *offloads |= DEV_TX_OFFLOAD_VLAN_INSERT; + if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMSCTP)) + *offloads |= DEV_TX_OFFLOAD_SCTP_CKSUM; + if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMUDP)) + *offloads |= DEV_TX_OFFLOAD_UDP_CKSUM; + if (!(txq_flags & ETH_TXQ_FLAGS_NOXSUMTCP)) + *offloads |= DEV_TX_OFFLOAD_TCP_CKSUM; +} + +/** + * A copy function between rte_eth_txq_conf offloads API to txq_flags + * offloads API, to enable application to be agnostic to the PMD supported + * API. + */ +static void +rte_eth_copy_txq_offloads(struct rte_eth_txq_conf *txq_conf) +{ + uint32_t *txq_flags = &txq_conf->txq_flags + uint64_t offloads = txq_conf->offloads; + + if (!(offloads & DEV_TX_OFFLOAD_MULTI_SEGS)) + *txq_flags |= ETH_TXQ_FLAGS_NOMULTSEGS; + if (!(offloads & DEV_TX_OFFLOAD_VLAN_INSERT)) + *txq_flags |= ETH_TXQ_FLAGS_NOVLANOFFL; + if (!(offloads & DEV_TX_OFFLOAD_SCTP_CKSUM)) + *txq_flags |= ETH_TXQ_FLAGS_NOXSUMSCTP; + if (!(offloads & DEV_TX_OFFLOAD_UDP_CKSUM)) + *txq_flags |= ETH_TXQ_FLAGS_NOXSUMUDP; + if (!(offloads & DEV_TX_OFFLOAD_TCP_CKSUM)) + *txq_flags |= ETH_TXQ_FLAGS_NOXSUMTCP; +} + int rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id, uint16_t nb_tx_desc, unsigned int socket_id, @@ -1145,6 +1278,13 @@ rte_eth_tx_queue_setup(uint8_t port_id, uint16_t tx_queue_id, if (tx_conf == NULL) tx_conf = &dev_info.default_txconf; + if ((dev->data->dev_flags & RTE_ETH_DEV_TXQ_OFFLOAD) && + (!(tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE))) + rte_eth_copy_txq_flags(tx_conf); + else if (!(dev->data->dev_flags & RTE_ETH_DEV_TXQ_OFFLOAD) && + (tx_conf->txq_flags & ETH_TXQ_FLAGS_IGNORE)) + rte_eth_copy_txq_offloads(tx_conf); + return (*dev->dev_ops->tx_queue_setup)(dev, tx_queue_id, nb_tx_desc, socket_id, tx_conf); } -- 2.12.0