[dpdk-dev] [PATCH] mbuf: rename outer ip checksum macro

Andrew Rybchenko andrew.rybchenko at oktetlabs.ru
Thu Feb 25 07:52:05 CET 2021


On 2/24/21 7:24 PM, Lance Richardson wrote:
> Rename PKT_RX_EIP_CKSUM_BAD to PKT_RX_OUTER_IP_CKSUM_BAD and
> deprecate the original name. The new name is better aligned
> with existing PKT_RX_OUTER_* flags, which should help reduce
> confusion about its purpose.
> 
> Suggested-by: Ferruh Yigit <ferruh.yigit at intel.com>
> Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>

I think deprecation notice should be added.

> diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
> index 9d1609336..796ef8059 100644
> --- a/lib/librte_mbuf/rte_mbuf_core.h
> +++ b/lib/librte_mbuf/rte_mbuf_core.h
> @@ -73,9 +73,18 @@ extern "C" {
>   */
>  #define PKT_RX_IP_CKSUM_BAD  (1ULL << 4)
>  
> - /** External IP header checksum error. */
> +/**
> + * Deprecated.
> + * This flag has been renamed, use PKT_RX_OUTER_IP_CKSUM_BAD instead.
> + */
>  #define PKT_RX_EIP_CKSUM_BAD (1ULL << 5)
>  
> +/**
> + * This flag is set when the outermost IP header checksum is detected as
> + * wrong by the hardware.
> + */
> +#define PKT_RX_OUTER_IP_CKSUM_BAD (1ULL << 5)
> +

I think this one should be keep, but old one should be:

#define PKT_RX_EIP_CKSUM_BAD PKT_RX_OUTER_IP_CKSUM_BAD

with a comment as you have above.

>  /**
>   * A vlan has been stripped by the hardware and its tci is saved in
>   * mbuf->vlan_tci. This can only happen if vlan stripping is enabled
> 



More information about the dev mailing list