From: Rami Rosen [mailto:roszenr...@gmail.com] 
>Hi Morten,
>A good idea, thanks for volunteering! 
>Several minor comments: 
>I would consider calling it rte_mbuf_hdr_parse(), to make it more related to 
>the rte_mbuf* methods, and also I would consider having it in librte_mbuf and 
>not in librte_net as you suggested.

I considered this, but since it looks inside the packet data, and not just 
processes metadata, I think it doesn't belong in librte_mbuf.

>
>Also regarding the bulk method. The first option is indeed faster and better 
>in terms of performance, which is important since it is intended probably 
>mostly to the datapath. I would consider having the bulk method iterating over 
>the rte_hdr_parse() method ,( or rte_mbuf_hdr_parse() if you will agree to my 
>suggestion), and adding a boolean parameter (mark_malform or something like 
>that) to this method + removing the const quailifier. The bulk method will set 
>that flag when calling the rte_hdr_parse(). Thus you will avoid duplicity of 
>the parsing code.

Good points...

And regarding avoiding code duplicity, I'm pursuing Olivier about merging 
packet header validation into rte_net_get_ptype() instead of writing a separate 
function.

>
>Regards,
>Rami Rosen

Reply via email to