flow_dissect: use programable dissector in skb_flow_dissect and friends

Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Jiri Pirko 2015-05-12 14:56:16 +02:00 • committed by David S. Miller
commit 06635a35d1
12 changed files with 229 additions and 146 deletions

View file

@ -131,9 +131,9 @@ u32 eth_get_headlen(void *data, unsigned int len)
return len;
/* parse any remaining L2/L3 headers, check for L4 */
if (!__skb_flow_dissect(NULL, &keys, data,
eth->h_proto, sizeof(*eth), len))
return max_t(u32, keys.thoff, sizeof(*eth));
if (!skb_flow_dissect_flow_keys_buf(&keys, data, eth->h_proto,
sizeof(*eth), len))
return max_t(u32, keys.basic.thoff, sizeof(*eth));
/* parse for any L4 headers */
return min_t(u32, __skb_get_poff(NULL, data, &keys, len), len);