ip_frag: fix improper byte order conversion
Checks
Commit Message
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(-)
@@ -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,