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 663704578F; Mon, 2 Sep 2024 10:43:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04DFF4026F; Mon, 2 Sep 2024 10:43:30 +0200 (CEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mails.dpdk.org (Postfix) with ESMTP id 5FA18400EF for ; Mon, 2 Sep 2024 10:43:28 +0200 (CEST) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-45685a3b1d8so31969831cf.1 for ; Mon, 02 Sep 2024 01:43:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725266607; x=1725871407; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2IUYtfqAo+6IthCqAA1ebIbJFKzMbUOPli5oFkDnpgs=; b=Jrl4416mpsZgUvLRmzWBecp3la+MGZH/Z5SJzpvUAwlw/iN7A9DcNifu4PWeRxxG32 sF5+ssqXMtjIJpkQlt7gmuD3tgZQcpdBBsvDWtN7sDe5sJAYB+Z+ogNG30r+8i1TZiyx 9bJOEU914cSlpzPTjVuN3uFzXxH74eIYtqktGZi/gFRTpC/1Ciygumf5AAER6zJYFt9a ag/Ql9CmKdfW0UnE4grnUBu50TSp6BaWIuvy288CRwhfMLPZM0oa5Q3bzNPOY1jKMP5R PEWV0g4wF7E+tg9Mlwxvza8mNYtab8Kpc5GjhqlI0cvVP5aCqStbeo38wmAwNV07qV7Y f01w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725266607; x=1725871407; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2IUYtfqAo+6IthCqAA1ebIbJFKzMbUOPli5oFkDnpgs=; b=PmFoX1N6MmkMtl9z7tJfBQO1HeAhJx15qeZ6ySK9vPcXSdYWu9MoBEVTk3MiOOFOO4 Vr/rZJtV2IMzqV9JdA3SmSVBpnnTmaVOZte9DZrD9ibZuZjIHhoNxN73ryncOe5U/0Nt 1VLeiZslvg/oXgF1wV+IZctGndHQBkUlKn7zms+U/0MiSXA03sXNSE2Clf9zpfeJwScF qmPSRnH6pCcedJBk3H0oV/PFUxkisv3JjPkIpIQOLDyyDoklJWE0CXbJSu7pUOtf9UQB QpxhnBRsNqvBmcTrJQJvfGg8VS++YV5fJFG8LqFVp0/3RH2S7LHQohTQH/Yx1dIGuX49 SL7g== X-Gm-Message-State: AOJu0YyoygYVfKWf64GzuRYsU/N1gWMxO+O3l2NOmzTNAOILoCZOwjTY rFHDbJGJhsgjbPO3ONsqzQUPPDExXFYLDAiXdeqAv618E9A7sbAaY+oN9FJ2/DNTipmBNywHykt ds13zhUq2n5LzV6BgaDBmCvKEHsg= X-Google-Smtp-Source: AGHT+IFGZ05HCspiR47gk8ObbiaUUZm0TGCc3CL7hEz2I0tYzrHHumrmKKIs1qDvkDlQSgPJZ8wb2OxmL9/utC+dNFI= X-Received: by 2002:a05:622a:ce:b0:44f:ff65:97be with SMTP id d75a77b69052e-45680261ba8mr228435351cf.14.1725266607344; Mon, 02 Sep 2024 01:43:27 -0700 (PDT) MIME-Version: 1.0 References: <20240822153218.3782170-1-akozyrev@nvidia.com> In-Reply-To: <20240822153218.3782170-1-akozyrev@nvidia.com> From: Nithin Dabilpuram Date: Mon, 2 Sep 2024 14:13:15 +0530 Message-ID: Subject: Re: [PATCH] mbuf: add transport mode ESP packet type To: Alexander Kozyrev Cc: dev@dpdk.org, dsosnowski@nvidia.com, orika@nvidia.com, olivier.matz@6wind.com, thomas@monjalon.net, matan@nvidia.com, jerinj@marvell.com, rbhansali@marvell.com, ferruh.yigit@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 I think we already discussed this same patch in previous emails (Aug-Oct 2023) at https://mails.dpdk.org/archives/dev/2023-October/279390.html and concluded that it is not needed ? Did anything change from then ? -- Nithin On Thu, Aug 22, 2024 at 9:03=E2=80=AFPM Alexander Kozyrev wrote: > > Support the IP Encapsulating Security Payload (ESP) in transport mode. > Currently, we have RTE_PTYPE_TUNNEL_ESP for the ESP tunnel mode. > Transport mode can be detected by parsing the "Next Header" field. > The Next Header is TCP for the transport mode and IP for the tunnel mode. > Add RTE_PTYPE_L4_ESP for the regular transport mode and > RTE_PTYPE_INNER_L4_ESP for the ESP over UDP packets. > > Signed-off-by: Alexander Kozyrev > --- > lib/mbuf/rte_mbuf_ptype.c | 2 ++ > lib/mbuf/rte_mbuf_ptype.h | 36 ++++++++++++++++++++++++++++++------ > 2 files changed, 32 insertions(+), 6 deletions(-) > > diff --git a/lib/mbuf/rte_mbuf_ptype.c b/lib/mbuf/rte_mbuf_ptype.c > index d6f906b06c..ab180b3dda 100644 > --- a/lib/mbuf/rte_mbuf_ptype.c > +++ b/lib/mbuf/rte_mbuf_ptype.c > @@ -50,6 +50,7 @@ const char *rte_get_ptype_l4_name(uint32_t ptype) > case RTE_PTYPE_L4_ICMP: return "L4_ICMP"; > case RTE_PTYPE_L4_NONFRAG: return "L4_NONFRAG"; > case RTE_PTYPE_L4_IGMP: return "L4_IGMP"; > + case RTE_PTYPE_L4_ESP: return "L4_ESP"; > default: return "L4_UNKNOWN"; > } > } > @@ -112,6 +113,7 @@ const char *rte_get_ptype_inner_l4_name(uint32_t ptyp= e) > case RTE_PTYPE_INNER_L4_SCTP: return "INNER_L4_SCTP"; > case RTE_PTYPE_INNER_L4_ICMP: return "INNER_L4_ICMP"; > case RTE_PTYPE_INNER_L4_NONFRAG: return "INNER_L4_NONFRAG"; > + case RTE_PTYPE_INNER_L4_ESP: return "INNER_L4_ESP"; > default: return "INNER_L4_UNKNOWN"; > } > } > diff --git a/lib/mbuf/rte_mbuf_ptype.h b/lib/mbuf/rte_mbuf_ptype.h > index f2276e2909..c46a94f89f 100644 > --- a/lib/mbuf/rte_mbuf_ptype.h > +++ b/lib/mbuf/rte_mbuf_ptype.h > @@ -247,7 +247,7 @@ extern "C" { > * It refers to those packets of any IP types, which can be recognized a= s > * fragmented. A fragmented packet cannot be recognized as any other L4 = types > * (RTE_PTYPE_L4_TCP, RTE_PTYPE_L4_UDP, RTE_PTYPE_L4_SCTP, RTE_PTYPE_L4_= ICMP, > - * RTE_PTYPE_L4_NONFRAG). > + * RTE_PTYPE_L4_NONFRAG, RTE_PTYPE_L4_IGMP, RTE_PTYPE_L4_ESP). > * > * Packet format: > * <'ether type'=3D0x0800 > @@ -290,14 +290,15 @@ extern "C" { > * > * It refers to those packets of any IP types, while cannot be recognize= d as > * any of above L4 types (RTE_PTYPE_L4_TCP, RTE_PTYPE_L4_UDP, > - * RTE_PTYPE_L4_FRAG, RTE_PTYPE_L4_SCTP, RTE_PTYPE_L4_ICMP). > + * RTE_PTYPE_L4_FRAG (for IPv6), RTE_PTYPE_L4_SCTP, RTE_PTYPE_L4_ICMP, > + * RTE_PTYPE_L4_IGMP (for IPv4), RTE_PTYPE_L4_ESP). > * > * Packet format: > * <'ether type'=3D0x0800 > - * | 'version'=3D4, 'protocol'!=3D[6|17|132|1], 'MF'=3D0, 'frag_offset'= =3D0> > + * | 'version'=3D4, 'protocol'!=3D[1|2|6|17|50|132], 'MF'=3D0, 'frag_off= set'=3D0> > * or, > * <'ether type'=3D0x86DD > - * | 'version'=3D6, 'next header'!=3D[6|17|44|132|1]> > + * | 'version'=3D6, 'next header'!=3D[1|6|17|44|50|132]> > */ > #define RTE_PTYPE_L4_NONFRAG 0x00000600 > /** > @@ -308,6 +309,17 @@ extern "C" { > * | 'version'=3D4, 'protocol'=3D2, 'MF'=3D0, 'frag_offset'=3D0> > */ > #define RTE_PTYPE_L4_IGMP 0x00000700 > +/** > + * ESP (IP Encapsulating Security Payload) transport packet type. > + * > + * Packet format: > + * <'ether type'=3D0x0800 > + * | 'version'=3D4, 'protocol'=3D50, 'MF'=3D0, 'frag_offset'=3D0> > + * or, > + * <'ether type'=3D0x86DD > + * | 'version'=3D6, 'next header'=3D50> > + */ > +#define RTE_PTYPE_L4_ESP 0x00000800 > /** > * Mask of layer 4 packet types. > * It is used for outer packet for tunneling cases. > @@ -652,12 +664,24 @@ extern "C" { > * > * Packet format (inner only): > * <'ether type'=3D0x0800 > - * | 'version'=3D4, 'protocol'!=3D[6|17|132|1], 'MF'=3D0, 'frag_offset'= =3D0> > + * | 'version'=3D4, 'protocol'!=3D[1|6|17|50|132], 'MF'=3D0, 'frag_offse= t'=3D0> > * or, > * <'ether type'=3D0x86DD > - * | 'version'=3D6, 'next header'!=3D[6|17|44|132|1]> > + * | 'version'=3D6, 'next header'!=3D[1|6|17|44|50|132]> > */ > #define RTE_PTYPE_INNER_L4_NONFRAG 0x06000000 > +/** > + * ESP (IP Encapsulating Security Payload) transport packet type. > + * It is used for inner packet only. > + * > + * Packet format (inner only): > + * <'ether type'=3D0x0800 > + * | 'version'=3D4, 'protocol'=3D50, 'MF'=3D0, 'frag_offset'=3D0> > + * or, > + * <'ether type'=3D0x86DD > + * | 'version'=3D6, 'next header'=3D50> > + */ > +#define RTE_PTYPE_INNER_L4_ESP 0x08000000 > /** > * Mask of inner layer 4 packet types. > */ > -- > 2.18.2 >