mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-06 19:06:39 +07:00
357afe9c46
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>
19 lines
402 B
C
19 lines
402 B
C
#ifndef _NET_FLOW_KEYS_H
|
|
#define _NET_FLOW_KEYS_H
|
|
|
|
struct flow_keys {
|
|
/* (src,dst) must be grouped, in the same way than in IP header */
|
|
__be32 src;
|
|
__be32 dst;
|
|
union {
|
|
__be32 ports;
|
|
__be16 port16[2];
|
|
};
|
|
u16 thoff;
|
|
u8 ip_proto;
|
|
};
|
|
|
|
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
|