On Wed, Aug 05, 2026 at 10:08:56PM -0700, Stephen Hemminger wrote:
> DPDK has its own byte order macros which are preferred
> over the POSIX/libc ones in arpa/inet.h
> This resolves issue where this code was inheriting the
> inclusion of arpa/inet.h from rte_ethdev.h -> rte_eth_ctrl.h.
> 
> Signed-off-by: Stephen Hemminger <[email protected]>
> ---
>  lib/ethdev/sff_8472.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Acked-by: Bruce Richardson <[email protected]>

Ok fix, though I would note that this fix is nothing to do with the removal
of flow director material.

> diff --git a/lib/ethdev/sff_8472.c b/lib/ethdev/sff_8472.c
> index 97f231854c..e29711eb74 100644
> --- a/lib/ethdev/sff_8472.c
> +++ b/lib/ethdev/sff_8472.c
> @@ -5,6 +5,8 @@
>  
>  #include <stdio.h>
>  
> +#include <rte_byteorder.h>
> +
>  #include "sff_common.h"
>  
>  /* Offsets in decimal, for direct comparison with the SFF specs */
> @@ -176,7 +178,7 @@ static float befloattoh(const uint32_t *source)
>               float dst;
>       } converter;
>  
> -     converter.src = ntohl(*source);
> +     converter.src = rte_be_to_cpu_32(*source);
>       return converter.dst;
>  }
>  

Reply via email to