From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0044.outbound.protection.outlook.com [104.47.0.44]) by dpdk.org (Postfix) with ESMTP id 8C9F01B258 for ; Tue, 12 Dec 2017 13:27:59 +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=pLZVbupT6VoApDgIpHyQLukE81hHgZnmZIOdUj4dsAg=; b=KjD32pxTcJgi1MvdYiDp9vJs3KUXdsrEmJuwfkaQsv4gTH27Jo8h5CNy+gzD/s3NmyJWp1+Gzp+jplIJUlDhreAe7dCUEFkBFtstmXHrWkEs62Gg9GXe/TS6XtjsDxmlnTcl9n36cRCj57Fpu6Ala7GqrcV2mNFn6mVuMfaD5xY= 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:57 +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:42 +0200 Message-Id: <65a8beeed022f8ad6c3713fe8c8e0e116a37a5b3.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: 3b711e62-b71c-48c8-ee30-08d5415bc70d 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:CAYxtrazrRcR0/LZX2kBEHs1MPyT7d+viMgE5cixMAczvDZkTHkF8u4BF1LkpIGstjD0NbwtmGtMe3V1irP2Kkqh9VWUujklbpS2/q8AZCLkIw9hCwPPzw0yc/xl6wwTFOuPohOsgNl+qbrMmKvLAscpYNKCbI3icoG/n9aBOck+cO1GYSXny2Hs3aeWMtO9c6xsrPJATrwhFndpdS7zphDdMUxbtvtrur8RciKl1jBj6G3g2O1NokoDL2Zjz0kZ; 25:ImcBFcse7tuMF23lhnvoSi/PNUdtFHQk9KXi1AJHz7PN1d8fIKSDYDSAVWxz+21JW+WSI0hKcXlLWutvOJx9KEZV5m2lnbdmelX4ueYcf/wkFo7ZCSKPRocfqzK9Xct+T2w5IlgxCyTcJlK/TL2NnBEHys69ewe3FcgrZB3zsVj1jASptzzY4RbmtmB2a1ovmmc9Qf/cDl1Az9Gf8JEeddintEAxTpP4v6DckvowAFLpbnkGKZL5Tmjo5g6V2lerrUvYb0Hr7h/LRR97Q37i5YNTeAwyX4WakSIs404KwvcWhwQIzYuP8YTCiaFRtG8m+Ex6fAaaV76SPIR3G1W8rQ==; 31:k+YFGuq/ceW0zmKXVp4Ra6VFd2nC8KbtBesV8WB6PJ+mOPUWNfztKRPL5/XnzHEtsPsHMC7jQh2OG9UWaOaQJ0XBPOlJnKIdCnlIRB0qbrxH7k14wSV+Z6iwecSzzLf+CzICO+NMOY+svJ/zl8kdzzGil3EmJcmxb3mqt4/Poh5IXrxIzj/rMki6eA8KxrW1B/OJ5n1LX8MnX6a3eymr1uoc1FLrnUe4wB3I9YhWkYE= X-MS-TrafficTypeDiagnostic: VI1PR05MB3149: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3149; 20:dAoGhhzb3W6WrAB9OG0UdTxrW3DqmGKKyMk9c+oX40vPbx+Msr+WnXusur0WReNyv3YzaVpX5ep2ETAHiz6yuVgasX9T9xj8J36sa2QcDI6IV5D9pCNIWJc3RZeF0t90O9eJFoIilUoZaqtD4ER2JXxmeaM+q7BgOpCR8rwH78ak8mVGlaMKBDUFSJwh7VpUtG4eS4HCM7BQoWUk/8UJQU+UzumQovcLlLvSWHIkntcleRWjr5NbQ/Xen6oWqG6v86hnBBDTMkMo03KPyV+YZhUp/MMfFQb31EPWUR3S83T5p22RyUR/1d5BqLGvbx6Tx7Jo+O+tjI5OsOY/y+2DiwE++TfwjPdzOokiUF2GegCau4pWZK6feHcz6mKjuLjZlMS5ce014O08ZmXwYBBLQLnfSrQ1ye1Vo7tScE3pkEmnI+QF8IBumiFGEJZt5v+6DbflmPCQOzlVNG9pQunLssRuwYWrymwkbJet71+JkZu9k5RADw5Z0Jc+hNjxNVa3; 4:FONQpgfBWsj04vAj2r0tsX6P/9dqYRVgkAKzpm1VOcf+0pMn9h3Aju+3AfgYuXf40zBAT44/o4fsNZwfQsCvPBe7Wkq9msdR2vqOfakVgCXyj/0nv24FbB32HlKcOGo6ZZtLpCiMQFLH9U0NOPmGF4p3cNO0RGhwE3AsBjZynmoXrENYbPLBV5qEYSy68Z05ToKYO58ewXhORZeoN2V0MUC1Va3q/Iw4/4iCNAIe33uLFWhyEPf+oSpoYFwUGHhNpsQjSQEBcWeV+jrkz+ydMQ== 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:kS6EtXNsN/m4u3xqLJ6rPKqgK8dVeVVFFt4YHCunt?= =?us-ascii?Q?2Kx/JWpfZzG2hIteBO+K6Si2HTktJx+QafOIKl3sJTuAF2Wvnz4NpLhOCHic?= =?us-ascii?Q?rQEZ9hfvLQpcEwFee0OL0znHGB38BJt0I4qoZPYgOjz5ISFfXgqfIZdoQX3h?= =?us-ascii?Q?wvceR7gMaMnifNWK/zERUk6sIuf9gL47xMZvo9iqnr7rV0c5z9Npu4L/4gX9?= =?us-ascii?Q?SHCYYtls2/EeyQ1njOyi/YOZAY0ldnCmKFJrS8fQQLTPtktA8sEoPhtBu0Xl?= =?us-ascii?Q?DmaOlNSNISlre9pB/RG69faEZ1DxDiYAUZ+cRfBj8Bf/6B+M2vzax37lGoGI?= =?us-ascii?Q?3PrIKtXK2pytmBECwD5jidZgZDpcG6GI6IwGnCovFmAwChqAGva9+rYcIhxp?= =?us-ascii?Q?M+1aR2yO1WvaVTMiiXX3pwE5K4BSbv/8yLAeXUVIT62Uy5IrHMd2Yz75OTV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r30fR9RR0ASEJZR9H08ut69yg6IdIu5bAlNvH4mygPfVddiyw5bNIgBsrDcDtZrUpq7JCT3R+tb0CDmEPLoOM6OE2VtwuYJ3ofVJFohqC+qC8gD8xDk=; 5:rVsos7hXpJ2j9Lzaw+N0qXyJ36FZTyh6OKDLs/D7j7F1RBYF8eGV+QXNU63Seuz2CsvGQocsgi+hhDkENqDf4IYLGo3c9gIUv/BQIGI2bpshbcRQngT+H8v3UK7IcvicWI2rgJVMNwlJak5QXFI0As7zuwgt7N+TwOA0tMBny3c=; 24:+Ibn3r5INWpwLk00rNaP9A5BzyXFmWDpXbJOIdReQQgqPMY/Ef1VS/6JnET4JODeZWDv9kKZFVPMRNQfNVLe4P1ddCk6x7DZx59wu2e0NGQ=; 7:1OoV2+nKhqTtuC26JRSXRxBUpc8NxjvFwuDe2tsCF+RMXx9uEyVN/b0y7fRYzxs447VLBvsT8Aa4b3GpboDOCQiHPyxx8PEbPF5GQyFlxhhmQSbD57L7JIhypxgbnnBEwkSIeaouHS/V1HzG3K+yvceY3jWQa4+k72Uo/8Y3mOPEz2J7l+Rmsha/iGicMckGUtIeFts92XqZSVonoJT07bs7wawd7/MLd9yip+DlT2P0G9RVES3BTE4cVnXfCxmi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 12:27:57.0826 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b711e62-b71c-48c8-ee30-08d5415bc70d 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 25/39] examples/tep_termination: 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:27:59 -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/tep_termination/vxlan_setup.c | 36 +++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index 1ad4ca3..4edde1b 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -95,17 +95,23 @@ RTE_TUNNEL_FILTER_OMAC_TENID_IMAC,}; /* Options for configuring ethernet port */ -static const struct rte_eth_conf port_conf = { +static struct rte_eth_conf port_conf = { .rxmode = { .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 */ - .hw_strip_crc = 1, /**< CRC stripped by hardware */ + .ignore_offload_bitfield = 1, + .offloads = DEV_RX_OFFLOAD_CRC_STRIP, }, .txmode = { .mq_mode = ETH_MQ_TX_NONE, + .offloads = (DEV_TX_OFFLOAD_IPV4_CKSUM | + DEV_TX_OFFLOAD_UDP_CKSUM | + DEV_TX_OFFLOAD_TCP_CKSUM | + DEV_TX_OFFLOAD_SCTP_CKSUM | + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | + DEV_TX_OFFLOAD_TCP_TSO | + DEV_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_VXLAN_TNL_TSO | + DEV_TX_OFFLOAD_MBUF_FAST_FREE), }, }; @@ -154,7 +160,7 @@ rxconf = &dev_info.default_rxconf; txconf = &dev_info.default_txconf; - txconf->txq_flags = 0; + txconf->txq_flags = ETH_TXQ_FLAGS_IGNORE; if (port >= rte_eth_dev_count()) return -1; @@ -162,6 +168,20 @@ rx_rings = nb_devices; /* Configure ethernet device. */ + 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, rx_rings, tx_rings, &port_conf); if (retval != 0) return retval; @@ -172,6 +192,7 @@ return retval; /* Setup the queues. */ + rxconf->offloads = port_conf.rxmode.offloads; for (q = 0; q < rx_rings; q++) { retval = rte_eth_rx_queue_setup(port, q, rx_ring_size, rte_eth_dev_socket_id(port), @@ -180,6 +201,7 @@ if (retval < 0) return retval; } + txconf->offloads = port_conf.txmode.offloads; for (q = 0; q < tx_rings; q++) { retval = rte_eth_tx_queue_setup(port, q, tx_ring_size, rte_eth_dev_socket_id(port), -- 1.8.3.1