[dpdk-dev] [PATCH 00/17] unified packet type

Olivier MATZ olivier.matz at 6wind.com
Tue Feb 3 09:55:04 CET 2015


Hi Konstantin,

On 02/02/2015 06:20 PM, Ananyev, Konstantin wrote:
>> I think the API should describe for each packet type what can be
>> expected by the application. Here is an example. When a driver sets the
>> RTE_PTYPE_L3_IPV4 type, it means that:
>>
>> - the layer 3 is identified as IP by underlying layer (ex: ethertype=IP
>>    if layer 2 is ethernet)
>> - the IP version field is 4
>> - there is no IP options (i.e the size of header is 20)
>
> Yes, I suppose that's what supported HW can guarantee when RTE_PTYPE_L3_IPV4 is set.
>
>> - the checksum field has been verified by hw, and if wrong, the
>>    flag PKT_RX_IP_CKSUM_BAD is set
>
> Hmm, why is that?
> As I remember on many devices it is configurable by SW should HW do RX checksum offload or not.
>  From DPDK point of view there is hw_ip_checksum field in rte_eth_rxmode.
> So it is a possible situation, when at RX HW does packet type determination, but doesn't make L3/L4
> checksum calculation.
>
> I suppose for checksum(s) it should be a separate flags (in ol_flags) with 3 possible values:
> CKSUM_UNKNOWN, CKSUM_BAD, CKSUM_OK.

Indeed you are right, it's probably better to have specific flags
for checksum.

Regards,
Olivier



More information about the dev mailing list