From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr60080.outbound.protection.outlook.com [40.107.6.80]) by dpdk.org (Postfix) with ESMTP id 126121B3EA for ; Tue, 26 Dec 2017 10:24:32 +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=14dm4DmT8vHeyoCTdwO1uhiAIqYKkZW0/joFHWbviB4=; b=QlOGiaUUlRIDKN9hCFDpC/KeeVERhW5txpKkbZhSqUg4xxt3NfLrarCuylfHTowrQvdZZtV4MxnV9TJmik8ntT5vIRqkx6WuD8ejTOyQzdretHr8wWZYwfzkd68rYVRjqGbg7tTu8ioc1MVVxqM4TWdgB/dTyjgIVqhkgF2KLdU= 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.345.14; Tue, 26 Dec 2017 09:24:31 +0000 From: Shahaf Shuler To: dev@dpdk.org Date: Tue, 26 Dec 2017 11:23:15 +0200 Message-Id: <2366ca5f9b382657388c4e9bad51d3e6c839dc50.1514280005.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: AM5PR0102CA0023.eurprd01.prod.exchangelabs.com (2603:10a6:206::36) To HE1PR05MB3148.eurprd05.prod.outlook.com (2603:10a6:7:36::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16ea4c98-c879-4871-42ce-08d54c4278da X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060); SRVR:HE1PR05MB3148; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 3:G9GPMBqVYoF/38S0OlmvthmBFRW+uKOGTe0wxAMioSM9r1IdVO2xqRzJNhng3TKbZcaCOhO342vkgXs6DEXRqinT/D/K08IOy/160DFE96VfiLP/vJn4axz/pY20BLoXfkT3Z2jiSvugisZS+GzjGkYLdxtzZ9NF0kMzrhnfWc9MDKdBIeFFld/UonxVuGPK6AMe6fOKw9sdNQ9kYOkhpWi5jtp+QIxn1MrZu3wdlcr1Q2CZQttdeRNRJK3jiPHb; 25:iZa3w0+nix2rdxwJHppQzfZv2ek27isIsemm+3LZEXLABFZHg3KqUutixsmht7vQ61qkTchIZbLlYSFvvjTf3Bi+8+Kt0RTW58DmLbIMucRKhmtceyGrhMNeQfitkr27bVRPdmGgRui/094bV92nPjgpfau58o8RcAU9gWW6X9LHvR3FR2g7iam/aMh8uP8I2CfV3DgZ8cfXe5fNotwJ6U5ya9vWq75kdvIKEIO9bTXJ1eL7/TyYyRsALDaCL2rTzVvOTgK1haMHg6qPs/KOoQP9fTAjvHJmb8InZfVq24VHvBBFa1LdOVsxVA+OUd0f9kIp1IXQWORnAhKtU8VirQ==; 31:/tEaQAPKIxrBqTDIRtGebG8vmXyEWdPe3wOgMjbk3kIVEpZHfTOF8LQVp0QBcYrU0JnHAomAAZ5yfD58//4W4ioxU/Xunv6jZP4QjofDIqU2qAttHzzogs7P6lJI4PZZDAq0+gAJ+bxsLPn6QTcN4pCLsTBIJgm0kxG7PZeZrAerdXd4zUFly4laI+8Ckl4o/T1A/imcgwzZOprzur6gLsEbRJfINQb/77qY3cskkhA= X-MS-TrafficTypeDiagnostic: HE1PR05MB3148: X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3148; 20:G/fbrPiX78Q0siF0Rl7T/2+C0wYSqmE6UsrwjSPUK0UCq5k9K74aCQ8y4qj0LBbHTPHEe5y5iZvyTvXKc2MMWmojXshLJtndB2GidmynmOP80IBk9zsl8WvFomjlOwQcT+MtTx2ERkEKfp8cfLGKtB6oModEHupavM9laSM6NsBQc/P+KKnt5CioBH4CW5xL9RLP5XDfSDCsBr+0rGGPkNIyuawxlgUdaEJERP/ggmtiaJ5YpqdtXLnTqbRzGOXLFlMf17JT08K9NSCVU+59RuuCQIL2LOoiIqFXVu0pCh+1zDl5GA/OahG92ZyvDeO9Ca5It/4xP3iNMJVt3pVObPOZhvm9pQFYUuGsxBHGlov+xJh9616eUCW1GTAW7PoaU35ezBwCEluiIhir87PdpRp17j+Zwd6g5tlWfEgRZHiuOBpOnIdIawc3zyzRiugJuizpgLCnU1ELj8jcQa5r0gIv+XNsE9+8tiUeiQgTk2fQySTJ+yVDoZKyl9qZAsPI; 4:mJfHRZwhizmjtggHlL7mG1/LKVan/z7B/m6au2PrVPzLzlP9QkIOWjKFtfhn+ev/9BVBhDoZijlECpubH/3NR2s83IxFEfc6IFwEfV6j690xbHVVNPl20/Myg7l43XdMjPRMCP39+ZooPz/h38Hsh/H4p/DXWkKcPzNd73QP47bUf+tfbXBzbu6owmgSdrfA1Eb+3Rp+2YOcrRgmxaQsdFCfONIMeS7rHmYZJ5543tcBmy9HdcTi3EeU5Lp0vgb0FhDMDzjxod7w7t3gfYpoZQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(944501075)(10201501046)(3002001)(6055026)(6041268)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:HE1PR05MB3148; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR05MB3148; X-Forefront-PRVS: 053315510E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39860400002)(39380400002)(376002)(396003)(189003)(199004)(316002)(6666003)(55016002)(105586002)(478600001)(106356001)(69596002)(16586007)(51416003)(7736002)(48376002)(76176011)(52116002)(305945005)(50466002)(7696005)(2361001)(2351001)(33026002)(8936002)(25786009)(5660300001)(50226002)(118296001)(66066001)(47776003)(21086003)(16526018)(36756003)(6916009)(86362001)(386003)(59450400001)(2906002)(97736004)(53936002)(68736007)(2950100002)(81156014)(81166006)(3846002)(6116002)(8676002); 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:Qsx9i69DoBZHoOURsc/RpF9xLbdO2Yj2Z2dpmSIVf?= =?us-ascii?Q?1yvyXbyyvyUUjLI5mi0eiORxGFl8NWnOZ3BVxLJlp0HnIn5Oa/cYAVXM5UTG?= =?us-ascii?Q?oc7WNRh086AMutRXl5INItKieQ8xuH5QE3MnjqfPDEKQRLDAhgZl1XXwch/3?= =?us-ascii?Q?D6MeKnt0h4lsbvpuQQeVIcsP7BZWuDT/F4HUA84IoZM5n5Upz2R1m/gjf8SV?= =?us-ascii?Q?bFJv3La4hIaRpISumuT6odKjlbd0BcI5JQCF9ny9avBHcHQj1XXjjLnxNrEf?= =?us-ascii?Q?aCoICTNwEfWKK4q4XRDiOw8n9fIzI8gDe4RNHUKoMjgpKi59qzXT2gNBdOzI?= =?us-ascii?Q?I1nF41pKT/mlSxvWzLkSWfE31JKX4gXN7SZ71HnR/+25/HqeZ6lVJl60Y/GI?= =?us-ascii?Q?eRO4weJUlmKG1vSRMc65WDw+2j1RHuzt+21JqwHVFwgvd/95JOPc9cbY/1tW?= =?us-ascii?Q?NS/omwXW094xOmPLtVr/Ty9T7vcQ9+xFVa5OzKjRpzHeL8bnVT9Z9xn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yoB1WESonLZldDNHaYCA5TdZHZlDAbRTQv8V/63X60oPya/NpGccf/KzbFsXdbu87nL50vyQx5HYrKE9wLJvX//uctQBqxSiI3x6HYLjLzvGT6Sfb/VnfNPcgKF0MWiQJxwh67JcAUheqiUmGx0sfs+dLnpVOhAL6hzEzSqXtHh9hw=; 5:lPYgsWolZLXcYyqpMfsTRe7MyTEi+50nLoEeDEFQg+fCGKKLRNv+qUwHlCNcWkVhJTx3bjv7EsM77vK7er1VPxGv88Fk7A5MW5cA/rnZ2k04g4tKX/cpZPOE5Fdd5+DJjWBvwPAw5W0OiPrZ6KDfXEYawKja+ef5IpnNSQM2E18=; 24:Sr1U770cAtBpCqYOQT0lYb+lBxOkBOclzlhBk9QBfunzaQb3LbgF2TCIiQOQPNvLOvypCmx3c+6DxJ9HwiqR+aoMrypbmIs+U8BZvJjtDnA=; 7:xXRWgBOAO9ZR3faJKh+ZLHNaqy/uLxqiRePdQtcywFE5Ix5jQUudnZcYDUgm70WoDbovyb66GEoLRQj+HgaEGMuXRrEUoPYn4uG6C0aedD+gYq/IMMcQ2ZKhPo6XBA45ua5Lr7KkDKLwZRHolUyu69b3CRqx6FGMvww1qNdfPjHE0q6gSh9xPImHGZoEHnbFpQn19fIFDShyZxQT9VcCDse2lsbco9qd7ZWlD7b3yBzimMGfM0anhdjdgrxtklma SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:24:31.8790 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16ea4c98-c879-4871-42ce-08d54c4278da 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 v3 16/39] examples/ipv4_multicast: 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, 26 Dec 2017 09:24:33 -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/ipv4_multicast/main.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 1c5851654..8e59e534d 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -138,14 +138,13 @@ static struct rte_eth_conf port_conf = { .rxmode = { .max_rx_pkt_len = JUMBO_FRAME_MAX_SIZE, .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 = 1, /**< Jumbo Frame Support enabled */ - .hw_strip_crc = 1, /**< CRC stripped by hardware */ + .ignore_offload_bitfield = 1, + .offloads = (DEV_RX_OFFLOAD_JUMBO_FRAME | + DEV_RX_OFFLOAD_CRC_STRIP), }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, + .offloads = DEV_TX_OFFLOAD_MULTI_SEGS, }, }; @@ -714,6 +713,9 @@ main(int argc, char **argv) /* initialize all ports */ for (portid = 0; portid < nb_ports; portid++) { + struct rte_eth_rxconf rxq_conf; + struct rte_eth_conf local_port_conf = port_conf; + /* skip ports that are not enabled */ if ((enabled_port_mask & (1 << portid)) == 0) { printf("Skipping disabled port %d\n", portid); @@ -724,8 +726,9 @@ main(int argc, char **argv) /* limit the frame size to the maximum supported by NIC */ rte_eth_dev_info_get(portid, &dev_info); - port_conf.rxmode.max_rx_pkt_len = RTE_MIN( - dev_info.max_rx_pktlen, port_conf.rxmode.max_rx_pkt_len); + local_port_conf.rxmode.max_rx_pkt_len = RTE_MIN( + dev_info.max_rx_pktlen, + local_port_conf.rxmode.max_rx_pkt_len); /* get the lcore_id for this port */ while (rte_lcore_is_enabled(rx_lcore_id) == 0 || @@ -748,8 +751,9 @@ main(int argc, char **argv) n_tx_queue = nb_lcores; if (n_tx_queue > MAX_TX_QUEUE_PER_PORT) n_tx_queue = MAX_TX_QUEUE_PER_PORT; + ret = rte_eth_dev_configure(portid, 1, (uint16_t)n_tx_queue, - &port_conf); + &local_port_conf); if (ret < 0) rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%d\n", ret, portid); @@ -769,9 +773,11 @@ main(int argc, char **argv) queueid = 0; printf("rxq=%hu ", queueid); fflush(stdout); + rxq_conf = dev_info.default_rxconf; + rxq_conf.offloads = local_port_conf.rxmode.offloads; ret = rte_eth_rx_queue_setup(portid, queueid, nb_rxd, rte_eth_dev_socket_id(portid), - NULL, + &rxq_conf, packet_pool); if (ret < 0) rte_exit(EXIT_FAILURE, "rte_eth_tx_queue_setup: err=%d, port=%d\n", @@ -787,7 +793,8 @@ main(int argc, char **argv) fflush(stdout); txconf = &dev_info.default_txconf; - txconf->txq_flags = 0; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; + txconf->offloads = local_port_conf.txmode.offloads; ret = rte_eth_tx_queue_setup(portid, queueid, nb_txd, rte_lcore_to_socket_id(lcore_id), txconf); if (ret < 0) -- 2.12.0