Commit 45ef1561 authored by Zhengchao Shao's avatar Zhengchao Shao
Browse files

net: fix kabi change in struct net_device_ops

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


CVE: NA

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

The member variable ndo_xdp_get_xmit_slave is added to the struct
net_device_ops in commit 879af96f("net, core: Add support for XDP
redirection to slave device"). As a result, the kabi is changed. It is
need to use the reserved KABI_RESERVE to rectify the fault.

Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 9c359445
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1522,8 +1522,6 @@ struct net_device_ops {
	int			(*ndo_xdp_xmit)(struct net_device *dev, int n,
						struct xdp_frame **xdp,
						u32 flags);
	struct net_device *	(*ndo_xdp_get_xmit_slave)(struct net_device *dev,
							  struct xdp_buff *xdp);
	int			(*ndo_xsk_wakeup)(struct net_device *dev,
						  u32 queue_id, u32 flags);
	struct devlink_port *	(*ndo_get_devlink_port)(struct net_device *dev);
@@ -1531,7 +1529,8 @@ struct net_device_ops {
						  struct ip_tunnel_parm *p, int cmd);
	struct net_device *	(*ndo_get_peer_dev)(struct net_device *dev);

	KABI_RESERVE(1)
	KABI_USE(1, struct net_device *(*ndo_xdp_get_xmit_slave)(struct net_device *dev,
								 struct xdp_buff *xdp))
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)