提交 cb4ee3d9 编辑于 作者: Kim Jones's avatar Kim Jones 提交者: Robert Nelson
浏览文件

ethtool: Declare netdev_rss_key as __read_mostly.



netdev_rss_key is written to once and thereafter is read by
drivers when they are initialising. The fact that it is mostly
read and not written to makes it a candidate for a __read_mostly
declaration.

Signed-off-by: default avatarKim Jones <kim-marie.jones@intel.com>
Signed-off-by: default avatarAlan Carey <alan.carey@intel.com>
Acked-by: default avatarRami Rosen <rami.rosen@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
上级 97809612
......@@ -3697,7 +3697,7 @@ void *netdev_lower_dev_get_private(struct net_device *dev,
/* RSS keys are 40 or 52 bytes long */
#define NETDEV_RSS_KEY_LEN 52
extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN];
extern u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly;
void netdev_rss_key_fill(void *buffer, size_t len);
int dev_get_nest_level(struct net_device *dev,
......
......@@ -632,7 +632,7 @@ static int ethtool_copy_validate_indir(u32 *indir, void __user *useraddr,
return 0;
}
u8 netdev_rss_key[NETDEV_RSS_KEY_LEN];
u8 netdev_rss_key[NETDEV_RSS_KEY_LEN] __read_mostly;
void netdev_rss_key_fill(void *buffer, size_t len)
{
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册