From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0051.outbound.protection.outlook.com [104.47.2.51]) by dpdk.org (Postfix) with ESMTP id 45CA31AFE8 for ; Tue, 12 Dec 2017 13:36:13 +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=6f4l4YRWKP9FWf6EJtz44Hm9eiQY8dcumy/K0piG9x8=; b=ylJR4SRvUBjPiVl55IX2bh6gvpMQa8oagPiE0w3i17BpxVnzIkElz2zTQBI3WO+O0foznCho2UfF9LOGegFqGw+2Yrj3EkNtRIAMzOcypQkV8Ez7Rzt74IECioiAjBmJdcpCz7+RmBgiRZiSG++fN9zISR0q0MqD6x+7ijmwvzg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) 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:36:11 +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:35:27 +0200 Message-Id: <6f79a45bb6fdc4061b8991d7de6ddb774c9376af.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: HE1PR0102CA0051.eurprd01.prod.exchangelabs.com (2603:10a6:7:7d::28) To HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 785e972c-02ee-4e23-0de7-08d5415ced53 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:HE1PR05MB3148; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 3:9glGDYUd4Effn73jrsmPTQun4Zkr53vCWBLzmEDHxUt27LS4oU6Re+oM3xil1sEzwx3rL8aO0rMxBXBscDHruX/gPTO+jboHWDhhEUA2+tQMQeEOt1Uq82DkZWE9E2e5NdB6Z7Sy5Vikhr3qd2J/kpiZqBQSIxNagitlO52/954vjaKhPIYpKjLKFr+48PMBtQz1Uw4qwB+mzqWv6lilB5QQs59ayMR5jbpnxtcnWlaZM2OQMJAvGX/S55rHhfxz; 25:L6nZtsJWbDDtFKQLWg/O5KmH9MdbJ/cO4s2N6H8miyjXJueaZxP04qt9AFhKjepWrSVi761gMc7TmX0iHYWG9NoPaImGsZbP4Vux72CpRdZjEF34Vfkw6LmvV3i3KsxNfdblMi6KTEXm9TPUsDeHnf0BaxZQX7TRnWO5cpXT2PoUt9O8VUDHtTUSQZk8l6rOyJo6jxuxv97Z6jeHsWHx4I+pJpvqT/QqEJxXF9jVHBI2hKuKDvC3BrzDpEz91rFOoGMsUKPM2ubZx5mUg8caIsR2KGimw8U0O6SIIexe+iwz149h8e2oNhC8nVel4HhkJjZuIEyzq+CC/uUEKhhPgSMfuuapcsK9ViFtyqWd0zc=; 31:jYDcPaf48NfrOGEUBpdqRfCib0MpyEqck0+aG6NGOpFcYuNh1V442Ad8gUKEjzQVoXY2Qve2d812E98kyV1BTqev/jhMgYgo6dy6cTa9P76koqkHrNi19Ir21amuuY0/9fS9DCkqCrTBjwiVa6TRO4amt/BOBXrsaFlEUUzMY4P2S46ul63U1V6rEF66QZ0J4ZNl5LK5DrzDHxisfQGE7cl2cskTVAvtgvyw4Thtwws= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:BzE0Y0R7xINQMzwzPmwHvPXTN7JVIIfxAnRhH60OtBK7wHoO1bq+hp2uS22h8xHh1iYVXipfY6NgpbHO+FfGuJqC4nUtgjKY7mPTVFf9QfcgQopixaxmorvuiJsdXnH7sZ3D5wlO+krDrLNY/MymRZNIHLLkkTsS5GKp3T0UbfpKlU06ugdLftKdurjqtJcnyFdlOLh4b6bH9wa53a4fTgDXbnStRjPxj2j/nPaN+DpnADsqsPe5zU4JCvG5WGKGfmCZ4dpcTOmnPjQiyCJn+EHWLr5qtOuNrS+xqNBhMnZPqo5uYo5PPHE11XFD4PPKVV2NYE20iqu9SY3LGhBU4r/N0xqQjpGyYBshUzrNq0iqWt3PybVR0FTkt2npsNuCSBXcClliQYY5PNwyYaWmsWcf2926e4YWFR9OLyBdPcVpPIoW5LqCXqyJPjCjir8NBybctaDLqr76AZLXHTu1nbLZHxnkAkigmEqtkDZBWkv5J2l8ZIRJEWbv2qwd9GD5; 4:smVI2m/wJ+zVadcOitwcnUUPRN6uIcq89/+f+7zx4rIIZywhisn3gUy7t1gykuk0IpmZW6BP/DKMrTSFut/99lX9WcmXCvI/7YxCfxb6hI60kwaLDx6QJtAm5gOy1LokI/M4eOAfoJZBDiuVP6CUpCGUqYC3J+/3utMDNRICEG9QYWMuZJZDTsn3HJ4VRkws/8ejTnlCTH+XqI4xJw1Docuk9z68OIxvosuM/hFq/rVqNmgpgn8NO9IetavfNu8+XbOdfQ1tlx1lRmQh534hqA== 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)(3002001)(93006095)(93001095)(10201501046)(3231023)(6055026)(6041248)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR05MB3148; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB3148; X-Forefront-PRVS: 051900244E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(39860400002)(189003)(199004)(25786009)(7696005)(52116002)(305945005)(316002)(51416003)(97736004)(47776003)(2950100002)(5660300001)(66066001)(7736002)(8936002)(16586007)(68736007)(50466002)(48376002)(16526018)(55016002)(6116002)(3846002)(86362001)(105586002)(21086003)(106356001)(2906002)(59450400001)(53936002)(8676002)(6666003)(50226002)(81166006)(81156014)(33026002)(69596002)(76176011)(36756003)(478600001)(118296001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3148; 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; HE1PR05MB3148; 23:789L9KhvFCXsIPGmn1kO6R1WzQ4eLnvj9bZROpGrW?= =?us-ascii?Q?jNXtrBXxtgtcJkOtP4bG1xF++yiesGEapHFW90m16LTV1Ys+wPpRfu84fZ1i?= =?us-ascii?Q?rGI04ZP1GpKY+9x7qK8fYjLZ45LKIjxo9FpPFq2ZDBm7Cleb9VNYl7JN599/?= =?us-ascii?Q?UffGIfIYtW6xrYcbpCxVloyzJRb4pXDCnxIHFunHDmaFjru1MY7pUrpZV3rZ?= =?us-ascii?Q?VtFL1ssqpQri7DKBnP2ZzgswlsAgVtcUoJGW6LOAx0p8CY6yTRHgr592nnn+?= =?us-ascii?Q?bHD0GUwLKsinj2c7VFGhihRzSrGJYEHnnKSjjpOsBivRzzfVZDpgaZ0GwV5G?= =?us-ascii?Q?lMHuzulCIPNOFGaLepS0rnNJkS/cWiRHQtkRPbeASOmN6yn6DFf20n6FCHTF?= =?us-ascii?Q?vR31PkHwlD0KXHQYvzLJiwqEcTr37ssbb9cUFMAQfky/kHy8YHQOwywHLslu?= =?us-ascii?Q?8H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ClZ7aIdT8r7LG+auRZOWMiwHgisHpir0f0GBWCHoLa6EU6NsqCus49dhlIFX/fCHDbRKMTlUPqvrMwUjAaX4/dUrzk9k=; 5:ttLMxRmZZYmJmNFABZ+j6uQEjiTI0+DR9xN09BJMXhfDBpbWZKiKAaeGJ8mQx03J4MJEGt3LydesgMBHA5N7PdHRaVrZOf2rUukzsptxrowZgvfE6zsxK45dx0a+8Y30D4qg1qkVwq9dpBRwIXAn09qLwy9/7Nzj4ntCCSrV0U8=; 24:q8RmazD1M0FzUmWW4EMfiYwsumMJFbGbyJZVHB3rokw8ehVwPN6SynW+Ie6oP+AJAiiCl1oPQmJn1+hG/WWbas8txbH5fgMmYmu5MtVJ9pw=; 7:1/05YyAGjrT893jbOxI/kvhpzROrdEttjJQNZhJMiR+Ip5ICWCeCBG8stNL1+qcJBUhHwtnNYtF7yF/jRdQte5kpI6iwYIQiwNmriaXmlSZRV6CIGG0bCsH7Qm9fczdgNhTQxMM1Fbx39SK1X/0UfQRaUdJytmXcm7PasMdTC6GlUd+LGfl17yvtaDzfT1EWaeUgGWizHJWQ5/3gImzBOw+0hzQamwMJflO2aHU88EQ4pA5byX2P/Vpylof30OjC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:36:11.0983 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 785e972c-02ee-4e23-0de7-08d5415ced53 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3148 Subject: [dpdk-dev] [PATCH v2 34/39] examples/flow_filtering: 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:36:13 -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/flow_filtering/main.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c index 7d739b4..48648f0 100644 --- a/examples/flow_filtering/main.c +++ b/examples/flow_filtering/main.c @@ -138,20 +138,22 @@ struct rte_eth_conf port_conf = { .rxmode = { .split_hdr_size = 0, - /**< Header Split disabled */ - .header_split = 0, - /**< IP checksum offload disabled */ - .hw_ip_checksum = 0, - /**< VLAN filtering disabled */ - .hw_vlan_filter = 0, - /**< Jumbo Frame Support disabled */ - .jumbo_frame = 0, - /**< CRC stripped by hardware */ - .hw_strip_crc = 1, + .ignore_offload_bitfield = 1, + .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, }; + struct rte_eth_rxconf rxq_conf; + struct rte_eth_dev_info dev_info; printf(":: initializing port: %d\n", port_id); + rte_eth_dev_info_get(port_id, &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_id, port_conf.rxmode.offloads, + dev_info.rx_offload_capa); + } ret = rte_eth_dev_configure(port_id, nr_queues, nr_queues, &port_conf); if (ret < 0) { @@ -160,11 +162,13 @@ ret, port_id); } + rxq_conf = dev_info.default_rxconf; + rxq_conf.offloads = port_conf.rxmode.offloads; /* only set Rx queues: something we care only so far */ for (i = 0; i < nr_queues; i++) { ret = rte_eth_rx_queue_setup(port_id, i, 512, rte_eth_dev_socket_id(port_id), - NULL, + &rxq_conf, mbuf_pool); if (ret < 0) { rte_exit(EXIT_FAILURE, -- 1.8.3.1