Hi, On 04/29/2016 10:00 PM, Arnon Warshavsky wrote: > > > On Fri, Apr 29, 2016 at 9:24 PM, Jay Rolette <rolette at infinite.io > <mailto:rolette at infinite.io>> wrote: > > On Fri, Apr 29, 2016 at 1:16 PM, Don Provan <dprovan at bivio.net > <mailto:dprovan at bivio.net>> wrote: > > > >From: Olivier Matz [mailto:olivier.matz at 6wind.com > <mailto:olivier.matz at 6wind.com>] > > >Subject: [dpdk-dev] removing mbuf error flags > > > > > >My opinion is that invalid packets should not be given to the > application > > and only a statistic counter should be incremented. > > > > The idea of an application that handles bad packets is perfectly valid. > > Most applications don't want to see them, of course, but, conceptually, > > some applications would want to ask for bad packets because they are > > specifically designed to handle various networking problems including > those > > that result in bad packets that the application can look at and report. > > Furthermore, it makes technical sense for DPDK to support such > applications. > > > > Having said that, I have no idea if that's why that field was added, > and I > > don?t myself care if DPDK provides that feature in the future. I just > > thought I'd put the idea out there in case it makes any difference to > you. > > If it were me, I'd probably decide it isn't hurting anything and not > bother > > to remove it in case some day someone wants to implement that feature in > > one driver or another. > > > > Yep. Pretty much any networking security product needs to see malformed > packets. > > Jay > > > +1 for letting the application see bad packets and decide what to do > with them. > We had some zero order insertion issues in the past where the ability to > let the application capture malformed/unexpected packets was very helpful.
The point is today it's broken, and no application running on top of DPDK check these flags because they are set to 0. If we decide to assign a value to these flags, it will break the working applications because they don't expect to receive invalid packets. Maybe a proper solution would be to enable these flags on demand in PMD configuration, and add a feature flag for this feature. I think we should not keep things half-done too long. It's confusing and useless as-is. If some applications really need to see these malformed packets, the API has to define in which conditions these flags are set and what is expected in the mbuf data when one of these flags is set. The only documentation we have now is: PKT_RX_OVERSIZE: Num of desc of an RX pkt oversize. PKT_RX_HBUF_OVERFLOW: Header buffer overflow. PKT_RX_RECIP_ERR: Hardware processing error. PKT_RX_MAC_ERR: MAC error. If it's not better defined, I don't know how an application could use these flags. Also, the PMDs should not behave differently by default. If someone commit on working on this in the comming weeks, I'll be happy to help, else I still think the current state has to be reverted. Regards, Olivier