Commit 1e7bdec6 authored by Amit Cohen's avatar Amit Cohen Committed by Jakub Kicinski

net: ipv4: Publish fib_nlmsg_size()

Publish fib_nlmsg_size() to allow it to be used later on from
fib_alias_hw_flags_set().

Remove the inline keyword since it shouldn't be used inside C files.
Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 08554789
...@@ -42,6 +42,7 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, ...@@ -42,6 +42,7 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
const struct fib_rt_info *fri, unsigned int flags); const struct fib_rt_info *fri, unsigned int flags);
void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, int dst_len, void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, int dst_len,
u32 tb_id, const struct nl_info *info, unsigned int nlm_flags); u32 tb_id, const struct nl_info *info, unsigned int nlm_flags);
size_t fib_nlmsg_size(struct fib_info *fi);
static inline void fib_result_assign(struct fib_result *res, static inline void fib_result_assign(struct fib_result *res,
struct fib_info *fi) struct fib_info *fi)
......
...@@ -452,7 +452,7 @@ int ip_fib_check_default(__be32 gw, struct net_device *dev) ...@@ -452,7 +452,7 @@ int ip_fib_check_default(__be32 gw, struct net_device *dev)
return -1; return -1;
} }
static inline size_t fib_nlmsg_size(struct fib_info *fi) size_t fib_nlmsg_size(struct fib_info *fi)
{ {
size_t payload = NLMSG_ALIGN(sizeof(struct rtmsg)) size_t payload = NLMSG_ALIGN(sizeof(struct rtmsg))
+ nla_total_size(4) /* RTA_TABLE */ + nla_total_size(4) /* RTA_TABLE */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment