Skip to content

Commit c4eb1e1

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Hopefully the last pull request for this release. Fingers crossed: 1) Only refcount ESP stats on full sockets, from Martin Willi. 2) Missing barriers in AF_UNIX, from Al Viro. 3) RCU protection fixes in ipv6 route code, from Paolo Abeni. 4) Avoid false positives in untrusted GSO validation, from Willem de Bruijn. 5) Forwarded mesh packets in mac80211 need more tailroom allocated, from Felix Fietkau. 6) Use operstate consistently for linkup in team driver, from George Wilkie. 7) ThunderX bug fixes from Vadim Lomovtsev. Mostly races between VF and PF code paths. 8) Purge ipv6 exceptions during netdevice removal, from Paolo Abeni. 9) nfp eBPF code gen fixes from Jiong Wang. 10) bnxt_en firmware timeout fix from Michael Chan. 11) Use after free in udp/udpv6 error handlers, from Paolo Abeni. 12) Fix a race in x25_bind triggerable by syzbot, from Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits) net: phy: realtek: Dummy IRQ calls for RTL8366RB tcp: repaired skbs must init their tso_segs net/x25: fix a race in x25_bind() net: dsa: Remove documentation for port_fdb_prepare Revert "bridge: do not add port to router list when receives query with source 0.0.0.0" selftests: fib_tests: sleep after changing carrier. again. net: set static variable an initial value in atl2_probe() net: phy: marvell10g: Fix Multi-G advertisement to only advertise 10G bpf, doc: add bpf list as secondary entry to maintainers file udp: fix possible user after free in error handler udpv6: fix possible user after free in error handler fou6: fix proto error handler argument type udpv6: add the required annotation to mib type mdio_bus: Fix use-after-free on device_register fails net: Set rtm_table to RT_TABLE_COMPAT for ipv6 for tables > 255 bnxt_en: Wait longer for the firmware message response to complete. bnxt_en: Fix typo in firmware message timeout logic. nfp: bpf: fix ALU32 high bits clearance bug nfp: bpf: fix code-gen bug on BPF_ALU | BPF_XOR | BPF_K Documentation: networking: switchdev: Update port parent ID section ...
2 parents e60b5f7 + 4c8e045 commit c4eb1e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+568
-420
lines changed

Documentation/networking/dsa/dsa.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -533,16 +533,12 @@ Bridge VLAN filtering
533533
function that the driver has to call for each VLAN the given port is a member
534534
of. A switchdev object is used to carry the VID and bridge flags.
535535

536-
- port_fdb_prepare: bridge layer function invoked when the bridge prepares the
537-
installation of a Forwarding Database entry. If the operation is not
538-
supported, this function should return -EOPNOTSUPP to inform the bridge code
539-
to fallback to a software implementation. No hardware setup must be done in
540-
this function. See port_fdb_add for this and details.
541-
542536
- port_fdb_add: bridge layer function invoked when the bridge wants to install a
543537
Forwarding Database entry, the switch hardware should be programmed with the
544538
specified address in the specified VLAN Id in the forwarding database
545-
associated with this VLAN ID
539+
associated with this VLAN ID. If the operation is not supported, this
540+
function should return -EOPNOTSUPP to inform the bridge code to fallback to
541+
a software implementation.
546542

547543
Note: VLAN ID 0 corresponds to the port private database, which, in the context
548544
of DSA, would be the its port-based VLAN, used by the associated bridge device.

Documentation/networking/switchdev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ device.
9292
Switch ID
9393
^^^^^^^^^
9494

95-
The switchdev driver must implement the switchdev op switchdev_port_attr_get
96-
for SWITCHDEV_ATTR_ID_PORT_PARENT_ID for each port netdev, returning the same
97-
physical ID for each port of a switch. The ID must be unique between switches
98-
on the same system. The ID does not need to be unique between switches on
99-
different systems.
95+
The switchdev driver must implement the net_device operation
96+
ndo_get_port_parent_id for each port netdev, returning the same physical ID for
97+
each port of a switch. The ID must be unique between switches on the same
98+
system. The ID does not need to be unique between switches on different
99+
systems.
100100

101101
The switch ID is used to locate ports on a switch and to know if aggregated
102102
ports belong to the same switch.

MAINTAINERS

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,7 +2851,7 @@ R: Martin KaFai Lau <kafai@fb.com>
28512851
R: Song Liu <songliubraving@fb.com>
28522852
R: Yonghong Song <yhs@fb.com>
28532853
L: netdev@vger.kernel.org
2854-
L: linux-kernel@vger.kernel.org
2854+
L: bpf@vger.kernel.org
28552855
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
28562856
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
28572857
Q: https://patchwork.ozlabs.org/project/netdev/list/?delegate=77147
@@ -2881,6 +2881,7 @@ N: bpf
28812881
BPF JIT for ARM
28822882
M: Shubham Bansal <illusionist.neo@gmail.com>
28832883
L: netdev@vger.kernel.org
2884+
L: bpf@vger.kernel.org
28842885
S: Maintained
28852886
F: arch/arm/net/
28862887

@@ -2889,52 +2890,60 @@ M: Daniel Borkmann <daniel@iogearbox.net>
28892890
M: Alexei Starovoitov <ast@kernel.org>
28902891
M: Zi Shen Lim <zlim.lnx@gmail.com>
28912892
L: netdev@vger.kernel.org
2893+
L: bpf@vger.kernel.org
28922894
S: Supported
28932895
F: arch/arm64/net/
28942896

28952897
BPF JIT for MIPS (32-BIT AND 64-BIT)
28962898
M: Paul Burton <paul.burton@mips.com>
28972899
L: netdev@vger.kernel.org
2900+
L: bpf@vger.kernel.org
28982901
S: Maintained
28992902
F: arch/mips/net/
29002903

29012904
BPF JIT for NFP NICs
29022905
M: Jakub Kicinski <jakub.kicinski@netronome.com>
29032906
L: netdev@vger.kernel.org
2907+
L: bpf@vger.kernel.org
29042908
S: Supported
29052909
F: drivers/net/ethernet/netronome/nfp/bpf/
29062910

29072911
BPF JIT for POWERPC (32-BIT AND 64-BIT)
29082912
M: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
29092913
M: Sandipan Das <sandipan@linux.ibm.com>
29102914
L: netdev@vger.kernel.org
2915+
L: bpf@vger.kernel.org
29112916
S: Maintained
29122917
F: arch/powerpc/net/
29132918

29142919
BPF JIT for S390
29152920
M: Martin Schwidefsky <schwidefsky@de.ibm.com>
29162921
M: Heiko Carstens <heiko.carstens@de.ibm.com>
29172922
L: netdev@vger.kernel.org
2923+
L: bpf@vger.kernel.org
29182924
S: Maintained
29192925
F: arch/s390/net/
29202926
X: arch/s390/net/pnet.c
29212927

29222928
BPF JIT for SPARC (32-BIT AND 64-BIT)
29232929
M: David S. Miller <davem@davemloft.net>
29242930
L: netdev@vger.kernel.org
2931+
L: bpf@vger.kernel.org
29252932
S: Maintained
29262933
F: arch/sparc/net/
29272934

29282935
BPF JIT for X86 32-BIT
29292936
M: Wang YanQing <udknight@gmail.com>
29302937
L: netdev@vger.kernel.org
2938+
L: bpf@vger.kernel.org
29312939
S: Maintained
29322940
F: arch/x86/net/bpf_jit_comp32.c
29332941

29342942
BPF JIT for X86 64-BIT
29352943
M: Alexei Starovoitov <ast@kernel.org>
29362944
M: Daniel Borkmann <daniel@iogearbox.net>
29372945
L: netdev@vger.kernel.org
2946+
L: bpf@vger.kernel.org
29382947
S: Supported
29392948
F: arch/x86/net/
29402949
X: arch/x86/net/bpf_jit_comp32.c
@@ -3389,9 +3398,8 @@ F: Documentation/media/v4l-drivers/cafe_ccic*
33893398
F: drivers/media/platform/marvell-ccic/
33903399

33913400
CAIF NETWORK LAYER
3392-
M: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
33933401
L: netdev@vger.kernel.org
3394-
S: Supported
3402+
S: Orphan
33953403
F: Documentation/networking/caif/
33963404
F: drivers/net/caif/
33973405
F: include/uapi/linux/caif/
@@ -8486,6 +8494,7 @@ L7 BPF FRAMEWORK
84868494
M: John Fastabend <john.fastabend@gmail.com>
84878495
M: Daniel Borkmann <daniel@iogearbox.net>
84888496
L: netdev@vger.kernel.org
8497+
L: bpf@vger.kernel.org
84898498
S: Maintained
84908499
F: include/linux/skmsg.h
84918500
F: net/core/skmsg.c
@@ -16713,6 +16722,7 @@ M: Jesper Dangaard Brouer <hawk@kernel.org>
1671316722
M: John Fastabend <john.fastabend@gmail.com>
1671416723
L: netdev@vger.kernel.org
1671516724
L: xdp-newbies@vger.kernel.org
16725+
L: bpf@vger.kernel.org
1671616726
S: Supported
1671716727
F: net/core/xdp.c
1671816728
F: include/net/xdp.h
@@ -16726,6 +16736,7 @@ XDP SOCKETS (AF_XDP)
1672616736
M: Björn Töpel <bjorn.topel@intel.com>
1672716737
M: Magnus Karlsson <magnus.karlsson@intel.com>
1672816738
L: netdev@vger.kernel.org
16739+
L: bpf@vger.kernel.org
1672916740
S: Maintained
1673016741
F: kernel/bpf/xskmap.c
1673116742
F: net/xdp/

drivers/net/bonding/bond_main.c

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,29 +1183,22 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
11831183
}
11841184
}
11851185

1186-
/* Link-local multicast packets should be passed to the
1187-
* stack on the link they arrive as well as pass them to the
1188-
* bond-master device. These packets are mostly usable when
1189-
* stack receives it with the link on which they arrive
1190-
* (e.g. LLDP) they also must be available on master. Some of
1191-
* the use cases include (but are not limited to): LLDP agents
1192-
* that must be able to operate both on enslaved interfaces as
1193-
* well as on bonds themselves; linux bridges that must be able
1194-
* to process/pass BPDUs from attached bonds when any kind of
1195-
* STP version is enabled on the network.
1186+
/*
1187+
* For packets determined by bond_should_deliver_exact_match() call to
1188+
* be suppressed we want to make an exception for link-local packets.
1189+
* This is necessary for e.g. LLDP daemons to be able to monitor
1190+
* inactive slave links without being forced to bind to them
1191+
* explicitly.
1192+
*
1193+
* At the same time, packets that are passed to the bonding master
1194+
* (including link-local ones) can have their originating interface
1195+
* determined via PACKET_ORIGDEV socket option.
11961196
*/
1197-
if (is_link_local_ether_addr(eth_hdr(skb)->h_dest)) {
1198-
struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
1199-
1200-
if (nskb) {
1201-
nskb->dev = bond->dev;
1202-
nskb->queue_mapping = 0;
1203-
netif_rx(nskb);
1204-
}
1205-
return RX_HANDLER_PASS;
1206-
}
1207-
if (bond_should_deliver_exact_match(skb, slave, bond))
1197+
if (bond_should_deliver_exact_match(skb, slave, bond)) {
1198+
if (is_link_local_ether_addr(eth_hdr(skb)->h_dest))
1199+
return RX_HANDLER_PASS;
12081200
return RX_HANDLER_EXACT;
1201+
}
12091202

12101203
skb->dev = bond->dev;
12111204

drivers/net/ethernet/atheros/atlx/atl2.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,13 +1335,11 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
13351335
{
13361336
struct net_device *netdev;
13371337
struct atl2_adapter *adapter;
1338-
static int cards_found;
1338+
static int cards_found = 0;
13391339
unsigned long mmio_start;
13401340
int mmio_len;
13411341
int err;
13421342

1343-
cards_found = 0;
1344-
13451343
err = pci_enable_device(pdev);
13461344
if (err)
13471345
return err;

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3903,7 +3903,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
39033903
if (len)
39043904
break;
39053905
/* on first few passes, just barely sleep */
3906-
if (i < DFLT_HWRM_CMD_TIMEOUT)
3906+
if (i < HWRM_SHORT_TIMEOUT_COUNTER)
39073907
usleep_range(HWRM_SHORT_MIN_TIMEOUT,
39083908
HWRM_SHORT_MAX_TIMEOUT);
39093909
else
@@ -3926,7 +3926,7 @@ static int bnxt_hwrm_do_send_msg(struct bnxt *bp, void *msg, u32 msg_len,
39263926
dma_rmb();
39273927
if (*valid)
39283928
break;
3929-
udelay(1);
3929+
usleep_range(1, 5);
39303930
}
39313931

39323932
if (j >= HWRM_VALID_BIT_DELAY_USEC) {

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ struct nqe_cn {
582582
(HWRM_SHORT_TIMEOUT_COUNTER * HWRM_SHORT_MIN_TIMEOUT + \
583583
((n) - HWRM_SHORT_TIMEOUT_COUNTER) * HWRM_MIN_TIMEOUT))
584584

585-
#define HWRM_VALID_BIT_DELAY_USEC 20
585+
#define HWRM_VALID_BIT_DELAY_USEC 150
586586

587587
#define BNXT_HWRM_CHNL_CHIMP 0
588588
#define BNXT_HWRM_CHNL_KONG 1

drivers/net/ethernet/cavium/thunder/nic.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ struct xcast_addr_list {
271271
};
272272

273273
struct nicvf_work {
274-
struct delayed_work work;
274+
struct work_struct work;
275275
u8 mode;
276276
struct xcast_addr_list *mc;
277277
};
@@ -327,7 +327,11 @@ struct nicvf {
327327
struct nicvf_work rx_mode_work;
328328
/* spinlock to protect workqueue arguments from concurrent access */
329329
spinlock_t rx_mode_wq_lock;
330-
330+
/* workqueue for handling kernel ndo_set_rx_mode() calls */
331+
struct workqueue_struct *nicvf_rx_mode_wq;
332+
/* mutex to protect VF's mailbox contents from concurrent access */
333+
struct mutex rx_mode_mtx;
334+
struct delayed_work link_change_work;
331335
/* PTP timestamp */
332336
struct cavium_ptp *ptp_clock;
333337
/* Inbound timestamping is on */
@@ -575,10 +579,8 @@ struct set_ptp {
575579

576580
struct xcast {
577581
u8 msg;
578-
union {
579-
u8 mode;
580-
u64 mac;
581-
} data;
582+
u8 mode;
583+
u64 mac:48;
582584
};
583585

584586
/* 128 bit shared memory between PF and each VF */

0 commit comments

Comments
 (0)