ip_frag: fix improper byte order conversion
diff mbox series

Message ID 20200331172910.6309-1-pbhagavatula@marvell.com
State Not Applicable, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • ip_frag: fix improper byte order conversion
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula March 31, 2020, 5:29 p.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Fix improper byte order conversion used to extract fragmentation offset in
ipv6 reassembly.

Fixes: 4f1a8f633862 ("ip_frag: add IPv6 reassembly")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 lib/librte_ip_frag/rte_ipv6_reassembly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/lib/librte_ip_frag/rte_ipv6_reassembly.c b/lib/librte_ip_frag/rte_ipv6_reassembly.c
index ad0105518..f790f1ad5 100644
--- a/lib/librte_ip_frag/rte_ipv6_reassembly.c
+++ b/lib/librte_ip_frag/rte_ipv6_reassembly.c
@@ -132,7 +132,7 @@  ipv6_frag_reassemble(struct ip_frag_pkt *fp)
  *   - not all fragments of the packet are collected yet.
  */
 #define MORE_FRAGS(x) (((x) & 0x100) >> 8)
-#define FRAG_OFFSET(x) (rte_cpu_to_be_16(x) >> 3)
+#define FRAG_OFFSET(x) (rte_be_to_cpu_16(x) >> 3)
 struct rte_mbuf *
 rte_ipv6_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,