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 947B8457A7; Mon, 26 Aug 2024 17:41:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 340974060C; Mon, 26 Aug 2024 17:41:48 +0200 (CEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id A723E4003C for ; Mon, 26 Aug 2024 17:41:46 +0200 (CEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7141285db14so3977917b3a.1 for ; Mon, 26 Aug 2024 08:41:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1724686906; x=1725291706; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=86qQ2PFh1Q2kV58tt7/RNIgi1zGzzUiIIHnZtEKrukE=; b=HHtfvmnk8tRUnNYC1r4KbYVD7svMOr4uInbuw7V6GSJx9UFfIqb0u1SxUYUGJ/h5+z Ojfm35aWKtCNww6in5iY94G6dXfn9EpZ7S2sfVVDsYuzgiZiY2yXl+xa7wk1xFDTLYVe 2vmJUF5eZ0WA4fvyQbyuLOz6skEV2MIRPOmn0kh4dXO5R1+8FLlfCxX2v6W8yWdFF3hG QSGUJn82jATajdyLz69XQriPvliES7IbAKqv9aHOqQDTYv2AJ5d2YtDsRNFaRAkKuHEi N8JP8F15rvyvDf0fW2QGrgfpAVmLxwHh+DULJ66FQ+TLNJENLYrMc8YdI/GHy7XWLDTr 5ZmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724686906; x=1725291706; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=86qQ2PFh1Q2kV58tt7/RNIgi1zGzzUiIIHnZtEKrukE=; b=PgFsrfD8v0rv6aXbb9CKHAe5YwZ6n0Pt/QcNRftheFBpppJUOuBzzdYjV2cmXsgeW9 qTz/OMCu9AtD4rSbmrj7XnfAXPrGZx/ebnhibaPkE1D3O3CwpNZfD3K0aSMPdMLKNv21 aijUX6jmXFdgnbfCBrgHbBrd96TMBWtn5lhK80co+qCEuifVbYDx5VGHD8iynY0pU2h0 SFz0GL+xku9Oh1tkjaR9BOuL8gM0WwYQrhToN8p5q/A4RjAGvSRmFRbo1ca5xLyAARkG XGo1Yaw1S5nkAqlGpojHx8f/Ve6Tn8d0WCNaiHZcceSftCKePo5y3BrGIQhPVRar3/Wj izlg== X-Forwarded-Encrypted: i=1; AJvYcCUW2nQBkJ2IpxcQoehSAo42Ey9WlfhgTbWn3YoXvKQch+wYHQ0dWAY7sBklBhu7Mt/pDdc=@dpdk.org X-Gm-Message-State: AOJu0YzXPIQIM+PtHstATbRKAGjp3OZ9/fttbNxoCQDQ5HIO7TzZEOEI BzVtl6dx7jt5CEwwPtAh92pGCp4AndvN3Ruf67jn56CQfg3l8sHYv98qOqtXQoI= X-Google-Smtp-Source: AGHT+IFcUIEPuaPIiWtZVGokVywy78FmAljpnzd1hVq+EfFVyD5R5VhSU9vTTfQheaC1Z9d2GMNgmA== X-Received: by 2002:a05:6a21:9614:b0:1ca:9e74:6789 with SMTP id adf61e73a8af0-1cc8b42988amr14859296637.9.1724686905671; Mon, 26 Aug 2024 08:41:45 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-714342558b6sm7154559b3a.78.2024.08.26.08.41.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 08:41:45 -0700 (PDT) Date: Mon, 26 Aug 2024 08:41:43 -0700 From: Stephen Hemminger To: Cc: , Subject: Re: [PATCH] ip_frag: support IPv6 reassembly with extensions Message-ID: <20240826084143.269d069a@hermes.local> In-Reply-To: <20240826112328.3028488-1-vignesh.purushotham.srinivas@ericsson.com> References: <20240826112328.3028488-1-vignesh.purushotham.srinivas@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 26 Aug 2024 13:23:28 +0200 wrote: > diff --git a/lib/ip_frag/ip_reassembly.h b/lib/ip_frag/ip_reassembly.h > index 54afed5417..429e74f1b3 100644 > --- a/lib/ip_frag/ip_reassembly.h > +++ b/lib/ip_frag/ip_reassembly.h > @@ -54,6 +54,8 @@ struct __rte_cache_aligned ip_frag_pkt { > uint32_t total_size; /* expected reassembled size */ > uint32_t frag_size; /* size of fragments received */ > uint32_t last_idx; /* index of next entry to fill */ > + uint32_t exts_len; /* length of extension hdrs for first fragment */ > + uint8_t *next_proto; /* pointer of the next_proto field */ > struct ip_frag frags[IP_MAX_FRAG_NUM]; /* fragments */ > }; This creates a 32 bit hole in the structure. Better to put next_proto after the start field. > + > + while (next_proto != IPPROTO_FRAGMENT && > + num_exts < MAX_NUM_IPV6_EXTS && > + (next_proto = rte_ipv6_get_next_ext( > + *last_ext, next_proto, &ext_len)) >= 0) { I would break up this loop condition for clarity. Something like: while (next_proto != IPPROTO_FRAGMENT && num_exts < MAX_NUM_IPV6_EXTS) { next_proto = rte_ipv6_get_next_ext(*last_ext, next_proto, &ext_len); if (next_proto < 0) break Also, need a new test cases for this.