[dpdk-dev] [PATCH 04/12] mbuf: add function to calculate a checksum

Olivier Matz olivier.matz at 6wind.com
Mon Aug 29 16:52:22 CEST 2016


Hi guys,

On 07/22/2016 10:24 AM, Olivier Matz wrote:
>>> diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 56f37e6..0304245 100644
>>> --- a/lib/librte_mbuf/rte_mbuf.c
>>> +++ b/lib/librte_mbuf/rte_mbuf.c
>>> @@ -60,6 +60,7 @@
>>>  #include <rte_hexdump.h>
>>>  #include <rte_errno.h>
>>>  #include <rte_memcpy.h>
>>> +#include <rte_ip.h>
>>
>> As a nit, do we need to introduce a dependency for librte_mbuf on librte_net?
>> Might be better to put this functionality into librte_net?
> 
> I tried to have this code in librte_net, also when working on the
> software packet type parser, and it did not really convince me, mainly
> because librte_net is just header files as of today (it's not a real
> library). But I can give it a try and post a patch so we can compare,
> probably not in the coming days, but I keep a note on it.

Back on this. I've just submitted a v2 for the software packet type
patchset:
http://dpdk.org/ml/archives/dev/2016-August/045876.html

As promised, I did the exercice of moving the the software packet type
parser in librte_net. I did it on the sw ptype patchset, but it would be
almost the same for the mbuf checksum function calculation of this patchset.

The most notable differences between v1 and v2 are:

v1:
- rte_pktmbuf_get_ptype() is in librte_mbuf
- only headers in librte_net
- librte_mbuf depends on headers in librte_net

v2:
- rte_net_get_ptype() is in librte_net
- librte_net is now a real library (.so or .a)
- librte_net depends on librte_mbuf

Please, let me know if you have any comment. Depending on them, I'll
adapt the v2 of this patchset too.


Olivier


More information about the dev mailing list