[dpdk-dev] [PATCH 05/12] mbuf: add new Rx checksum mbuf flags

Olivier Matz olivier.matz at 6wind.com
Fri Jul 22 10:03:26 CEST 2016


Hi Stephen,

On 07/21/2016 11:22 PM, Stephen Hemminger wrote:
> On Thu, 21 Jul 2016 10:08:23 +0200
> Olivier Matz <olivier.matz at 6wind.com> 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


More information about the dev mailing list