flow_dissector: factor out the ports extraction in skb_flow_get_ports
Factor out the code that extracts the ports from skb_flow_dissect and add a new function skb_flow_get_ports which can be re-used. Suggested-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5080546682
commit
357afe9c46
@@ -14,4 +14,5 @@ struct flow_keys {
|
||||
};
|
||||
|
||||
bool skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow);
|
||||
__be32 skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user