#include <linux/netdevice.h>
#include <linux/notifier.h>
#include <linux/rtnetlink.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include <net/xdp.h>
#include <net/xdp_sock.h>
#include <net/netdev_rx_queue.h>
#include <net/netdev_queues.h>
#include <net/busy_poll.h>
#include "netdev-genl-gen.h"
#include "dev.h"
struct netdev_nl_dump_ctx { … };
static struct netdev_nl_dump_ctx *netdev_dump_ctx(struct netlink_callback *cb)
{ … }
static int
netdev_nl_dev_fill(struct net_device *netdev, struct sk_buff *rsp,
const struct genl_info *info)
{ … }
static void
netdev_genl_dev_notify(struct net_device *netdev, int cmd)
{ … }
int netdev_nl_dev_get_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
int netdev_nl_dev_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
{ … }
static int
netdev_nl_napi_fill_one(struct sk_buff *rsp, struct napi_struct *napi,
const struct genl_info *info)
{ … }
int netdev_nl_napi_get_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
static int
netdev_nl_napi_dump_one(struct net_device *netdev, struct sk_buff *rsp,
const struct genl_info *info,
struct netdev_nl_dump_ctx *ctx)
{ … }
int netdev_nl_napi_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
{ … }
static int
netdev_nl_queue_fill_one(struct sk_buff *rsp, struct net_device *netdev,
u32 q_idx, u32 q_type, const struct genl_info *info)
{ … }
static int netdev_nl_queue_validate(struct net_device *netdev, u32 q_id,
u32 q_type)
{ … }
static int
netdev_nl_queue_fill(struct sk_buff *rsp, struct net_device *netdev, u32 q_idx,
u32 q_type, const struct genl_info *info)
{ … }
int netdev_nl_queue_get_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
static int
netdev_nl_queue_dump_one(struct net_device *netdev, struct sk_buff *rsp,
const struct genl_info *info,
struct netdev_nl_dump_ctx *ctx)
{ … }
int netdev_nl_queue_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
{ … }
#define NETDEV_STAT_NOT_SET …
static void netdev_nl_stats_add(void *_sum, const void *_add, size_t size)
{ … }
static int netdev_stat_put(struct sk_buff *rsp, unsigned int attr_id, u64 value)
{ … }
static int
netdev_nl_stats_write_rx(struct sk_buff *rsp, struct netdev_queue_stats_rx *rx)
{ … }
static int
netdev_nl_stats_write_tx(struct sk_buff *rsp, struct netdev_queue_stats_tx *tx)
{ … }
static int
netdev_nl_stats_queue(struct net_device *netdev, struct sk_buff *rsp,
u32 q_type, int i, const struct genl_info *info)
{ … }
static int
netdev_nl_stats_by_queue(struct net_device *netdev, struct sk_buff *rsp,
const struct genl_info *info,
struct netdev_nl_dump_ctx *ctx)
{ … }
static int
netdev_nl_stats_by_netdev(struct net_device *netdev, struct sk_buff *rsp,
const struct genl_info *info)
{ … }
static int
netdev_nl_qstats_get_dump_one(struct net_device *netdev, unsigned int scope,
struct sk_buff *skb, const struct genl_info *info,
struct netdev_nl_dump_ctx *ctx)
{ … }
int netdev_nl_qstats_get_dumpit(struct sk_buff *skb,
struct netlink_callback *cb)
{ … }
static int netdev_genl_netdevice_event(struct notifier_block *nb,
unsigned long event, void *ptr)
{ … }
static struct notifier_block netdev_genl_nb = …;
static int __init netdev_genl_init(void)
{ … }
subsys_initcall(netdev_genl_init);