mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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:
parent
fbff949e3b
commit
06635a35d1
12 changed files with 229 additions and 146 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue