[dpdk-dev] [PATCH v3 06/11] bnx2x: FreeBSD enablement

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Nov 24 15:09:23 CET 2015


2015-11-23 23:44, Rasesh Mody:
> --- a/drivers/net/bnx2x/bnx2x.h
> +++ b/drivers/net/bnx2x/bnx2x.h
> @@ -16,6 +16,12 @@
>  #ifndef __BNX2X_H__
>  #define __BNX2X_H__
>  
> +#ifdef __FreeBSD__
> +#define __LITTLE_ENDIAN _LITTLE_ENDIAN
> +#define __BIG_ENDIAN    _BIG_ENDIAN
> +#define __BYTE_ORDER    _BYTE_ORDER
> +#endif
> +
>  #include "bnx2x_ethdev.h"
>  
>  #if __BYTE_ORDER == __LITTLE_ENDIAN
[...]
> --- a/drivers/net/bnx2x/ecore_sp.h
> +++ b/drivers/net/bnx2x/ecore_sp.h
> @@ -16,6 +16,12 @@
>  #ifndef ECORE_SP_H
>  #define ECORE_SP_H
>  
> +#ifdef __FreeBSD__
> +#define __LITTLE_ENDIAN _LITTLE_ENDIAN
> +#define __BIG_ENDIAN    _BIG_ENDIAN
> +#define __BYTE_ORDER    _BYTE_ORDER
> +#endif
> +
>  #if __BYTE_ORDER == __LITTLE_ENDIAN
>  #ifndef LITTLE_ENDIAN
>  #define LITTLE_ENDIAN

Why not use RTE_BYTE_ORDER which manages already these tricks?
Maybe you have not noticed it:
	lib/librte_eal/common/include/generic/rte_byteorder.h


More information about the dev mailing list