Skip to content

Commit ef93565

Browse files
committed
Merge tag 'net-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from Bluetooth and wireless. A few more fixes for the locking changes trickling in. Nothing too alarming, I suspect those will continue for another release. Other than that things are slowing down nicely. Current release - fix to a fix: - Bluetooth: hci_event: use key encryption size when its known - tools: ynl-gen: allow multi-attr without nested-attributes again Current release - regressions: - locking fixes: - lock lower level devices when updating features - eth: bnxt_en: bring back rtnl_lock() in the bnxt_open() path - devmem: fix panic when Netlink socket closes after module unload Current release - new code bugs: - eth: txgbe: fixes for FW communication on new AML devices Previous releases - always broken: - sched: flush gso_skb list too during ->change(), avoid potential null-deref on reconfig - wifi: mt76: disable NAPI on driver removal - hv_netvsc: fix error 'nvsp_rndis_pkt_complete error status: 2'" * tag 'net-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (44 commits) net: devmem: fix kernel panic when netlink socket close after module unload tsnep: fix timestamping with a stacked DSA driver net/tls: fix kernel panic when alloc_page failed bnxt_en: bring back rtnl_lock() in the bnxt_open() path mlxsw: spectrum_router: Fix use-after-free when deleting GRE net devices wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request octeontx2-pf: Do not reallocate all ntuple filters wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl wifi: mt76: disable napi on driver removal Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer() hv_netvsc: Remove rmsg_pgcnt hv_netvsc: Preserve contiguous PFN grouping in the page buffer array hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges octeontx2-af: Fix CGX Receive counters net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability net: libwx: Fix FW mailbox unknown command net: libwx: Fix FW mailbox reply timeout net: txgbe: Fix to calculate EEPROM checksum for AML devices octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy ...
2 parents 088d132 + 0afc44d commit ef93565

File tree

64 files changed

+698
-361
lines changed

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

+698
-361
lines changed

Documentation/netlink/specs/tc.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,7 +2017,8 @@ attribute-sets:
20172017
attributes:
20182018
-
20192019
name: act
2020-
type: nest
2020+
type: indexed-array
2021+
sub-type: nest
20212022
nested-attributes: tc-act-attrs
20222023
-
20232024
name: police
@@ -2250,7 +2251,8 @@ attribute-sets:
22502251
attributes:
22512252
-
22522253
name: act
2253-
type: nest
2254+
type: indexed-array
2255+
sub-type: nest
22542256
nested-attributes: tc-act-attrs
22552257
-
22562258
name: police
@@ -2745,7 +2747,7 @@ attribute-sets:
27452747
type: u16
27462748
byte-order: big-endian
27472749
-
2748-
name: key-l2-tpv3-sid
2750+
name: key-l2tpv3-sid
27492751
type: u32
27502752
byte-order: big-endian
27512753
-
@@ -3504,7 +3506,7 @@ attribute-sets:
35043506
name: rate64
35053507
type: u64
35063508
-
3507-
name: prate4
3509+
name: prate64
35083510
type: u64
35093511
-
35103512
name: burst

Documentation/networking/timestamping.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,11 +811,9 @@ Documentation/devicetree/bindings/ptp/timestamper.txt for more details.
811811
3.2.4 Other caveats for MAC drivers
812812
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
813813

814-
Stacked PHCs, especially DSA (but not only) - since that doesn't require any
815-
modification to MAC drivers, so it is more difficult to ensure correctness of
816-
all possible code paths - is that they uncover bugs which were impossible to
817-
trigger before the existence of stacked PTP clocks. One example has to do with
818-
this line of code, already presented earlier::
814+
The use of stacked PHCs may uncover MAC driver bugs which were impossible to
815+
trigger without them. One example has to do with this line of code, already
816+
presented earlier::
819817

820818
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
821819

drivers/hv/channel.c

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,68 +1077,10 @@ int vmbus_sendpacket(struct vmbus_channel *channel, void *buffer,
10771077
EXPORT_SYMBOL(vmbus_sendpacket);
10781078

10791079
/*
1080-
* vmbus_sendpacket_pagebuffer - Send a range of single-page buffer
1081-
* packets using a GPADL Direct packet type. This interface allows you
1082-
* to control notifying the host. This will be useful for sending
1083-
* batched data. Also the sender can control the send flags
1084-
* explicitly.
1085-
*/
1086-
int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
1087-
struct hv_page_buffer pagebuffers[],
1088-
u32 pagecount, void *buffer, u32 bufferlen,
1089-
u64 requestid)
1090-
{
1091-
int i;
1092-
struct vmbus_channel_packet_page_buffer desc;
1093-
u32 descsize;
1094-
u32 packetlen;
1095-
u32 packetlen_aligned;
1096-
struct kvec bufferlist[3];
1097-
u64 aligned_data = 0;
1098-
1099-
if (pagecount > MAX_PAGE_BUFFER_COUNT)
1100-
return -EINVAL;
1101-
1102-
/*
1103-
* Adjust the size down since vmbus_channel_packet_page_buffer is the
1104-
* largest size we support
1105-
*/
1106-
descsize = sizeof(struct vmbus_channel_packet_page_buffer) -
1107-
((MAX_PAGE_BUFFER_COUNT - pagecount) *
1108-
sizeof(struct hv_page_buffer));
1109-
packetlen = descsize + bufferlen;
1110-
packetlen_aligned = ALIGN(packetlen, sizeof(u64));
1111-
1112-
/* Setup the descriptor */
1113-
desc.type = VM_PKT_DATA_USING_GPA_DIRECT;
1114-
desc.flags = VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED;
1115-
desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */
1116-
desc.length8 = (u16)(packetlen_aligned >> 3);
1117-
desc.transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
1118-
desc.reserved = 0;
1119-
desc.rangecount = pagecount;
1120-
1121-
for (i = 0; i < pagecount; i++) {
1122-
desc.range[i].len = pagebuffers[i].len;
1123-
desc.range[i].offset = pagebuffers[i].offset;
1124-
desc.range[i].pfn = pagebuffers[i].pfn;
1125-
}
1126-
1127-
bufferlist[0].iov_base = &desc;
1128-
bufferlist[0].iov_len = descsize;
1129-
bufferlist[1].iov_base = buffer;
1130-
bufferlist[1].iov_len = bufferlen;
1131-
bufferlist[2].iov_base = &aligned_data;
1132-
bufferlist[2].iov_len = (packetlen_aligned - packetlen);
1133-
1134-
return hv_ringbuffer_write(channel, bufferlist, 3, requestid, NULL);
1135-
}
1136-
EXPORT_SYMBOL_GPL(vmbus_sendpacket_pagebuffer);
1137-
1138-
/*
1139-
* vmbus_sendpacket_multipagebuffer - Send a multi-page buffer packet
1080+
* vmbus_sendpacket_mpb_desc - Send one or more multi-page buffer packets
11401081
* using a GPADL Direct packet type.
1141-
* The buffer includes the vmbus descriptor.
1082+
* The desc argument must include space for the VMBus descriptor. The
1083+
* rangecount field must already be set.
11421084
*/
11431085
int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
11441086
struct vmbus_packet_mpb_array *desc,
@@ -1160,7 +1102,6 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
11601102
desc->length8 = (u16)(packetlen_aligned >> 3);
11611103
desc->transactionid = VMBUS_RQST_ERROR; /* will be updated in hv_ringbuffer_write() */
11621104
desc->reserved = 0;
1163-
desc->rangecount = 1;
11641105

11651106
bufferlist[0].iov_base = desc;
11661107
bufferlist[0].iov_len = desc_size;

drivers/net/dsa/b53/b53_common.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,26 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
326326
}
327327
}
328328

329+
static void b53_set_eap_mode(struct b53_device *dev, int port, int mode)
330+
{
331+
u64 eap_conf;
332+
333+
if (is5325(dev) || is5365(dev) || dev->chip_id == BCM5389_DEVICE_ID)
334+
return;
335+
336+
b53_read64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), &eap_conf);
337+
338+
if (is63xx(dev)) {
339+
eap_conf &= ~EAP_MODE_MASK_63XX;
340+
eap_conf |= (u64)mode << EAP_MODE_SHIFT_63XX;
341+
} else {
342+
eap_conf &= ~EAP_MODE_MASK;
343+
eap_conf |= (u64)mode << EAP_MODE_SHIFT;
344+
}
345+
346+
b53_write64(dev, B53_EAP_PAGE, B53_PORT_EAP_CONF(port), eap_conf);
347+
}
348+
329349
static void b53_set_forwarding(struct b53_device *dev, int enable)
330350
{
331351
u8 mgmt;
@@ -586,6 +606,13 @@ int b53_setup_port(struct dsa_switch *ds, int port)
586606
b53_port_set_mcast_flood(dev, port, true);
587607
b53_port_set_learning(dev, port, false);
588608

609+
/* Force all traffic to go to the CPU port to prevent the ASIC from
610+
* trying to forward to bridged ports on matching FDB entries, then
611+
* dropping frames because it isn't allowed to forward there.
612+
*/
613+
if (dsa_is_user_port(ds, port))
614+
b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
615+
589616
return 0;
590617
}
591618
EXPORT_SYMBOL(b53_setup_port);
@@ -2042,6 +2069,9 @@ int b53_br_join(struct dsa_switch *ds, int port, struct dsa_bridge bridge,
20422069
pvlan |= BIT(i);
20432070
}
20442071

2072+
/* Disable redirection of unknown SA to the CPU port */
2073+
b53_set_eap_mode(dev, port, EAP_MODE_BASIC);
2074+
20452075
/* Configure the local port VLAN control membership to include
20462076
* remote ports and update the local port bitmask
20472077
*/
@@ -2077,6 +2107,9 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge)
20772107
pvlan &= ~BIT(i);
20782108
}
20792109

2110+
/* Enable redirection of unknown SA to the CPU port */
2111+
b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
2112+
20802113
b53_write16(dev, B53_PVLAN_PAGE, B53_PVLAN_PORT_MASK(port), pvlan);
20812114
dev->ports[port].vlan_ctl_mask = pvlan;
20822115

drivers/net/dsa/b53/b53_regs.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
/* Jumbo Frame Registers */
5151
#define B53_JUMBO_PAGE 0x40
5252

53+
/* EAP Registers */
54+
#define B53_EAP_PAGE 0x42
55+
5356
/* EEE Control Registers Page */
5457
#define B53_EEE_PAGE 0x92
5558

@@ -480,6 +483,17 @@
480483
#define JMS_MIN_SIZE 1518
481484
#define JMS_MAX_SIZE 9724
482485

486+
/*************************************************************************
487+
* EAP Page Registers
488+
*************************************************************************/
489+
#define B53_PORT_EAP_CONF(i) (0x20 + 8 * (i))
490+
#define EAP_MODE_SHIFT 51
491+
#define EAP_MODE_SHIFT_63XX 50
492+
#define EAP_MODE_MASK (0x3ull << EAP_MODE_SHIFT)
493+
#define EAP_MODE_MASK_63XX (0x3ull << EAP_MODE_SHIFT_63XX)
494+
#define EAP_MODE_BASIC 0
495+
#define EAP_MODE_SIMPLIFIED 3
496+
483497
/*************************************************************************
484498
* EEE Configuration Page Registers
485499
*************************************************************************/

0 commit comments

Comments
 (0)