mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 21:49:26 +07:00
nfp: add helper to get flower cmsg length
Add a helper function that returns the length of the cmsg data when given the cmsg skb Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
14a0d032f4
commit
79ede4ae2d
@ -323,6 +323,11 @@ static inline void *nfp_flower_cmsg_get_data(struct sk_buff *skb)
|
||||
return (unsigned char *)skb->data + NFP_FLOWER_CMSG_HLEN;
|
||||
}
|
||||
|
||||
static inline int nfp_flower_cmsg_get_data_len(struct sk_buff *skb)
|
||||
{
|
||||
return skb->len - NFP_FLOWER_CMSG_HLEN;
|
||||
}
|
||||
|
||||
struct sk_buff *
|
||||
nfp_flower_cmsg_mac_repr_start(struct nfp_app *app, unsigned int num_ports);
|
||||
void
|
||||
|
@ -140,7 +140,7 @@ nfp_flower_update_stats(struct nfp_app *app, struct nfp_fl_stats_frame *stats)
|
||||
|
||||
void nfp_flower_rx_flow_stats(struct nfp_app *app, struct sk_buff *skb)
|
||||
{
|
||||
unsigned int msg_len = skb->len - NFP_FLOWER_CMSG_HLEN;
|
||||
unsigned int msg_len = nfp_flower_cmsg_get_data_len(skb);
|
||||
struct nfp_fl_stats_frame *stats_frame;
|
||||
unsigned char *msg;
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user