From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 444ED1B00C for ; Thu, 18 Jan 2018 08:16:16 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 0F6EAB4006E; Thu, 18 Jan 2018 07:16:15 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Thu, 18 Jan 2018 07:16:08 +0000 To: Thomas Monjalon , Ivan Malov CC: , Ferruh Yigit , Shahaf Shuler References: <1515658359-1041-1-git-send-email-arybchenko@solarflare.com> <1515658359-1041-2-git-send-email-arybchenko@solarflare.com> <1871861.OTzHAPg5Oj@xps> From: Andrew Rybchenko Message-ID: Date: Thu, 18 Jan 2018 10:16:04 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1871861.OTzHAPg5Oj@xps> Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23604.003 X-TM-AS-Result: No--12.306900-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1516259776-af3QTBL1Len7 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 1/6] ethdev: add a function to look up Rx offload names 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: Thu, 18 Jan 2018 07:16:17 -0000 On 01/17/2018 08:33 PM, Thomas Monjalon wrote: > Hi, 2 comments below > > 11/01/2018 09:12, Andrew Rybchenko: >> From: Ivan Malov >> >> +#define RTE_RX_OFFLOAD_BIT2STR(_name) \ >> + { DEV_RX_OFFLOAD_##_name, #_name } >> + >> +static const struct { >> + uint64_t offload; >> + const char *name; >> +} rte_rx_offload_names[] = { >> + RTE_RX_OFFLOAD_BIT2STR(VLAN_STRIP), >> + RTE_RX_OFFLOAD_BIT2STR(IPV4_CKSUM), >> + RTE_RX_OFFLOAD_BIT2STR(UDP_CKSUM), >> + RTE_RX_OFFLOAD_BIT2STR(TCP_CKSUM), >> + RTE_RX_OFFLOAD_BIT2STR(TCP_LRO), >> + RTE_RX_OFFLOAD_BIT2STR(QINQ_STRIP), >> + RTE_RX_OFFLOAD_BIT2STR(OUTER_IPV4_CKSUM), >> + RTE_RX_OFFLOAD_BIT2STR(MACSEC_STRIP), >> + RTE_RX_OFFLOAD_BIT2STR(HEADER_SPLIT), >> + RTE_RX_OFFLOAD_BIT2STR(VLAN_FILTER), >> + RTE_RX_OFFLOAD_BIT2STR(VLAN_EXTEND), >> + RTE_RX_OFFLOAD_BIT2STR(JUMBO_FRAME), >> + RTE_RX_OFFLOAD_BIT2STR(CRC_STRIP), >> + RTE_RX_OFFLOAD_BIT2STR(SCATTER), >> + RTE_RX_OFFLOAD_BIT2STR(TIMESTAMP), >> + RTE_RX_OFFLOAD_BIT2STR(SECURITY), >> +}; >> + >> +#undef RTE_RX_OFFLOAD_BIT2STR > Why this undef? It is a constant-local macro with assumption to be used as initializer of the corresponding structure. So, under is just to limit its context and be sure that it is will not clash or be reused most likely in a wrong way. >> --- a/lib/librte_ether/rte_ethdev_version.map >> +++ b/lib/librte_ether/rte_ethdev_version.map >> @@ -198,6 +198,12 @@ DPDK_17.11 { >> >> } DPDK_17.08; >> >> +DPDK_18.02 { >> + global: >> + >> + rte_eth_dev_rx_offload_name; >> +} DPDK_17.11; > New functions should be experimental. Thanks, I've moved it to EXPERIMENTAL and added a comment as highlighted by Ferruh in another review. I've not removed DPDK_17.11 base for EXPERIMENTAL in map file. If it should be done, it should be done separately. Thanks. >> EXPERIMENTAL { >> global: