Commit 550374c2 authored by Wang Hai's avatar Wang Hai Committed by Zhengchao Shao
Browse files

kabi: net: reserve space for net can subsystem related structure

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC



----------------------------------------------------

Reserve some fields beforehand for net can framework related
structures prone to change.

Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 38419a85
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/can.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/kabi.h>

#define DNAME(dev) ((dev) ? (dev)->name : "any")

@@ -32,6 +33,9 @@ struct can_proto {
	int protocol;
	const struct proto_ops *ops;
	struct proto *prot;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

/* required_size
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/can/skb.h>
#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/kabi.h>

/*
 * CAN mode
@@ -85,6 +86,11 @@ struct can_priv {
	int (*do_get_berr_counter)(const struct net_device *dev,
				   struct can_berr_counter *bec);
	int (*do_get_auto_tdcv)(const struct net_device *dev, u32 *tdcv);

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

static inline bool can_tdc_is_enabled(const struct can_priv *priv)
+4 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@

#include <linux/netdevice.h>
#include <linux/can.h>
#include <linux/kabi.h>

struct can_rx_offload {
	struct net_device *dev;
@@ -29,6 +30,9 @@ struct can_rx_offload {
	struct napi_struct napi;

	bool inc;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

int can_rx_offload_add_timestamp(struct net_device *dev,
+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/kabi.h>

struct can_dev_rcv_lists;
struct can_pkg_stats;
@@ -36,6 +37,9 @@ struct netns_can {

	/* CAN GW per-net gateway jobs */
	struct hlist_head cgw_list;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

#endif /* __NETNS_CAN_H__ */