On Thu, May 25, 2017 at 6:42 PM, Tom Herbert <[email protected]> wrote:
> On Thu, May 25, 2017 at 6:24 AM, Or Gerlitz <[email protected]> wrote:
>> Add support for dissection of ip tos and ttl and ipv6 traffic-class
>> and hoplimit. Both are dissected into the same struct.
>> --- a/include/net/flow_dissector.h
>> +++ b/include/net/flow_dissector.h
>> +/**
>> + * struct flow_dissector_key_ip:
>> + * @tos: tos
>> + * @ttl: ttl
>> + */
>> +struct flow_dissector_key_ip {
>> + __u8 tos;
>> + __u8 ttl;
>> +};
>> +
> Looks like yet more complexity be piled onto flow dissector. Instead
> of splitting out individual fields can we just return a pointer to the
> IP header and let the caller extract the fields they're interested in?
Do you mean that struct flow_dissector_key_ip will only contain
(union?) const struct iphdr * and const struct ipv6hdr * ? I wasn't
sure how would that further look on the kernel SW classification path
(the non offloaded case)