From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0046.outbound.protection.outlook.com [104.47.32.46]) by dpdk.org (Postfix) with ESMTP id 75C171B00C for ; Fri, 5 Jan 2018 19:11:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0bHl2xfPcM21FQq21Kw3BRHUIQp0QekbFNyHSPq/X/M=; b=Yu4dU5FmeQNQatlaT3P9xdgRh9GSpy1tTlPSjgg7RD5J6+YMQfojWxACu/nM6q9jV7FODTDkIYgH7zkdKif5xILJz2eOs7SO8leAe9WAB6dP4OHi9v5D3AInUMYTvgt9F1fR2RN+SwwdPryBqGkEYpEOk0oqIt3BJuY/+F/c07Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Maciej.Czekaj@cavium.com; Received: from [10.0.0.58] (31.172.191.173) by BN6PR07MB2882.namprd07.prod.outlook.com (10.173.28.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 5 Jan 2018 18:11:13 +0000 To: Shahaf Shuler , ferruh.yigit@intel.com, jingjing.wu@intel.com Cc: dev@dpdk.org References: <20171123120804.143897-1-shahafs@mellanox.com> <9dec91975cdd1a59e3cac99d0fd4bd8672544a4f.1513082773.git.shahafs@mellanox.com> From: Maciej Czekaj Message-ID: Date: Fri, 5 Jan 2018 19:11:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <9dec91975cdd1a59e3cac99d0fd4bd8672544a4f.1513082773.git.shahafs@mellanox.com> Content-Language: en-US X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: AM5PR0502CA0024.eurprd05.prod.outlook.com (10.175.37.162) To BN6PR07MB2882.namprd07.prod.outlook.com (10.173.28.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6416d87b-0184-4202-0df0-08d55467b541 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR07MB2882; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB2882; 3:X7oHMJuBqSUY9EczaSR3zlEvs5/N7RtWW85DWKOWVtya3DjNtKgD6bg6csvRUE5bzZXhU7wYKvzgSRhXcX4lg+Ch1PleUcEG0jhK7hDLTbW5JMcWWTlb3psRB8zX8U8y5o1jYJH2xP1DwNpMPFxWs669CXuvLFcr0Ueh5JMFapeKM5HJ51JJ1mFZeZx7S7pBxhu/+wBhJmV3qz6vDuJAc/QOMsHP9QGnyRm0xrywdqz5fT94nHKxSnzpaALs0n3x; 25:EG79gishv3Ajuy0zSRW16HIrZ19JihURj96+dRcbvsyeKnCmp7BmbxQOnqqUeFizPdQBYy/6WA1KdtAuVDRRy42S0KfJnufCEnMdL+tKbLopgnqngU2xfGggH9FSorKiwcJwip5qwjXuwuLfmQ8FI4nxY7JFp+YZ98RcY4dIUHtLF18QX9Y39K+XzIN6aRBQeUiEGwZPxb0xvw/tGOuB3zly5k/oM+k2xJVOCd2EW5L1S1n1SUKwxzWAkgzZwII+lWji67aNmfNO1VLdWOzUTnbQ4waTIWJ5mJnAkfCvH+4HiL0x7TdCQhXtSPUiriC9DRtTAaFGs5LNcdDTQoGZag==; 31:UShhGpGqfZQbr/PBmIiSImvdg92Xb4kKn+PLlAY6LjwAaab46FXBH05POZnsrs2TOWzjKp9fHzC6ChLzJLyW1Ij7BR33jpKGu117I94SVtrq4EvNiFaP3QQL7BClnLdUhNugX8x6R+HebMZ/WcYMm3/DgHpnA6WCDzoowBL8fmb8WzTIA9tlp7gY6+bnKGm+fNzkVHtgNpn//Yqf9cLoapCjiv+3WSIuWQCk6nfBs0c= X-MS-TrafficTypeDiagnostic: BN6PR07MB2882: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB2882; 20:LgBSFWCN3LtT1nBKzNH/SbkUu1a0H+gj+2cLUC1bSBEX7HwQhTxHRT0gwM4ysmfFbYbrUwmOJeFRJQM9fOo5+bSVGK+RU40wM2jrz/2DXL4z5D3yycHRusTZuFjq2XM3YVZ/7ArBwewzWyXiFbiDT1RwQ1sNT7OK6RD8/IfO4oJVGnoNk2odgbJnf5d8OK0GcgLF25BTIlwinL1E5ZQylD8ypiu006WR96bBPWqM5coQbqaplGxVRz2npWumTXPogfRbswGytkDaPN68fYrOcHL0/ozSREmkWXYaBbmIqewiGuzzqqyyRaDx4AhaONy9uyXIWtI2BUvi0rMeSqAA9H/cwU1jjyZBI5o2tdsU4QRypBhOuhKpGVwgshro0pa/+M87tMegTjuDS2CxXeSRV2UHwXLkuO/uNtfge+KaIGlvD0qAuNs5XMEUfyaTIO2eBQtEP63z3HLTFVs/msKOa+EP8kHVI7/U4CLXWWscOCb196XcZVUZmFHS54w+1gW8epZdGhYBdavQxr+4UxmDc2u5aQB+oP5ogr6MBaU6Dx2DVKmWP9rMEXMOcGDW6k5KQqeQK7YOMbD6cxn7RbxiVbENMD/3QxuBzezirMwkAsQ=; 4:9csHqF9e7LJiaHJJdG1DWIvDOtK9qSYRzEakDtr1rb6EFN9dmoj+Y4/tAc+PS5tF9XxnXQbKjVKFwbtLaF0ggP7CTm4y6nbVAJQa7yJIHouiby1jgLntUpZR+vlH1YIas4N31ywBCKlb5aqiBkYwURua0Sd+r7K7P7ztR1mu+whVmw2f/AivbYpvBNIOGIdHTzhElRADWKcDdP1kiX6KQje8UeacAqs6+HNIEYj8LSWATHRxeBDgA1xiVxygupvqOTeKmEvZDGxjlgMf/ENzGQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(3002001)(10201501046)(93006095)(6041268)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:BN6PR07MB2882; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB2882; X-Forefront-PRVS: 05437568AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(39860400002)(366004)(39380400002)(396003)(376002)(346002)(199004)(189003)(478600001)(16526018)(386003)(106356001)(76176011)(25786009)(81166006)(58126008)(7736002)(52116002)(33964004)(31686004)(4326008)(37036004)(68736007)(64126003)(16576012)(72206003)(16586007)(8936002)(81156014)(83506002)(105586002)(8676002)(31696002)(53946003)(54896002)(2950100002)(316002)(5660300001)(65826007)(97736004)(53936002)(36756003)(42882006)(6666003)(6116002)(90366009)(3846002)(84326002)(65956001)(59450400001)(6246003)(66066001)(65806001)(236005)(2906002)(77096006)(229853002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB2882; H:[10.0.0.58]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB2882; 23:CozBonizGCOtpioqkcEQB+ITB1z+Z12wbJVZCaTOL?= =?us-ascii?Q?Z71UAwxbSYG67yVFZzF2nLcMHlJCBFHwijEVIbNxg5xrad148Tl02jq2hac3?= =?us-ascii?Q?TuEZaXKp1DE5TwLWgcssGkvYY7LT+SZJWDxdd/Y4cyg0nQK+3sP63+SkgE0s?= =?us-ascii?Q?fyqu0Ev7EslnjCMz91o+LAGAvaDNCUZ6sDFZrv324xMKaause4lX/JZ5mJPs?= =?us-ascii?Q?06wY7AA579krTQg7aUYXzXvALiCe/Up2UDaNmxo1rRpN7tCm45VnqzR/MP12?= =?us-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ugv5KiRhi480EMXUztbJpN0t8CEttN5YIh6PoFTGI+yQMyJlnzNAgDQibuzbcTkSVFMDqBFCYLNqmvTKjV3roFP2C8vjADBApOvdqd2QbNpGz6kOKr1P97jdCKZIGJS40E4N2W+XVuMOz+d SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2018 18:11:13.2253 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6416d87b-0184-4202-0df0-08d55467b541 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB2882 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 04/10] app/testpmd: convert to new Ethdev Tx 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: Fri, 05 Jan 2018 18:11:17 -0000 -- Oryginal message -- > Ethdev Tx offloads API has changed since: > > commit cba7f53b717d ("ethdev: introduce Tx queue offloads API") > > Convert the application to use the new API. > > This patch mandates the port to be stopped when configure the Tx > offloads. This is because the PMD must be aware to the offloads changes > on the device and queue configuration. > > Signed-off-by: Shahaf Shuler > --- > app/test-pmd/cmdline.c | 90 ++++++++++++++++++++++++++++++++++++++++++--- > app/test-pmd/config.c | 55 ++++++++++++++++++--------- > app/test-pmd/testpmd.c | 3 ++ > 3 files changed, 124 insertions(+), 24 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index d8c73a9..5812583 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -3439,7 +3439,14 @@ struct cmd_tx_vlan_set_result { > { > struct cmd_tx_vlan_set_result *res = parsed_result; > > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > + > tx_vlan_set(res->port_id, res->vlan_id); > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } > > cmdline_parse_token_string_t cmd_tx_vlan_set_tx_vlan = > @@ -3486,7 +3493,14 @@ struct cmd_tx_vlan_set_qinq_result { > { > struct cmd_tx_vlan_set_qinq_result *res = parsed_result; > > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > + > tx_qinq_set(res->port_id, res->vlan_id, res->vlan_id_outer); > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } > > cmdline_parse_token_string_t cmd_tx_vlan_set_qinq_tx_vlan = > @@ -3592,7 +3606,14 @@ struct cmd_tx_vlan_reset_result { > { > struct cmd_tx_vlan_reset_result *res = parsed_result; > > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > + > tx_vlan_reset(res->port_id); > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } > > cmdline_parse_token_string_t cmd_tx_vlan_reset_tx_vlan = > @@ -3685,11 +3706,16 @@ struct cmd_csum_result { > struct cmd_csum_result *res = parsed_result; > int hw = 0; > uint16_t mask = 0; > + uint64_t csum_offloads = 0; > > if (port_id_is_invalid(res->port_id, ENABLED_WARN)) { > printf("invalid port %d\n", res->port_id); > return; > } > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > > if (!strcmp(res->mode, "set")) { > > @@ -3698,22 +3724,34 @@ struct cmd_csum_result { > > if (!strcmp(res->proto, "ip")) { > mask = TESTPMD_TX_OFFLOAD_IP_CKSUM; > + csum_offloads |= DEV_TX_OFFLOAD_IPV4_CKSUM; > } else if (!strcmp(res->proto, "udp")) { > mask = TESTPMD_TX_OFFLOAD_UDP_CKSUM; > + csum_offloads |= DEV_TX_OFFLOAD_UDP_CKSUM; > } else if (!strcmp(res->proto, "tcp")) { > mask = TESTPMD_TX_OFFLOAD_TCP_CKSUM; > + csum_offloads |= DEV_TX_OFFLOAD_TCP_CKSUM; > } else if (!strcmp(res->proto, "sctp")) { > mask = TESTPMD_TX_OFFLOAD_SCTP_CKSUM; > + csum_offloads |= DEV_TX_OFFLOAD_SCTP_CKSUM; > } else if (!strcmp(res->proto, "outer-ip")) { > mask = TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM; > + csum_offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM; > } > > - if (hw) > + if (hw) { > ports[res->port_id].tx_ol_flags |= mask; > - else > + ports[res->port_id].dev_conf.txmode.offloads |= > + csum_offloads; > + } else { > ports[res->port_id].tx_ol_flags &= (~mask); > + ports[res->port_id].dev_conf.txmode.offloads &= > + (~csum_offloads); > + } > } > csum_show(res->port_id); > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } > > cmdline_parse_token_string_t cmd_csum_csum = > @@ -3837,15 +3875,24 @@ struct cmd_tso_set_result { > > if (port_id_is_invalid(res->port_id, ENABLED_WARN)) > return; > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > > if (!strcmp(res->mode, "set")) > ports[res->port_id].tso_segsz = res->tso_segsz; > > - if (ports[res->port_id].tso_segsz == 0) > + if (ports[res->port_id].tso_segsz == 0) { > + ports[res->port_id].dev_conf.txmode.offloads &= > + ~DEV_TX_OFFLOAD_TCP_TSO; > printf("TSO for non-tunneled packets is disabled\n"); > - else > + } else { > + ports[res->port_id].dev_conf.txmode.offloads |= > + DEV_TX_OFFLOAD_TCP_TSO; > printf("TSO segment size for non-tunneled packets is %d\n", > ports[res->port_id].tso_segsz); > + } > > /* display warnings if configuration is not supported by the NIC */ > rte_eth_dev_info_get(res->port_id, &dev_info); > @@ -3854,6 +3901,8 @@ struct cmd_tso_set_result { > printf("Warning: TSO enabled but not " > "supported by port %d\n", res->port_id); > } > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } > > cmdline_parse_token_string_t cmd_tso_set_tso = > @@ -3939,13 +3988,27 @@ struct cmd_tunnel_tso_set_result { > > if (port_id_is_invalid(res->port_id, ENABLED_WARN)) > return; > + if (!port_is_stopped(res->port_id)) { > + printf("Please stop port %d first\n", res->port_id); > + return; > + } > > if (!strcmp(res->mode, "set")) > ports[res->port_id].tunnel_tso_segsz = res->tso_segsz; > > - if (ports[res->port_id].tunnel_tso_segsz == 0) > + if (ports[res->port_id].tunnel_tso_segsz == 0) { > + ports[res->port_id].dev_conf.txmode.offloads &= > + ~(DEV_TX_OFFLOAD_VXLAN_TNL_TSO | > + DEV_TX_OFFLOAD_GRE_TNL_TSO | > + DEV_TX_OFFLOAD_IPIP_TNL_TSO | > + DEV_TX_OFFLOAD_GENEVE_TNL_TSO); > printf("TSO for tunneled packets is disabled\n"); > - else { > + } else { > + ports[res->port_id].dev_conf.txmode.offloads |= > + (DEV_TX_OFFLOAD_VXLAN_TNL_TSO | > + DEV_TX_OFFLOAD_GRE_TNL_TSO | > + DEV_TX_OFFLOAD_IPIP_TNL_TSO | > + DEV_TX_OFFLOAD_GENEVE_TNL_TSO); > printf("TSO segment size for tunneled packets is %d\n", > ports[res->port_id].tunnel_tso_segsz); > > @@ -3971,6 +4034,8 @@ struct cmd_tunnel_tso_set_result { > printf("Warning: csum set outer-ip must be set to hw " > "if outer L3 is IPv4; not necessary for IPv6\n"); > } > + > + cmd_reconfig_device_queue(res->port_id, 1, 1); > } > > cmdline_parse_token_string_t cmd_tunnel_tso_set_tso = > @@ -13012,8 +13077,13 @@ struct cmd_macsec_offload_on_result { > > if (port_id_is_invalid(port_id, ENABLED_WARN)) > return; > + if (!port_is_stopped(port_id)) { > + printf("Please stop port %d first\n", port_id); > + return; > + } > > ports[port_id].tx_ol_flags |= TESTPMD_TX_OFFLOAD_MACSEC; > + ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MACSEC_INSERT; > #ifdef RTE_LIBRTE_IXGBE_PMD > ret = rte_pmd_ixgbe_macsec_enable(port_id, en, rp); > #endif > @@ -13022,6 +13092,7 @@ struct cmd_macsec_offload_on_result { > > switch (ret) { > case 0: > + cmd_reconfig_device_queue(port_id, 1, 1); > break; > case -ENODEV: > printf("invalid port_id %d\n", port_id); > @@ -13096,14 +13167,21 @@ struct cmd_macsec_offload_off_result { > > if (port_id_is_invalid(port_id, ENABLED_WARN)) > return; > + if (!port_is_stopped(port_id)) { > + printf("Please stop port %d first\n", port_id); > + return; > + } > > ports[port_id].tx_ol_flags &= ~TESTPMD_TX_OFFLOAD_MACSEC; > + ports[port_id].dev_conf.txmode.offloads &= > + ~DEV_TX_OFFLOAD_MACSEC_INSERT; > #ifdef RTE_LIBRTE_IXGBE_PMD > ret = rte_pmd_ixgbe_macsec_disable(port_id); > #endif > > switch (ret) { > case 0: > + cmd_reconfig_device_queue(port_id, 1, 1); > break; > case -ENODEV: > printf("invalid port_id %d\n", port_id); > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 2fdc051..ee7d083 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -616,8 +616,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) { > printf("VLAN insert: "); > - if (ports[port_id].tx_ol_flags & > - TESTPMD_TX_OFFLOAD_INSERT_VLAN) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_VLAN_INSERT) > printf("on\n"); > else > printf("off\n"); > @@ -634,8 +634,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_QINQ_INSERT) { > printf("Double VLANs insert: "); > - if (ports[port_id].tx_ol_flags & > - TESTPMD_TX_OFFLOAD_INSERT_QINQ) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_QINQ_INSERT) > printf("on\n"); > else > printf("off\n"); > @@ -643,7 +643,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) { > printf("TX IPv4 checksum: "); > - if (ports[port_id].tx_ol_flags & TESTPMD_TX_OFFLOAD_IP_CKSUM) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_IPV4_CKSUM) > printf("on\n"); > else > printf("off\n"); > @@ -651,7 +652,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) { > printf("TX UDP checksum: "); > - if (ports[port_id].tx_ol_flags & TESTPMD_TX_OFFLOAD_UDP_CKSUM) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_UDP_CKSUM) > printf("on\n"); > else > printf("off\n"); > @@ -659,7 +661,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_CKSUM) { > printf("TX TCP checksum: "); > - if (ports[port_id].tx_ol_flags & TESTPMD_TX_OFFLOAD_TCP_CKSUM) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_TCP_CKSUM) > printf("on\n"); > else > printf("off\n"); > @@ -667,7 +670,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SCTP_CKSUM) { > printf("TX SCTP checksum: "); > - if (ports[port_id].tx_ol_flags & TESTPMD_TX_OFFLOAD_SCTP_CKSUM) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_SCTP_CKSUM) > printf("on\n"); > else > printf("off\n"); > @@ -675,8 +679,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) { > printf("TX Outer IPv4 checksum: "); > - if (ports[port_id].tx_ol_flags & > - TESTPMD_TX_OFFLOAD_OUTER_IP_CKSUM) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) > printf("on\n"); > else > printf("off\n"); > @@ -684,7 +688,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) { > printf("TX TCP segmentation: "); > - if (ports[port_id].tso_segsz != 0) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_TCP_TSO) > printf("on\n"); > else > printf("off\n"); > @@ -692,7 +697,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_UDP_TSO) { > printf("TX UDP segmentation: "); > - if (ports[port_id].tso_segsz != 0) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_UDP_TSO) > printf("on\n"); > else > printf("off\n"); > @@ -700,7 +706,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VXLAN_TNL_TSO) { > printf("TSO for VXLAN tunnel packet: "); > - if (ports[port_id].tunnel_tso_segsz) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_VXLAN_TNL_TSO) > printf("on\n"); > else > printf("off\n"); > @@ -708,7 +715,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GRE_TNL_TSO) { > printf("TSO for GRE tunnel packet: "); > - if (ports[port_id].tunnel_tso_segsz) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_GRE_TNL_TSO) > printf("on\n"); > else > printf("off\n"); > @@ -716,7 +724,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_IPIP_TNL_TSO) { > printf("TSO for IPIP tunnel packet: "); > - if (ports[port_id].tunnel_tso_segsz) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_IPIP_TNL_TSO) > printf("on\n"); > else > printf("off\n"); > @@ -724,7 +733,8 @@ struct rss_type_info { > > if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO) { > printf("TSO for GENEVE tunnel packet: "); > - if (ports[port_id].tunnel_tso_segsz) > + if (ports[port_id].dev_conf.txmode.offloads & > + DEV_TX_OFFLOAD_GENEVE_TNL_TSO) > printf("on\n"); > else > printf("off\n"); > @@ -1703,8 +1713,10 @@ struct igb_ring_desc_16_bytes { > tx_conf->tx_thresh.pthresh, > tx_conf->tx_thresh.hthresh, > tx_conf->tx_thresh.wthresh); > - printf(" TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n", > - tx_conf->tx_rs_thresh, tx_conf->txq_flags); > + printf(" TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"" > + " - TXQ offloads=0x%"PRIx64"\n", > + tx_conf->tx_rs_thresh, tx_conf->txq_flags, > + tx_conf->offloads); > } > } > > @@ -2782,6 +2794,7 @@ struct igb_ring_desc_16_bytes { > tx_vlan_set(portid_t port_id, uint16_t vlan_id) > { > int vlan_offload; > + > if (port_id_is_invalid(port_id, ENABLED_WARN)) > return; > if (vlan_id_is_invalid(vlan_id)) > @@ -2795,6 +2808,7 @@ struct igb_ring_desc_16_bytes { > > tx_vlan_reset(port_id); > ports[port_id].tx_ol_flags |= TESTPMD_TX_OFFLOAD_INSERT_VLAN; > + ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_VLAN_INSERT; > ports[port_id].tx_vlan_id = vlan_id; > } > > @@ -2802,6 +2816,7 @@ struct igb_ring_desc_16_bytes { > tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer) > { > int vlan_offload; > + > if (port_id_is_invalid(port_id, ENABLED_WARN)) > return; > if (vlan_id_is_invalid(vlan_id)) > @@ -2817,6 +2832,7 @@ struct igb_ring_desc_16_bytes { > > tx_vlan_reset(port_id); > ports[port_id].tx_ol_flags |= TESTPMD_TX_OFFLOAD_INSERT_QINQ; > + ports[port_id].dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_QINQ_INSERT; > ports[port_id].tx_vlan_id = vlan_id; > ports[port_id].tx_vlan_id_outer = vlan_id_outer; > } > @@ -2828,6 +2844,9 @@ struct igb_ring_desc_16_bytes { > return; > ports[port_id].tx_ol_flags &= ~(TESTPMD_TX_OFFLOAD_INSERT_VLAN | > TESTPMD_TX_OFFLOAD_INSERT_QINQ); > + ports[port_id].dev_conf.txmode.offloads &= > + ~(DEV_TX_OFFLOAD_VLAN_INSERT | > + DEV_TX_OFFLOAD_QINQ_INSERT); > ports[port_id].tx_vlan_id = 0; > ports[port_id].tx_vlan_id_outer = 0; > } > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 77154ef..0087438 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -1498,6 +1498,9 @@ static int eth_event_callback(portid_t port_id, > } > if (port->need_reconfig_queues > 0) { > port->need_reconfig_queues = 0; > + port->tx_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE; > + /* Apply Tx offloads configuration */ > + port->tx_conf.offloads = port->dev_conf.txmode.offloads; FAST_FREE flag got lost during conversion. Per-queue configuration flags are initialized with PMD-specific default values in rxtx_port_config: rxtx_port_config(struct rte_port *port) {     port->rx_conf = port->dev_info.default_rxconf;     port->tx_conf = port->dev_info.default_txconf; ... but port->dev_conf.txmode is taken from global variable txmode, not from PMD. See in init_config():         /* Apply default Tx configuration for all ports */         port->dev_conf.txmode = tx_mode;         port->dev_conf.rxmode = rx_mode; So the configuration will not be consistent, i.e. different flags in tx_queue_setup() and different in dev_configure(). If the intention is to keep defaults from PMD, let's fix this... If not, please apply FAST_FREE flag  as in example patch v3, e.g: +        rte_eth_dev_info_get(portid, &dev_info); +        if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) +            local_port_conf.txmode.offloads |= +                DEV_TX_OFFLOAD_MBUF_FAST_FREE; > /* setup tx queues */ > for (qi = 0; qi < nb_txq; qi++) { > if ((numa_support) &&