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 036C9A04AD; Mon, 24 Jan 2022 18:21:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1D364116D; Mon, 24 Jan 2022 18:21:09 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 1B67441163 for ; Mon, 24 Jan 2022 18:21:08 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id z5so2295905plg.8 for ; Mon, 24 Jan 2022 09:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kcc95SutK5tvgq9u89ljm9e9ooVT2ijWGdghLrV25WQ=; b=CSvEsYAMzPokJwhp6Q2TkM64O8GbkUrI2FAEXnzgSQNLSM81oRLslAV3La28t8H8iX tYRZufIr47r7lsM0mDmFUbNLxJrgP7pGox4ClZV+yrnh8WJZBRrGS98jTXZybjFz1u/k R0FmleJ2zgyhAb2D1PGHZLlSrvjFX4loWyD5wrzCaNQ6rll2pqxpxT4TAGeIiUgfPKbt 5RIBAKPbBUZ/cgSo5RT0A5AGfI0C4OJaTI8pCRGECZAvbPGuQRlX4v/FhRgwjH44qn/d Re+jZD1QGIJyjLSvtIndNTHmCCRjMMrfAkvob1UgYa9ZdoE57SToWy4M1g2ctN34dcg2 QdcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kcc95SutK5tvgq9u89ljm9e9ooVT2ijWGdghLrV25WQ=; b=wDEweYpa5KZyEZrooO1XRhGTRipWkIJxDW2u0IFa5gG2I1/hSAZrZHXgQxPNFlMPCP Yut74uDrmcSZH0udzh4dBidsj0zQ+csrljUGusXdnSFx7p1FqL4qR3DsRqIVFpowCG9b uw83bDn8grpT4DfyuQhBFA0LvTBRoImzLpPubS2VwpE/XB88GG5fFdvyEa9/tyqEWNdM +QTb+l+UE1Eha8r3unMQ0VbLQLwGpJJSITLlNIuiSGob33swfoQQaNEi1ym+BteGZYSp LWIUTs3VO7yyJuV6KVlKhn3GkyXVv7ZmMtL2JJ64QwEK7YLqJ/Ak7ygoitpf9b3q7sLe NPUQ== X-Gm-Message-State: AOAM530D6TeaI/xlwEPwhp9vBz4sYQOa1uJxBIhw5Lx96XYGsquG6+XK cN2nwsNkJcBc+UcoI61FaoTiTmBT+cL39w== X-Google-Smtp-Source: ABdhPJyL9SlBrNtPFPzixib3AOovmh3L11nOZQaaTOnnwwQkByC2IB6+m855kj4lECKsVV6OHIyLcw== X-Received: by 2002:a17:90b:4b02:: with SMTP id lx2mr2897982pjb.195.1643044867152; Mon, 24 Jan 2022 09:21:07 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id p18sm18389304pfh.98.2022.01.24.09.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:21:06 -0800 (PST) Date: Mon, 24 Jan 2022 09:21:04 -0800 From: Stephen Hemminger To: Liron Himi Cc: "dev@dpdk.org" Subject: Re: l2/l3_len fields Message-ID: <20220124092104.07db8409@hermes.local> In-Reply-To: References: 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, 24 Jan 2022 08:39:59 +0000 Liron Himi wrote: > Hi, > > > > Can you please share the motivation of not filling l2/l3-len fields on PMD's RX function? > > PMD already filling the mbuf with parsing info, and the l2/l3-len are also probably part of the HW descriptor, so why no propagate them as well? > > The current way for application to find the l2_len (for example) is to examine the ptype using multiple if statement. > > However, this may not always work if there are unknown/user headers (e.g. DSA header). > in addition, some of the examples are not checking the ptype and assumes a specific packet structure. > e.g. l3-fwd, assumes only ethernet header exist and hardcoded jump by 14B to access the IP header. > but if VLAN exist it will fail. > > checking the l2_len will work in any case. > > > Regards, > Liron Himi > > [A picture containing clipart Description automatically generated] > > Park Azorim, Kyriat Arie, Petah Tikva, 49527, Israel > Mobile: +972.52.3329169 L2 len would be relatively easy since almost all devices are Ethernet only. L3 len is the problem, many devices don't interpret L3 and below headers. Only those that have flow type functionality are likely to do that.