ethdev: fix endian annotation for spi item

Message ID 1566308703-23381-1-git-send-email-david.marchand@redhat.com
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series
  • ethdev: fix endian annotation for spi item
Related show

Checks

Context Check Description
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/iol-Compile-Testing success Compile Testing PASS
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

David Marchand Aug. 20, 2019, 1:45 p.m.
spi should be set with network endian values.
While 0xffffffff == htonl(0xffffffff), this missing annotation is caught
by sparse when compiling ovs (dpdk-latest branch).

Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ethdev/rte_flow.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Rybchenko Aug. 23, 2019, 10:17 a.m. | #1
On 8/20/19 4:45 PM, David Marchand wrote:
> spi should be set with network endian values.
> While 0xffffffff == htonl(0xffffffff), this missing annotation is caught
> by sparse when compiling ovs (dpdk-latest branch).
>
> Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Ferruh Yigit Aug. 27, 2019, 1:15 p.m. | #2
On 8/23/2019 11:17 AM, Andrew Rybchenko wrote:
> On 8/20/19 4:45 PM, David Marchand wrote:
>> spi should be set with network endian values.
>> While 0xffffffff == htonl(0xffffffff), this missing annotation is caught
>> by sparse when compiling ovs (dpdk-latest branch).
>>
>> Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: David Marchand <david.marchand@redhat.com>
> 
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 

Applied to dpdk-next-net/master, thanks.

Patch

diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index b66bf14..354cb1d 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -935,7 +935,7 @@  struct rte_flow_item_esp {
 #ifndef __cplusplus
 static const struct rte_flow_item_esp rte_flow_item_esp_mask = {
 	.hdr = {
-		.spi = 0xffffffff,
+		.spi = RTE_BE32(0xffffffff),
 	},
 };
 #endif