lib: remove unneeded header includes
[dpdk.git] / lib / ip_frag / rte_ipv4_fragmentation.c
index fead5a9..669682a 100644 (file)
@@ -6,8 +6,6 @@
 #include <errno.h>
 
 #include <rte_memcpy.h>
-#include <rte_mempool.h>
-#include <rte_debug.h>
 #include <rte_ether.h>
 
 #include "ip_frag_common.h"
@@ -75,7 +73,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
        uint32_t out_pkt_pos, in_seg_data_pos;
        uint32_t more_in_segs;
        uint16_t fragment_offset, flag_offset, frag_size, header_len;
-       uint16_t frag_bytes_remaining, not_last_frag;
+       uint16_t frag_bytes_remaining;
 
        /*
         * Formal parameter checking.
@@ -116,9 +114,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
        in_seg = pkt_in;
        in_seg_data_pos = header_len;
        out_pkt_pos = 0;
-       fragment_offset = (uint16_t)((flag_offset &
-           RTE_IPV4_HDR_OFFSET_MASK) << RTE_IPV4_HDR_FO_SHIFT);
-       not_last_frag = (uint16_t)(flag_offset & IPV4_HDR_MF_MASK);
+       fragment_offset = 0;
 
        more_in_segs = 1;
        while (likely(more_in_segs)) {
@@ -188,8 +184,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 
                __fill_ipv4hdr_frag(out_hdr, in_hdr, header_len,
                    (uint16_t)out_pkt->pkt_len,
-                   flag_offset, fragment_offset,
-                   not_last_frag || more_in_segs);
+                   flag_offset, fragment_offset, more_in_segs);
 
                fragment_offset = (uint16_t)(fragment_offset +
                    out_pkt->pkt_len - header_len);