diff mbox series

[ovs-dev] sparse: Fix typo in DPDK endian conversion macros.

Message ID 20200428120353.14605-1-david.marchand@redhat.com
State Accepted
Headers show
Series [ovs-dev] sparse: Fix typo in DPDK endian conversion macros. | expand

Commit Message

David Marchand April 28, 2020, 12:03 p.m. UTC
This header is duplicated from the DPDK generic header.
Fix typo identified in DPDK [1].

While at it, RTE_EXEC_ENV_BSDAPP has been replaced with
RTE_EXEC_ENV_FREEBSD in 19.05 [2].

1: https://git.dpdk.org/dpdk/commit/?id=a3e283ed904c
2: https://git.dpdk.org/dpdk/commit/?id=5fbc1d498f54

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 include/sparse/rte_byteorder.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Stokes, Ian May 5, 2020, 12:44 p.m. UTC | #1
On 4/28/2020 1:03 PM, David Marchand wrote:
> This header is duplicated from the DPDK generic header.
> Fix typo identified in DPDK [1].
> 
> While at it, RTE_EXEC_ENV_BSDAPP has been replaced with
> RTE_EXEC_ENV_FREEBSD in 19.05 [2].
> 
> 1: https://git.dpdk.org/dpdk/commit/?id=a3e283ed904c
> 2: https://git.dpdk.org/dpdk/commit/?id=5fbc1d498f54
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Thanks for this David.

Looks ok to myself overall, tested locally and with travis.

https://travis-ci.org/github/istokes/ovs/builds/683329259

@Ilya, you've looked at BSD a bit more than myself in the past, any 
comments on this? I've held off applying for the moment just in case.

Regards
Ian

> ---
>   include/sparse/rte_byteorder.h | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sparse/rte_byteorder.h b/include/sparse/rte_byteorder.h
> index d32b5e6915..72cacac894 100644
> --- a/include/sparse/rte_byteorder.h
> +++ b/include/sparse/rte_byteorder.h
> @@ -49,7 +49,7 @@
>   
>   #include "openvswitch/types.h"
>   #include <stdint.h>
> -#ifdef RTE_EXEC_ENV_BSDAPP
> +#ifdef RTE_EXEC_ENV_FREEBSD
>   #include <sys/endian.h>
>   #else
>   #include <endian.h>
> @@ -127,9 +127,9 @@
>   #define RTE_BE16(v) (OVS_FORCE rte_be16_t)(RTE_STATIC_BSWAP16(v))
>   #define RTE_BE32(v) (OVS_FORCE rte_be32_t)(RTE_STATIC_BSWAP32(v))
>   #define RTE_BE64(v) (OVS_FORCE rte_be64_t)(RTE_STATIC_BSWAP64(v))
> -#define RTE_LE16(v) (OVS_FORCE rte_be16_t)(v)
> -#define RTE_LE32(v) (OVS_FORCE rte_be32_t)(v)
> -#define RTE_LE64(v) (OVS_FORCE rte_be64_t)(v)
> +#define RTE_LE16(v) (OVS_FORCE rte_le16_t)(v)
> +#define RTE_LE32(v) (OVS_FORCE rte_le32_t)(v)
> +#define RTE_LE64(v) (OVS_FORCE rte_le64_t)(v)
>   #else
>   #error Unsupported endianness.
>   #endif
>
Ilya Maximets May 5, 2020, 1:21 p.m. UTC | #2
On 5/5/20 2:44 PM, Stokes, Ian wrote:
> 
> 
> On 4/28/2020 1:03 PM, David Marchand wrote:
>> This header is duplicated from the DPDK generic header.
>> Fix typo identified in DPDK [1].
>>
>> While at it, RTE_EXEC_ENV_BSDAPP has been replaced with
>> RTE_EXEC_ENV_FREEBSD in 19.05 [2].
>>
>> 1: https://git.dpdk.org/dpdk/commit/?id=a3e283ed904c
>> 2: https://git.dpdk.org/dpdk/commit/?id=5fbc1d498f54
>>
>> Signed-off-by: David Marchand <david.marchand@redhat.com>
> 
> Thanks for this David.
> 
> Looks ok to myself overall, tested locally and with travis.
> 
> https://travis-ci.org/github/istokes/ovs/builds/683329259
> 
> @Ilya, you've looked at BSD a bit more than myself in the past, any comments on this? I've held off applying for the moment just in case.


This patch looks fine.  In theory we could just remove everything
non-Linux related from DPDK-specific sparse headers just because
we're not supporting netdev-dpdk on non-Linux systems (it will fail
to build).

The patch itself looks straightforward and might be accepted just
for consistency.

Best regards, Ilya Maximets.

> 
> Regards
> Ian
> 
>> ---
>>   include/sparse/rte_byteorder.h | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/sparse/rte_byteorder.h b/include/sparse/rte_byteorder.h
>> index d32b5e6915..72cacac894 100644
>> --- a/include/sparse/rte_byteorder.h
>> +++ b/include/sparse/rte_byteorder.h
>> @@ -49,7 +49,7 @@
>>     #include "openvswitch/types.h"
>>   #include <stdint.h>
>> -#ifdef RTE_EXEC_ENV_BSDAPP
>> +#ifdef RTE_EXEC_ENV_FREEBSD
>>   #include <sys/endian.h>
>>   #else
>>   #include <endian.h>
>> @@ -127,9 +127,9 @@
>>   #define RTE_BE16(v) (OVS_FORCE rte_be16_t)(RTE_STATIC_BSWAP16(v))
>>   #define RTE_BE32(v) (OVS_FORCE rte_be32_t)(RTE_STATIC_BSWAP32(v))
>>   #define RTE_BE64(v) (OVS_FORCE rte_be64_t)(RTE_STATIC_BSWAP64(v))
>> -#define RTE_LE16(v) (OVS_FORCE rte_be16_t)(v)
>> -#define RTE_LE32(v) (OVS_FORCE rte_be32_t)(v)
>> -#define RTE_LE64(v) (OVS_FORCE rte_be64_t)(v)
>> +#define RTE_LE16(v) (OVS_FORCE rte_le16_t)(v)
>> +#define RTE_LE32(v) (OVS_FORCE rte_le32_t)(v)
>> +#define RTE_LE64(v) (OVS_FORCE rte_le64_t)(v)
>>   #else
>>   #error Unsupported endianness.
>>   #endif
>>
diff mbox series

Patch

diff --git a/include/sparse/rte_byteorder.h b/include/sparse/rte_byteorder.h
index d32b5e6915..72cacac894 100644
--- a/include/sparse/rte_byteorder.h
+++ b/include/sparse/rte_byteorder.h
@@ -49,7 +49,7 @@ 
 
 #include "openvswitch/types.h"
 #include <stdint.h>
-#ifdef RTE_EXEC_ENV_BSDAPP
+#ifdef RTE_EXEC_ENV_FREEBSD
 #include <sys/endian.h>
 #else
 #include <endian.h>
@@ -127,9 +127,9 @@ 
 #define RTE_BE16(v) (OVS_FORCE rte_be16_t)(RTE_STATIC_BSWAP16(v))
 #define RTE_BE32(v) (OVS_FORCE rte_be32_t)(RTE_STATIC_BSWAP32(v))
 #define RTE_BE64(v) (OVS_FORCE rte_be64_t)(RTE_STATIC_BSWAP64(v))
-#define RTE_LE16(v) (OVS_FORCE rte_be16_t)(v)
-#define RTE_LE32(v) (OVS_FORCE rte_be32_t)(v)
-#define RTE_LE64(v) (OVS_FORCE rte_be64_t)(v)
+#define RTE_LE16(v) (OVS_FORCE rte_le16_t)(v)
+#define RTE_LE32(v) (OVS_FORCE rte_le32_t)(v)
+#define RTE_LE64(v) (OVS_FORCE rte_le64_t)(v)
 #else
 #error Unsupported endianness.
 #endif