From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0047.outbound.protection.outlook.com [104.47.2.47]) by dpdk.org (Postfix) with ESMTP id 5177F1B1B9 for ; Tue, 12 Dec 2017 13:28:02 +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=/lxeRPgTMU8Oo7qfyQgKh2ojQdtat9IW4I6COpQ/hxo=; b=azsYO/yxHCuWKG2fLLQXqPwuGH9m5pjr68Tsb9DsCAswZsBdbx6QhrhAzImI0NDiKJ88dL1ArmI7wLeq5m7KnqTgyI+wSOcSAh6GmVJMDptetVyKvwmSiM3p2AUXVwk2/DkbsGviOToizLkFT0SrI1fxhr8tdo2j5Cvtyg/3Lqs= 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:27:59 +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:44 +0200 Message-Id: <5cca76739c386b670067ac5103c70a6c14d93c59.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: d39e5624-6b03-46ce-795d-08d5415bc8bd 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:nDLd8+PeHewle2Q2v5+0gz8yVWrSy8vb9IYWiOP+esDgOycnPMxttRkKo31B5fK4/70yfXv7BWQ5K62Xg4z51PA7MHWZJp2LJk/hpl07Z67J/4oFZR0dleFxCnP+/gllCrFsorvLrZ3Ric9rH3Fbb6ZpmgssheaBA6pK1UCghlnK2eY6qqPXUmM4k61UcBZKGQPnTcYeDKrejPrjYtH78YKYVmrgUHFussy+r/AqGekg/dz7o9yGtb3eS11Bq1Tu; 25:/1Fy4CGWSJzzzxaHn5K7quRUwqkhC8cd+U+p03Okhv691fbSWXlggvNf1e7DhKoPfPmvtgqLG2WEYG2T5NVNn2OEBfJkJzwlgNaojCPQiOLMKEXcPxzM8om8HOY2vX2RYEwxBg4BLSaG2g9y72FABQRen2ug3FQ+xxDVVw9MuCjlIh5ciZMKe2z2Vxbuy+/1x9RLi8uce3epcKQ+jXU7LFuclKJCpjpaeOtZVCXTQrMAtz0xP3mdhKiIdQMrVqRaXyTt67iMGEmOPYe/axo/sg2p6oxiRcRbcVS/b0zz2y6hfOdmpmfNs2Tpv7WT20LipCyWSGu6Q0ZLbAtrMJDb2w==; 31:TpLTrcmsiKTNMpUc+4XBvmHcEdvxTBa2supmEErZgQwV6+i8nxBpZFvpxDISnUp9e6VQBITFoBHlIgAYil2MTzp7Ao+HPUL6mBbmYsRbpgWVYkSLg5XezSVLGk2griU53dN08n/4EieU9T+CZMzX8zrOI9iZCHK7f9e0gIpDYO4NNhUOR9vCImjlgBdu2N+4XXVcL7wXCusb1kIY/jEfxTwaTfebmOCJ5aKNFLgDqnc= X-MS-TrafficTypeDiagnostic: VI1PR05MB3149: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 20:ka/uvXr4+ewjf5eYkuK8UW42J8IeSqbWPKhnH3L4C5iuW09dTPFw8NTDiuqA5tvfz6GTBGL81N3XrlpFChGicWgNGVZwXVjHwljAcDsqCaOq7lJUIU8TFdRZVn/+1W9J1omcKLg38U2oFehKm1aXaFMX9nzsuOxNmxZ7ItIfuk5SYgu06Xmkdd32acpxyTiDFd0UMa//dsJc8/FKtM23yY/LNsXpBZUiiAkdggYaGD+23HDC0TmWIIoQgY7zl8jJWc/AQhm1fimUUQsoi0mQyI/oINtkanjaqgJr95OobySndA4RchYXJYusJ6vy7ksjF15hbS1NPlmEngq9+7kUxR+NZGT9JGcC6bhRNxxsS2xrqsGKgw8MQoelYlnt3i5K0NSY8UidiQhAba6LqATQzh6yAAy5iEaQlRRTA1qKNK0BUsqcTWV4M3vtLEQwAOAu0hqww90zCZ909Lc7asDaoX4FdF6D0v++Cbz8qsK9jmMX7iHAgxNhaa6u0v38zNBT; 4:7Lxkt/NdyLD5Ic+IKpMg6JglAcWtrO/l2TAnGixrzdRJt7cnxLIlY+6s2khJB1Ec7hw5o1CKg1fCt3EJIkYtx0gsKUtmx46vUVthbSwztL1XeJnfrRnmWr65Gptnf9+bTLJ8a9ibI476m5CKxqhdA3cz5/JgvA+j1n0gMOgRuvKZko1ewXDoKfAihfKYpHTMd+Iq3i6FubFkOyaJbTso9m/WaGcXUPSPXCQqGMpQMDODwFyqfIqSISZiwIA2/xgSNYmapIUkx+d9TTkUKp4EgQ== 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:7UYWmTXRZeUiN0ZsOX82MhnAkAN1pPtxM65HcJaQA?= =?us-ascii?Q?y7M40MjzaolifEv1rXfy4djYfvWeVRs3afMZbjYQIEUWhw24SgneZwors+SI?= =?us-ascii?Q?XEwjgiJO7saa6T6rL4aAm4wsZyhzHhidRsNBB1Xr52Ea9GqjECo7K2wKgbkC?= =?us-ascii?Q?GjCm7/xrpmCmWAEZ22Bw/3hRsDiA0u1s0OigALTsVCS+LiwDnb6qUzOHuIqn?= =?us-ascii?Q?670Ta9z9vuzeKpKu5/2Jyii4kxDS98HuruPKFtl5p2fLZZ0zcIXPAqP3jPFq?= =?us-ascii?Q?w1ScLYtTnp8/9NdYITG5ZqpXHL4sXJkNhikLcAkjeg4CsSV17S4GhD+ESHei?= =?us-ascii?Q?QWcX+tTMjwtWTK9/l69TzhiFPq885M5Antxs53BvA0lwcxUKij5Sn+WPjT95?= =?us-ascii?Q?fmtOqDLoZdEh0uYAzRnQVKsOfbHCPC7DSYqbo5vMrdJRjPYl4UtfskcOpueg?= =?us-ascii?Q?MKSIANjttDT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VIZUQd2FsPr4m9pEI4jg3bE6Je0kDokPY85rIQCMl6Q/nSmsJXkbHcw3xxNQrHNCxzsdQKGJn8lm3hjP/1xtr4udek=; 5:l8fyt0qXbJrN1nK+owJvR0NAglvd4dyDgH3iNrkwmOMGGIU0ogsV6g9f5Cva5DuYDlsVKYXGhSsiyUMwG4kBfK49JCsU5xh8svusIswG2GmiFcnNES64LCs1aMq3IDGepCkqep81yNGlGWDg28BykvjJUVmOYsUThYNpfRBU+CM=; 24:8IHjFcRye6GBUn3BHeX4o/oEKE3iiGfbHvWbOcKqsi0iZsjjFl/jR2XT874onj2cWT66Tl6PemDuIKYMKUg/FP1GxY3nwfXLwk62VIhfb8o=; 7:jzIdw3SK1e+DM6hHrbhRXJqd4jPFHOcNgROCv5eJFUUJZtCdqe+/o0g+34qsrKIA+qneT496X18PB2P2zLDvMgmCfroL7Gi5WPjBqRzztcS19XBN6fpzcxKTcCJnz5kIU0614wBODOvLQtxrzUKTzRQrmqHgYI7iz6CkpDoUpYx6ueSKGVD/ANQUEQlLWocRvC+9jO/s7SC08I98FdtSXxDk2s3Yulf2J0HZCa1ApaeN5w8Q8xPtFNn704QuWTF0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:27:59.9733 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d39e5624-6b03-46ce-795d-08d5415bc8bd 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 27/39] examples/vmdq: 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:02 -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/main.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 84e9937..069960c 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -94,14 +94,12 @@ .rxmode = { .mq_mode = ETH_MQ_RX_VMDQ_ONLY, .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_NONE, + .offloads = DEV_TX_OFFLOAD_MBUF_FAST_FREE, }, .rx_adv_conf = { /* @@ -188,6 +186,7 @@ { struct rte_eth_dev_info dev_info; struct rte_eth_rxconf *rxconf; + struct rte_eth_txconf *txconf; struct rte_eth_conf port_conf; uint16_t rxRings, txRings; uint16_t rxRingSize = RTE_TEST_RX_DESC_DEFAULT; @@ -245,6 +244,22 @@ */ rxRings = (uint16_t)dev_info.max_rx_queues; txRings = (uint16_t)dev_info.max_tx_queues; + + 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); + } retval = rte_eth_dev_configure(port, rxRings, txRings, &port_conf); if (retval != 0) return retval; @@ -260,9 +275,11 @@ return -1; } - rte_eth_dev_info_get(port, &dev_info); rxconf = &dev_info.default_rxconf; rxconf->rx_drop_en = 1; + txconf = &dev_info.default_txconf; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf->offloads = port_conf.txmode.offloads; for (q = 0; q < rxRings; q++) { retval = rte_eth_rx_queue_setup(port, q, rxRingSize, rte_eth_dev_socket_id(port), @@ -277,7 +294,7 @@ for (q = 0; q < txRings; q++) { retval = rte_eth_tx_queue_setup(port, q, txRingSize, rte_eth_dev_socket_id(port), - NULL); + txconf); if (retval < 0) { printf("initialise tx queue %d failed\n", q); return retval; -- 1.8.3.1