From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id A13813989 for ; Fri, 22 Jul 2016 10:03:34 +0200 (CEST) Received: from alille-653-1-293-182.w90-1.abo.wanadoo.fr ([90.1.53.182] helo=[192.168.1.13]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bQVTE-0008TF-Ny; Fri, 22 Jul 2016 10:06:09 +0200 To: Stephen Hemminger References: <1469088510-7552-1-git-send-email-olivier.matz@6wind.com> <1469088510-7552-6-git-send-email-olivier.matz@6wind.com> <20160721142208.0cf399e3@xeon-e3> Cc: dev@dpdk.org, yuanhan.liu@linux.intel.com, konstantin.ananyev@intel.com, sugesh.chandran@intel.com, bruce.richardson@intel.com, jianfeng.tan@intel.com, helin.zhang@intel.com, adrien.mazarguil@6wind.com From: Olivier Matz Message-ID: Date: Fri, 22 Jul 2016 10:03:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160721142208.0cf399e3@xeon-e3> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 05/12] mbuf: add new Rx checksum mbuf flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2016 08:03:34 -0000 Hi Stephen, On 07/21/2016 11:22 PM, Stephen Hemminger wrote: > On Thu, 21 Jul 2016 10:08:23 +0200 > Olivier Matz wrote: > >> +/** >> + * Deprecated. >> + * Checking this flag alone is deprecated: check the 2 bits of >> + * PKT_RX_L4_CKSUM_MASK. >> + * This flag was set when the L4 checksum of a packet was detected as >> + * wrong by the hardware. >> + */ >> +#define PKT_RX_L4_CKSUM_BAD (1ULL << 3) >> + >> +/** >> + * Deprecated. >> + * Checking this flag alone is deprecated: check the 2 bits of >> + * PKT_RX_IP_CKSUM_MASK. >> + * This flag was set when the IP checksum of a packet was detected as >> + * wrong by the hardware. >> + */ >> +#define PKT_RX_IP_CKSUM_BAD (1ULL << 4) > > I think you should use the GCC deprecated attribute, not sure how though > The reason why I did not use a macro poisoning here is because this flag is still valid when used with the mask. Actually, checking this flag alone still works and does the same as before but I wanted to highlight that it should now be used with the mask. Your comment makes me think that maybe the new flags could have different names to avoid to keep old-style tests on this flag. On the other hand, I think the name is already the good one, and doing this would break the API and affect large pieces of code in dpdk. Opinions are welcome here :) Thanks for commenting Olivier