Skip to content

Commit 644bca1

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
There's a fix which landed in net-next, pull it in along with the couple of minor cleanups. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 93e0401 + cb9e6e5 commit 644bca1

File tree

14 files changed

+39
-23
lines changed

14 files changed

+39
-23
lines changed

drivers/isdn/mISDN/dsp_cmx.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,6 @@
141141
/*#define CMX_DELAY_DEBUG * gives rx-buffer delay overview */
142142
/*#define CMX_TX_DEBUG * massive read/write on tx-buffer with content */
143143

144-
static inline int
145-
count_list_member(struct list_head *head)
146-
{
147-
int cnt = 0;
148-
struct list_head *m;
149-
150-
list_for_each(m, head)
151-
cnt++;
152-
return cnt;
153-
}
154-
155144
/*
156145
* debug cmx memory structure
157146
*/
@@ -1672,7 +1661,7 @@ dsp_cmx_send(void *arg)
16721661
mustmix = 0;
16731662
members = 0;
16741663
if (conf) {
1675-
members = count_list_member(&conf->mlist);
1664+
members = list_count_nodes(&conf->mlist);
16761665
#ifdef CMX_CONF_DEBUG
16771666
if (conf->software && members > 1)
16781667
#else
@@ -1695,7 +1684,7 @@ dsp_cmx_send(void *arg)
16951684
/* loop all members that require conference mixing */
16961685
list_for_each_entry(conf, &conf_ilist, list) {
16971686
/* count members and check hardware */
1698-
members = count_list_member(&conf->mlist);
1687+
members = list_count_nodes(&conf->mlist);
16991688
#ifdef CMX_CONF_DEBUG
17001689
if (conf->software && members > 1) {
17011690
#else

drivers/net/bonding/bond_main.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,6 +1789,26 @@ static void bond_ether_setup(struct net_device *bond_dev)
17891789
bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
17901790
}
17911791

1792+
void bond_xdp_set_features(struct net_device *bond_dev)
1793+
{
1794+
struct bonding *bond = netdev_priv(bond_dev);
1795+
xdp_features_t val = NETDEV_XDP_ACT_MASK;
1796+
struct list_head *iter;
1797+
struct slave *slave;
1798+
1799+
ASSERT_RTNL();
1800+
1801+
if (!bond_xdp_check(bond)) {
1802+
xdp_clear_features_flag(bond_dev);
1803+
return;
1804+
}
1805+
1806+
bond_for_each_slave(bond, slave, iter)
1807+
val &= slave->dev->xdp_features;
1808+
1809+
xdp_set_features_flag(bond_dev, val);
1810+
}
1811+
17921812
/* enslave device <slave> to bond device <master> */
17931813
int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
17941814
struct netlink_ext_ack *extack)
@@ -2236,6 +2256,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
22362256
bpf_prog_inc(bond->xdp_prog);
22372257
}
22382258

2259+
bond_xdp_set_features(bond_dev);
2260+
22392261
slave_info(bond_dev, slave_dev, "Enslaving as %s interface with %s link\n",
22402262
bond_is_active_slave(new_slave) ? "an active" : "a backup",
22412263
new_slave->link != BOND_LINK_DOWN ? "an up" : "a down");
@@ -2483,6 +2505,7 @@ static int __bond_release_one(struct net_device *bond_dev,
24832505
if (!netif_is_bond_master(slave_dev))
24842506
slave_dev->priv_flags &= ~IFF_BONDING;
24852507

2508+
bond_xdp_set_features(bond_dev);
24862509
kobject_put(&slave->kobj);
24872510

24882511
return 0;
@@ -3930,6 +3953,9 @@ static int bond_slave_netdev_event(unsigned long event,
39303953
/* Propagate to master device */
39313954
call_netdevice_notifiers(event, slave->bond->dev);
39323955
break;
3956+
case NETDEV_XDP_FEAT_CHANGE:
3957+
bond_xdp_set_features(bond_dev);
3958+
break;
39333959
default:
39343960
break;
39353961
}
@@ -5874,6 +5900,9 @@ void bond_setup(struct net_device *bond_dev)
58745900
if (BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP)
58755901
bond_dev->features |= BOND_XFRM_FEATURES;
58765902
#endif /* CONFIG_XFRM_OFFLOAD */
5903+
5904+
if (bond_xdp_check(bond))
5905+
bond_dev->xdp_features = NETDEV_XDP_ACT_MASK;
58775906
}
58785907

58795908
/* Destroy a bonding device.

drivers/net/bonding/bond_options.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,8 @@ static int bond_option_mode_set(struct bonding *bond,
877877
netdev_update_features(bond->dev);
878878
}
879879

880+
bond_xdp_set_features(bond->dev);
881+
880882
return 0;
881883
}
882884

drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static int aq_a2_fw_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
336336
static void aq_a2_fill_a0_stats(struct aq_hw_s *self,
337337
struct statistics_s *stats)
338338
{
339-
struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv;
339+
struct hw_atl2_priv *priv = self->priv;
340340
struct aq_stats_s *cs = &self->curr_stats;
341341
struct aq_stats_s curr_stats = *cs;
342342
bool corrupted_stats = false;
@@ -378,7 +378,7 @@ do { \
378378
static void aq_a2_fill_b0_stats(struct aq_hw_s *self,
379379
struct statistics_s *stats)
380380
{
381-
struct hw_atl2_priv *priv = (struct hw_atl2_priv *)self->priv;
381+
struct hw_atl2_priv *priv = self->priv;
382382
struct aq_stats_s *cs = &self->curr_stats;
383383
struct aq_stats_s curr_stats = *cs;
384384
bool corrupted_stats = false;

fs/9p/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config 9P_FS
33
tristate "Plan 9 Resource Sharing Support (9P2000)"
4-
depends on INET && NET_9P
4+
depends on NET_9P
55
select NETFS_SUPPORT
66
help
77
If you say Y here, you will get experimental support for

fs/9p/vfs_addr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <linux/file.h>
1313
#include <linux/stat.h>
1414
#include <linux/string.h>
15-
#include <linux/inet.h>
1615
#include <linux/pagemap.h>
1716
#include <linux/sched.h>
1817
#include <linux/swap.h>

fs/9p/vfs_dentry.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/pagemap.h>
1414
#include <linux/stat.h>
1515
#include <linux/string.h>
16-
#include <linux/inet.h>
1716
#include <linux/namei.h>
1817
#include <linux/sched.h>
1918
#include <linux/slab.h>

fs/9p/vfs_dir.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/stat.h>
1414
#include <linux/string.h>
1515
#include <linux/sched.h>
16-
#include <linux/inet.h>
1716
#include <linux/slab.h>
1817
#include <linux/uio.h>
1918
#include <linux/fscache.h>

fs/9p/vfs_file.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/file.h>
1515
#include <linux/stat.h>
1616
#include <linux/string.h>
17-
#include <linux/inet.h>
1817
#include <linux/list.h>
1918
#include <linux/pagemap.h>
2019
#include <linux/utsname.h>

fs/9p/vfs_inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/pagemap.h>
1616
#include <linux/stat.h>
1717
#include <linux/string.h>
18-
#include <linux/inet.h>
1918
#include <linux/namei.h>
2019
#include <linux/sched.h>
2120
#include <linux/slab.h>

0 commit comments

Comments
 (0)