From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6BFD4A0C45; Mon, 25 Oct 2021 09:56:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 038DE407FF; Mon, 25 Oct 2021 09:56:27 +0200 (CEST) Received: from m12-11.163.com (m12-11.163.com [220.181.12.11]) by mails.dpdk.org (Postfix) with ESMTP id D0F884003E; Mon, 25 Oct 2021 09:56:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=Zvp56h5hNUA5mUEbsi o6R8yBxOTyLP0MWPgMIAuSYi8=; b=DM/TsZC9gsEPYFIoTO3M5yxF8ciT7KzqCN 0pXSrWZ5W2XhtoeFt8gpeZuCuc3GqK9cTqehjY9RuHfkrcQPetcOm1Vp0+HTltkK xLIUIyzFgY9OoG3XkRSmL/l/KPWgp1kfgXm9q+2sbUZ9hp697TtcVtVxvIc6ADPV ccIAiW9MY= Received: from bogon.localdomain (unknown [36.112.33.106]) by smtp7 (Coremail) with SMTP id C8CowAD3itgVY3ZhoaaBBA--.28938S2; Mon, 25 Oct 2021 15:56:19 +0800 (CST) From: huichao cai To: dev@dpdk.org Cc: konstantin.ananyev@intel.com, stable@dpdk.org Date: Mon, 25 Oct 2021 15:55:53 +0800 Message-Id: <1635148553-50086-1-git-send-email-chcchc88@163.com> X-Mailer: git-send-email 1.8.3.1 X-CM-TRANSID: C8CowAD3itgVY3ZhoaaBBA--.28938S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7CFWfGFW7Ar17ZFy8Zr43ZFb_yoW8CF1rpa 48Jr9IqF1ftF1kGw4kXrs0qw45JasFgF4jqrn5Gr93tFsF9rykJayakr4Iyr1Ig348A3s3 AwsIkFyrua1xWw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j-WrXUUUUU= X-Originating-IP: [36.112.33.106] X-CM-SenderInfo: pfkfuxrfyyqiywtou0bp/1tbiJgQ3F1v2kJXenQAAsp Subject: [dpdk-dev] [PATCH] ip_frag: fix the buf of fragmenting IPv4 fragment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: 567473433b7e ("ip_frag: fix fragmenting IPv4 fragment") Cc: stable@dpdk.org Signed-off-by: huichao cai --- lib/ip_frag/rte_ipv4_fragmentation.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/ip_frag/rte_ipv4_fragmentation.c b/lib/ip_frag/rte_ipv4_fragmentation.c index fead5a9..2e7739d 100644 --- a/lib/ip_frag/rte_ipv4_fragmentation.c +++ b/lib/ip_frag/rte_ipv4_fragmentation.c @@ -75,7 +75,7 @@ static inline void __free_fragments(struct rte_mbuf *mb[], uint32_t num) 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 +116,7 @@ static inline void __free_fragments(struct rte_mbuf *mb[], uint32_t num) 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 +186,7 @@ static inline void __free_fragments(struct rte_mbuf *mb[], uint32_t num) __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); -- 1.8.3.1