Skip to content

Commit 013bb50

Browse files
chcchc88tmonjalo
authored andcommitted
ip_frag: revert fix fragmenting IPv4 fragment
The patch ("ip_frag: fix fragmenting IPv4 fragment") introduces a bug and needs to be rolled back. This is because the patch and variables "flag_offset" conflict with each other. Bugzilla ID: 835 Fixes: 5674734 ("ip_frag: fix fragmenting IPv4 fragment") Cc: stable@dpdk.org Signed-off-by: Huichao Cai <chcchc88@163.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
1 parent f8e0f8c commit 013bb50

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/ip_frag/rte_ipv4_fragmentation.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
7575
uint32_t out_pkt_pos, in_seg_data_pos;
7676
uint32_t more_in_segs;
7777
uint16_t fragment_offset, flag_offset, frag_size, header_len;
78-
uint16_t frag_bytes_remaining, not_last_frag;
78+
uint16_t frag_bytes_remaining;
7979

8080
/*
8181
* Formal parameter checking.
@@ -116,9 +116,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
116116
in_seg = pkt_in;
117117
in_seg_data_pos = header_len;
118118
out_pkt_pos = 0;
119-
fragment_offset = (uint16_t)((flag_offset &
120-
RTE_IPV4_HDR_OFFSET_MASK) << RTE_IPV4_HDR_FO_SHIFT);
121-
not_last_frag = (uint16_t)(flag_offset & IPV4_HDR_MF_MASK);
119+
fragment_offset = 0;
122120

123121
more_in_segs = 1;
124122
while (likely(more_in_segs)) {
@@ -188,8 +186,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
188186

189187
__fill_ipv4hdr_frag(out_hdr, in_hdr, header_len,
190188
(uint16_t)out_pkt->pkt_len,
191-
flag_offset, fragment_offset,
192-
not_last_frag || more_in_segs);
189+
flag_offset, fragment_offset, more_in_segs);
193190

194191
fragment_offset = (uint16_t)(fragment_offset +
195192
out_pkt->pkt_len - header_len);

0 commit comments

Comments
 (0)