-----Original Message----- From: Stephen Hemminger <step...@networkplumber.org> Sent: Monday, 24 January 2022 19:21 To: Liron Himi <lir...@marvell.com> Cc: dev@dpdk.org Subject: [EXT] Re: l2/l3_len fields
External Email ---------------------------------------------------------------------- On Mon, 24 Jan 2022 08:39:59 +0000 Liron Himi <lir...@marvell.com> 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]<https://www.marvell.com/> > > 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. [L.H.] Not sure I understand what you mean. what will be easy? Easy for the application to calculate the l2_len?