From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0043.outbound.protection.outlook.com [104.47.0.43]) by dpdk.org (Postfix) with ESMTP id 99A351B268 for ; Tue, 12 Dec 2017 13:28:03 +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=4pD+hNlxPx9x+fvYXo2JgTbVmB6SavALUc4KWBp5tpM=; b=M3ekprZrKNfcMwJph1YA72PMtovNrHQ8Per6E6MJ+50HucNrAVdOxdZXnJ2ll2ved+5R6gvwGTAdB0VtRE1mYEnBxro5BBPjs0KM6YwSFRcfNqB8OJrqgM+edpwmma/o6NzByDVDFiN8Zfa0zHuEG+k1WC1nc4bFqyvmLUZgXU8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3149.eurprd05.prod.outlook.com (2603:10a6:802:1b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 12:28:01 +0000 From: Shahaf Shuler To: dev@dpdk.org, konstantin.ananyev@intel.com, radu.nicolau@intel.com, arybchenko@solarflare.com Date: Tue, 12 Dec 2017 14:26:45 +0200 Message-Id: <68434e0c92b325d5f63c1c03c2e5cec33efa6cfe.1513081088.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: <20171123121419.144132-1-shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: HE1P191CA0010.EURP191.PROD.OUTLOOK.COM (2603:10a6:3:cf::20) To VI1PR05MB3149.eurprd05.prod.outlook.com (2603:10a6:802:1b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c341623-00ea-4e4c-5d32-08d5415bc983 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:VI1PR05MB3149; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 3:5yQb9DW0k9cpOldaMlu2MHCWmpaccbdiqaiyV3JaWMgGqC3GGcWuvy2INGxN+8m9fMC4xlwfoiT5myXlLynkI2nFCCxYGYf+LP5+b3tdpsUq++dNAmKtsm6kMc6zjMtIGLPphnSRFSz/3Ug0o6ztWilHDAA2kgRScAa9801Lz3CE3ZIfP/2fbRI0mQRFuHbsgDwvr67aikb6xWz/5TCd8ulyxH1y6WMlANV77JDiH4JurS2cl2z0KTbv02DN+xXj; 25:2AOTNIoIhJpdhogoD5tvCKQAtYivFutigPD26aRRI+KtFmz2Fteg+7kwgzzzl2ga+pUGxv+msKEJRalvZeNXroeY6lP34eECBDREeAqblFVRHzHjUaIEHd7KrZX3YKz3QxEIpY0OGkYW/SJJsJt7LYW+UGovd1/9DOCmPlZM3p4DiUKUTfBh/kmbRTTyDWk1QWTiGC+EfEzqKh+zcr4ZiP9aEz76DSfj6oo2hAA0SV+dOy7GDBRpwfX1W64lUIadQqeppdhGgoh35g4VH2rLQYvy+A8GVWhvcNOMGT2fqE44dR7xEPsorKr79vNlXRg9EhRAryyrUbHguUontWZc8g==; 31:vsQmXREQJAKhAWUhCrANyY+GkyB8D2RhrFeoMw7NzQvavnrMIAnWCUmp8jny4CN/Vlev6hue0pseaMId6vd1R+z5jB60NUij4AdQqO+/4HGxIl3hFAD8jq/JGqe7SCcF8n+TLSUzhJQ11cY44o9ekrTzef30xmLzJOW/V3wq3l7D4e6dXdlglQVeGHtJ+9MahpmhtK3H2QQTCkkK09xTIRTG/fSDNjFF5uCYJ0DIUX0= X-MS-TrafficTypeDiagnostic: VI1PR05MB3149: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 20:ZpEbtCorB4/7p44dYJDOMpIPmSp930Z0IF1+fLHrtnqnZ08Pu1j7tqFfbE1Kef0MeFDWo34myZdogARHdSJIwcMEzk5Ps5M3nvJgOuJfVykQe7ufXzSLaDcMuHEEQ4B0btiqLBevCIxj+wYskVEq781wp8o42zB0DpAzbpW0v+aXKNolucOtVhrduRrUHBw+GUJ7O87URWoErLQXZJkI2cuexdIpkjjSaW/cqmidKP5Sp5cW0MJC0dwfNRGtet68au4WQqh7AiQlQaXCzYs630TtVMZkBQ/sxxBWcZ6P9sXeVgphOazFK8uSplG3wFSnBhYspYaEZtGotCYU7jT+JCPFaxTx4azJWRY+NB5Iuy1TIWmXrV3Rs8u8oWofGVmNjSwlrXGu2VEnRv8WLrWie6yb8oN26yTgiBo7Qzte0Frs15c7asPdQzE6EHgE0AND0jT5XhgRF3w67isz++ZvP00yEua7tstFr332l89LgztCocB8qN8BUW2ZGcPTIM21; 4:MyYwPhhuFh3fOu5q7/HfJVFtDO5WjbMStWndsK/i4GU9D56wd37ERxYZTxhXdRwXrlCon8oT3D5hCmE9/FIjznHu1PeSuOBNngkMyJe0cDP4nXQhpYZ6PShA2vl169YmbTAgNHdDdeNATB5nt0bptidFH6l3oVbIMBZG2U6pUtAut9vbqNGC4kOD+YSDaZxr8jpL2qkTYZdtLrXxkSyp9nk6ASIVyroYI3Io1DeFl67FY/RxEgCHk548YlIb2/WN4Qct7KmuTF35ka4er/OUug== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231023)(6055026)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011); SRVR:VI1PR05MB3149; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3149; X-Forefront-PRVS: 051900244E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(39860400002)(366004)(189003)(199004)(7736002)(8936002)(305945005)(66066001)(3846002)(5660300001)(47776003)(6116002)(2906002)(69596002)(68736007)(48376002)(33026002)(2950100002)(50466002)(81166006)(21086003)(81156014)(6666003)(8676002)(106356001)(105586002)(118296001)(97736004)(478600001)(51416003)(25786009)(316002)(52116002)(7696005)(50226002)(86362001)(55016002)(36756003)(59450400001)(76176011)(16586007)(53936002)(16526018); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3149; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; VI1PR05MB3149; 23:3njHW18HAbsyG0pSZX0ty+/mz6YLExSZhcAXjoXf9?= =?us-ascii?Q?a+bVzIMKZOYlnI1IOZg3t16Y+5HADla9ZbyF8BDnjq/pbIP53uZIcd28SMVc?= =?us-ascii?Q?NbcC38N2GLbs7OH2htcoB9NGL2W9PKB4cJf56AG1XrpMUiIlMMN5YXuJ7dHf?= =?us-ascii?Q?tlGisVfd3P65DHVM0duPmer52t8h50i0pY8gUWTBQMtOf69ogda8Mc6Kki01?= =?us-ascii?Q?DgD/sGe+cY6UTAO9cLzO0taU5sQdIXUW/+mmFiDqBA352ICQ4ptTihKpqgn8?= =?us-ascii?Q?rEhAkXW9FvBwcw2yYbqtu0UXuSgXZdAbChgmhVZB1v+TkjzsStBtmle9aBf+?= =?us-ascii?Q?7CFQBCXQMjd9HKzwHfx3gnXdye9aUoaOIKEC4p+S0sMeqaOSUKsIEeX5QkVb?= =?us-ascii?Q?fi4/+bM1tO6hUDZBe2SNEPCteDipZBMEEzGxytP2BA2L3GUHJmQMbMF4qifJ?= =?us-ascii?Q?ZOeDhNPLgRf0Zinb/X/3gecipRHGex2dyJoH+zvECpb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Zg4ZRc13xSPlF6jrP6YT18wAQFmAKhmohtinVsSFxdY2stTs2bVrq3VvE=; 5:sxdyHcJ0/Ba8SNluc98LKFszuH1d72l90Bn+XiJPHMGlO6QT2SNdd5OGzTp0vxtZ+1vDbP7zGf9iWOPpimcsaipWlB40+9a+CMV92BzG4jJBVYimZ6S++7sNLiQUaLciTDWcOjqtuhR+iLsXEJyuvhSPtU37cr2xXQvLbiizHmg=; 24:Q6v8WKDK5MdZM6nr34UbHroI6EmbELeZnIt2dRGRpRDteUPcw/NxUnBJ4rZeOw04je6sDbjUdc+u5PN3JzVcBevIgZ8GrgOK94v3+bCJ4CA=; 7:/u9ZU3OkGCKmAsSkoGpVhkNDGf1MftLsA4+GU41KJSJYL57i5UrbTooxwYregQ+qb5LyHN1mHh2vedyfHCuh2EmB678StpERS2UaNXZF+m/si3rWxeUvNoi7rRhctElGQrXBU9JUzlfHeLh9Knz1Gw1av9h14dY6MQbtL0NhwThRmULd1ErWOATLYCxR/lUfO+3Q10WR9NMkSfR6FqMm8wXK6F2IE1FQlQGGDuWrEeOH/kTc+QQ+XmIkvMl1xfSm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:28:01.2545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c341623-00ea-4e4c-5d32-08d5415bc983 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3149 Subject: [dpdk-dev] [PATCH v2 28/39] examples/vmdq_dcb: convert to new ethdev 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: Tue, 12 Dec 2017 12:28:04 -0000 Ethdev offloads API has changed since: commit ce17eddefc20 ("ethdev: introduce Rx queue offloads API") commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") This commit support the new API. Signed-off-by: Shahaf Shuler --- examples/vmdq_dcb/main.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 9dad2b8..50a6bf5 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -100,13 +100,11 @@ .rxmode = { .mq_mode = ETH_MQ_RX_VMDQ_DCB, .split_hdr_size = 0, - .header_split = 0, /**< Header Split disabled */ - .hw_ip_checksum = 0, /**< IP checksum offload disabled */ - .hw_vlan_filter = 0, /**< VLAN filtering disabled */ - .jumbo_frame = 0, /**< Jumbo Frame Support disabled */ + .ignore_offload_bitfield = 1, }, .txmode = { .mq_mode = ETH_MQ_TX_VMDQ_DCB, + .offloads = DEV_TX_OFFLOAD_MBUF_FAST_FREE, }, /* * should be overridden separately in code with @@ -228,6 +226,7 @@ uint16_t q; uint16_t queues_per_pool; uint32_t max_nb_pools; + struct rte_eth_txconf txq_conf; /* * The max pool number from dev_info will be used to validate the pool @@ -284,6 +283,21 @@ if (retval < 0) return retval; + rte_eth_dev_info_get(port, &dev_info); + if ((dev_info.rx_offload_capa & port_conf.rxmode.offloads) != + port_conf.rxmode.offloads) { + printf("Some Rx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + port, port_conf.rxmode.offloads, + dev_info.rx_offload_capa); + } + if ((dev_info.tx_offload_capa & port_conf.txmode.offloads) != + port_conf.txmode.offloads) { + printf("Some Tx offloads are not supported " + "by port %d: requested 0x%lx supported 0x%lx\n", + port, port_conf.txmode.offloads, + dev_info.tx_offload_capa); + } /* * Though in this example, all queues including pf queues are setup. * This is because VMDQ queues doesn't always start from zero, and the @@ -316,10 +330,13 @@ } } + txq_conf = dev_info.default_txconf; + txq_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE; + txq_conf.offloads = port_conf.txmode.offloads; for (q = 0; q < num_queues; q++) { retval = rte_eth_tx_queue_setup(port, q, txRingSize, rte_eth_dev_socket_id(port), - NULL); + &txq_conf); if (retval < 0) { printf("initialize tx queue %d failed\n", q); return retval; -- 1.8.3.1