diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2014-09-05 19:20:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-05 17:47:02 -0700 |
commit | 56193d1bce2b2759cb4bdcc00cd05544894a0c90 (patch) | |
tree | 621b2ce35961049dd263c2f83aee3d9ec39ac686 /include/net/flow_keys.h | |
parent | 2c048e646212f9880e6f201771a30daa963d7f8b (diff) | |
download | linux-56193d1bce2b2759cb4bdcc00cd05544894a0c90.tar.gz linux-56193d1bce2b2759cb4bdcc00cd05544894a0c90.tar.bz2 linux-56193d1bce2b2759cb4bdcc00cd05544894a0c90.zip |
net: Add function for parsing the header length out of linear ethernet frames
This patch updates some of the flow_dissector api so that it can be used to
parse the length of ethernet buffers stored in fragments. Most of the
changes needed were to __skb_get_poff as it needed to be updated to support
sending a linear buffer instead of a skb.
I have split __skb_get_poff into two functions, the first is skb_get_poff
and it retains the functionality of the original __skb_get_poff. The other
function is __skb_get_poff which now works much like __skb_flow_dissect in
relation to skb_flow_dissect in that it provides the same functionality but
works with just a data buffer and hlen instead of needing an skb.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow_keys.h')
-rw-r--r-- | include/net/flow_keys.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h index 9a03f73c4974..7ee2df083542 100644 --- a/include/net/flow_keys.h +++ b/include/net/flow_keys.h @@ -40,4 +40,6 @@ static inline __be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 return __skb_flow_get_ports(skb, thoff, ip_proto, NULL, 0); } u32 flow_hash_from_keys(struct flow_keys *keys); +unsigned int flow_get_hlen(const unsigned char *data, unsigned int max_len, + __be16 protocol); #endif |