You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
Merge tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Including fixes from bluetooth, bpf, can and netfilter.
A little larger than usual but it's all fixes, no late features. It's
large partially because of timing, and partially because of follow ups
to stuff that got merged a week or so before the merge window and
wasn't as widely tested. Maybe the Bluetooth fixes are a little
alarming so we'll address that, but the rest seems okay and not scary.
Notably we're including a fix for the netfilter Kconfig [1], your WiFi
warning [2] and a bluetooth fix which should unblock syzbot [3].
Current release - regressions:
- Bluetooth:
- don't try to cancel uninitialized works [3]
- L2CAP: fix use-after-free caused by l2cap_chan_put
- tls: rx: fix device offload after recent rework
- devlink: fix UAF on failed reload and leftover locks in mlxsw
Current release - new code bugs:
- netfilter:
- flowtable: fix incorrect Kconfig dependencies [1]
- nf_tables: fix crash when nf_trace is enabled
- bpf:
- use proper target btf when exporting attach_btf_obj_id
- arm64: fixes for bpf trampoline support
- Bluetooth:
- ISO: unlock on error path in iso_sock_setsockopt()
- ISO: fix info leak in iso_sock_getsockopt()
- ISO: fix iso_sock_getsockopt for BT_DEFER_SETUP
- ISO: fix memory corruption on iso_pinfo.base
- ISO: fix not using the correct QoS
- hci_conn: fix updating ISO QoS PHY
- phy: dp83867: fix get nvmem cell fail
Previous releases - regressions:
- wifi: cfg80211: fix validating BSS pointers in
__cfg80211_connect_result [2]
- atm: bring back zatm uAPI after ATM had been removed
- properly fix old bug making bonding ARP monitor mode not being able
to work with software devices with lockless Tx
- tap: fix null-deref on skb->dev in dev_parse_header_protocol
- revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP" it helps some
devices and breaks others
- netfilter:
- nf_tables: many fixes rejecting cross-object linking which may
lead to UAFs
- nf_tables: fix null deref due to zeroed list head
- nf_tables: validate variable length element extension
- bgmac: fix a BUG triggered by wrong bytes_compl
- bcmgenet: indicate MAC is in charge of PHY PM
Previous releases - always broken:
- bpf:
- fix bad pointer deref in bpf_sys_bpf() injected via test infra
- disallow non-builtin bpf programs calling the prog_run command
- don't reinit map value in prealloc_lru_pop
- fix UAFs during the read of map iterator fd
- fix invalidity check for values in sk local storage map
- reject sleepable program for non-resched map iterator
- mptcp:
- move subflow cleanup in mptcp_destroy_common()
- do not queue data on closed subflows
- virtio_net: fix memory leak inside XDP_TX with mergeable
- vsock: fix memory leak when multiple threads try to connect()
- rework sk_user_data sharing to prevent psock leaks
- geneve: fix TOS inheriting for ipv4
- tunnels & drivers: do not use RT_TOS for IPv6 flowlabel
- phy: c45 baset1: do not skip aneg configuration if clock role is
not specified
- rose: avoid overflow when /proc displays timer information
- x25: fix call timeouts in blocking connects
- can: mcp251x: fix race condition on receive interrupt
- can: j1939:
- replace user-reachable WARN_ON_ONCE() with netdev_warn_once()
- fix memory leak of skbs in j1939_session_destroy()
Misc:
- docs: bpf: clarify that many things are not uAPI
- seg6: initialize induction variable to first valid array index (to
silence clang vs objtool warning)
- can: ems_usb: fix clang 14's -Wunaligned-access warning"
* tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (117 commits)
net: atm: bring back zatm uAPI
dpaa2-eth: trace the allocated address instead of page struct
net: add missing kdoc for struct genl_multicast_group::flags
nfp: fix use-after-free in area_cache_get()
MAINTAINERS: use my korg address for mt7601u
mlxsw: minimal: Fix deadlock in ports creation
bonding: fix reference count leak in balance-alb mode
net: usb: qmi_wwan: Add support for Cinterion MV32
bpf: Shut up kern_sys_bpf warning.
net/tls: Use RCU API to access tls_ctx->netdev
tls: rx: device: don't try to copy too much on detach
tls: rx: device: bound the frag walk
net_sched: cls_route: remove from list when handle is 0
selftests: forwarding: Fix failing tests with old libnet
net: refactor bpf_sk_reuseport_detach()
net: fix refcount bug in sk_psock_get (2)
selftests/bpf: Ensure sleepable program is rejected by hash map iter
selftests/bpf: Add write tests for sk local storage map iterator
selftests/bpf: Add tests for reading a dangling map iter fd
bpf: Only allow sleepable program for resched-able iterator
...
This commit is contained in:
@@ -214,6 +214,12 @@ A: NO. Tracepoints are tied to internal implementation details hence they are
|
||||
subject to change and can break with newer kernels. BPF programs need to change
|
||||
accordingly when this happens.
|
||||
|
||||
Q: Are places where kprobes can attach part of the stable ABI?
|
||||
--------------------------------------------------------------
|
||||
A: NO. The places to which kprobes can attach are internal implementation
|
||||
details, which means that they are subject to change and can break with
|
||||
newer kernels. BPF programs need to change accordingly when this happens.
|
||||
|
||||
Q: How much stack space a BPF program uses?
|
||||
-------------------------------------------
|
||||
A: Currently all program types are limited to 512 bytes of stack
|
||||
@@ -273,3 +279,22 @@ cc (congestion-control) implementations. If any of these kernel
|
||||
functions has changed, both the in-tree and out-of-tree kernel tcp cc
|
||||
implementations have to be changed. The same goes for the bpf
|
||||
programs and they have to be adjusted accordingly.
|
||||
|
||||
Q: Attaching to arbitrary kernel functions is an ABI?
|
||||
-----------------------------------------------------
|
||||
Q: BPF programs can be attached to many kernel functions. Do these
|
||||
kernel functions become part of the ABI?
|
||||
|
||||
A: NO.
|
||||
|
||||
The kernel function prototypes will change, and BPF programs attaching to
|
||||
them will need to change. The BPF compile-once-run-everywhere (CO-RE)
|
||||
should be used in order to make it easier to adapt your BPF programs to
|
||||
different versions of the kernel.
|
||||
|
||||
Q: Marking a function with BTF_ID makes that function an ABI?
|
||||
-------------------------------------------------------------
|
||||
A: NO.
|
||||
|
||||
The BTF_ID macro does not cause a function to become part of the ABI
|
||||
any more than does the EXPORT_SYMBOL_GPL macro.
|
||||
|
||||
@@ -1982,15 +1982,6 @@ uses the response as an indication that the link is operating. This
|
||||
gives some assurance that traffic is actually flowing to and from one
|
||||
or more peers on the local network.
|
||||
|
||||
The ARP monitor relies on the device driver itself to verify
|
||||
that traffic is flowing. In particular, the driver must keep up to
|
||||
date the last receive time, dev->last_rx. Drivers that use NETIF_F_LLTX
|
||||
flag must also update netdev_queue->trans_start. If they do not, then the
|
||||
ARP monitor will immediately fail any slaves using that driver, and
|
||||
those slaves will stay down. If networking monitoring (tcpdump, etc)
|
||||
shows the ARP requests and replies on the network, then it may be that
|
||||
your device driver is not updating last_rx and trans_start.
|
||||
|
||||
7.2 Configuring Multiple ARP Targets
|
||||
------------------------------------
|
||||
|
||||
|
||||
@@ -9694,7 +9694,7 @@ F: arch/powerpc/platforms/powernv/copy-paste.h
|
||||
F: arch/powerpc/platforms/powernv/vas*
|
||||
|
||||
IBM Power Virtual Ethernet Device Driver
|
||||
M: Cristobal Forno <cforno12@linux.ibm.com>
|
||||
M: Nick Child <nnac123@linux.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
F: drivers/net/ethernet/ibm/ibmveth.*
|
||||
@@ -12843,7 +12843,7 @@ F: Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml
|
||||
F: drivers/net/wireless/mediatek/mt76/
|
||||
|
||||
MEDIATEK MT7601U WIRELESS LAN DRIVER
|
||||
M: Jakub Kicinski <kubakici@wp.pl>
|
||||
M: Jakub Kicinski <kuba@kernel.org>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/wireless/mediatek/mt7601u/
|
||||
|
||||
@@ -1496,7 +1496,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
ctx.prog = prog;
|
||||
|
||||
ctx.offset = kcalloc(prog->len + 1, sizeof(int), GFP_KERNEL);
|
||||
ctx.offset = kvcalloc(prog->len + 1, sizeof(int), GFP_KERNEL);
|
||||
if (ctx.offset == NULL) {
|
||||
prog = orig_prog;
|
||||
goto out_off;
|
||||
@@ -1601,7 +1601,7 @@ skip_init_ctx:
|
||||
ctx.offset[i] *= AARCH64_INSN_SIZE;
|
||||
bpf_prog_fill_jited_linfo(prog, ctx.offset + 1);
|
||||
out_off:
|
||||
kfree(ctx.offset);
|
||||
kvfree(ctx.offset);
|
||||
kfree(jit_data);
|
||||
prog->aux->jit_data = NULL;
|
||||
}
|
||||
@@ -1643,7 +1643,7 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,
|
||||
int args_off, int retval_off, int run_ctx_off,
|
||||
bool save_ret)
|
||||
{
|
||||
u32 *branch;
|
||||
__le32 *branch;
|
||||
u64 enter_prog;
|
||||
u64 exit_prog;
|
||||
struct bpf_prog *p = l->link.prog;
|
||||
@@ -1698,7 +1698,7 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,
|
||||
|
||||
if (ctx->image) {
|
||||
int offset = &ctx->image[ctx->idx] - branch;
|
||||
*branch = A64_CBZ(1, A64_R(0), offset);
|
||||
*branch = cpu_to_le32(A64_CBZ(1, A64_R(0), offset));
|
||||
}
|
||||
|
||||
/* arg1: prog */
|
||||
@@ -1713,7 +1713,7 @@ static void invoke_bpf_prog(struct jit_ctx *ctx, struct bpf_tramp_link *l,
|
||||
|
||||
static void invoke_bpf_mod_ret(struct jit_ctx *ctx, struct bpf_tramp_links *tl,
|
||||
int args_off, int retval_off, int run_ctx_off,
|
||||
u32 **branches)
|
||||
__le32 **branches)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1784,7 +1784,7 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
|
||||
struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT];
|
||||
struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN];
|
||||
bool save_ret;
|
||||
u32 **branches = NULL;
|
||||
__le32 **branches = NULL;
|
||||
|
||||
/* trampoline stack layout:
|
||||
* [ parent ip ]
|
||||
@@ -1892,7 +1892,7 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
|
||||
flags & BPF_TRAMP_F_RET_FENTRY_RET);
|
||||
|
||||
if (fmod_ret->nr_links) {
|
||||
branches = kcalloc(fmod_ret->nr_links, sizeof(u32 *),
|
||||
branches = kcalloc(fmod_ret->nr_links, sizeof(__le32 *),
|
||||
GFP_KERNEL);
|
||||
if (!branches)
|
||||
return -ENOMEM;
|
||||
@@ -1916,7 +1916,7 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
|
||||
/* update the branches saved in invoke_bpf_mod_ret with cbnz */
|
||||
for (i = 0; i < fmod_ret->nr_links && ctx->image != NULL; i++) {
|
||||
int offset = &ctx->image[ctx->idx] - branches[i];
|
||||
*branches[i] = A64_CBNZ(1, A64_R(10), offset);
|
||||
*branches[i] = cpu_to_le32(A64_CBNZ(1, A64_R(10), offset));
|
||||
}
|
||||
|
||||
for (i = 0; i < fexit->nr_links; i++)
|
||||
|
||||
@@ -3752,6 +3752,7 @@ static void __exit idt77252_exit(void)
|
||||
card = idt77252_chain;
|
||||
dev = card->atmdev;
|
||||
idt77252_chain = card->next;
|
||||
del_timer_sync(&card->tst_timer);
|
||||
|
||||
if (dev->phy->stop)
|
||||
dev->phy->stop(dev);
|
||||
|
||||
@@ -653,6 +653,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb,
|
||||
static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
|
||||
{
|
||||
struct slave *tx_slave = NULL;
|
||||
struct net_device *dev;
|
||||
struct arp_pkt *arp;
|
||||
|
||||
if (!pskb_network_may_pull(skb, sizeof(*arp)))
|
||||
@@ -665,6 +666,15 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
|
||||
if (!bond_slave_has_mac_rx(bond, arp->mac_src))
|
||||
return NULL;
|
||||
|
||||
dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
|
||||
if (dev) {
|
||||
if (netif_is_bridge_master(dev)) {
|
||||
dev_put(dev);
|
||||
return NULL;
|
||||
}
|
||||
dev_put(dev);
|
||||
}
|
||||
|
||||
if (arp->op_code == htons(ARPOP_REPLY)) {
|
||||
/* the arp must be sent on the selected rx channel */
|
||||
tx_slave = rlb_choose_channel(skb, bond, arp);
|
||||
|
||||
@@ -2001,6 +2001,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
|
||||
for (i = 0; i < BOND_MAX_ARP_TARGETS; i++)
|
||||
new_slave->target_last_arp_rx[i] = new_slave->last_rx;
|
||||
|
||||
new_slave->last_tx = new_slave->last_rx;
|
||||
|
||||
if (bond->params.miimon && !bond->params.use_carrier) {
|
||||
link_reporting = bond_check_dev_link(bond, slave_dev, 1);
|
||||
|
||||
@@ -2884,8 +2886,11 @@ static void bond_arp_send(struct slave *slave, int arp_op, __be32 dest_ip,
|
||||
return;
|
||||
}
|
||||
|
||||
if (bond_handle_vlan(slave, tags, skb))
|
||||
if (bond_handle_vlan(slave, tags, skb)) {
|
||||
slave_update_last_tx(slave);
|
||||
arp_xmit(skb);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3074,8 +3079,7 @@ static int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
|
||||
curr_active_slave->last_link_up))
|
||||
bond_validate_arp(bond, slave, tip, sip);
|
||||
else if (curr_arp_slave && (arp->ar_op == htons(ARPOP_REPLY)) &&
|
||||
bond_time_in_interval(bond,
|
||||
dev_trans_start(curr_arp_slave->dev), 1))
|
||||
bond_time_in_interval(bond, slave_last_tx(curr_arp_slave), 1))
|
||||
bond_validate_arp(bond, slave, sip, tip);
|
||||
|
||||
out_unlock:
|
||||
@@ -3103,8 +3107,10 @@ static void bond_ns_send(struct slave *slave, const struct in6_addr *daddr,
|
||||
}
|
||||
|
||||
addrconf_addr_solict_mult(daddr, &mcaddr);
|
||||
if (bond_handle_vlan(slave, tags, skb))
|
||||
if (bond_handle_vlan(slave, tags, skb)) {
|
||||
slave_update_last_tx(slave);
|
||||
ndisc_send_skb(skb, &mcaddr, saddr);
|
||||
}
|
||||
}
|
||||
|
||||
static void bond_ns_send_all(struct bonding *bond, struct slave *slave)
|
||||
@@ -3246,8 +3252,7 @@ static int bond_na_rcv(const struct sk_buff *skb, struct bonding *bond,
|
||||
curr_active_slave->last_link_up))
|
||||
bond_validate_ns(bond, slave, saddr, daddr);
|
||||
else if (curr_arp_slave &&
|
||||
bond_time_in_interval(bond,
|
||||
dev_trans_start(curr_arp_slave->dev), 1))
|
||||
bond_time_in_interval(bond, slave_last_tx(curr_arp_slave), 1))
|
||||
bond_validate_ns(bond, slave, saddr, daddr);
|
||||
|
||||
out:
|
||||
@@ -3335,12 +3340,12 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
|
||||
* so it can wait
|
||||
*/
|
||||
bond_for_each_slave_rcu(bond, slave, iter) {
|
||||
unsigned long trans_start = dev_trans_start(slave->dev);
|
||||
unsigned long last_tx = slave_last_tx(slave);
|
||||
|
||||
bond_propose_link_state(slave, BOND_LINK_NOCHANGE);
|
||||
|
||||
if (slave->link != BOND_LINK_UP) {
|
||||
if (bond_time_in_interval(bond, trans_start, 1) &&
|
||||
if (bond_time_in_interval(bond, last_tx, 1) &&
|
||||
bond_time_in_interval(bond, slave->last_rx, 1)) {
|
||||
|
||||
bond_propose_link_state(slave, BOND_LINK_UP);
|
||||
@@ -3365,7 +3370,7 @@ static void bond_loadbalance_arp_mon(struct bonding *bond)
|
||||
* when the source ip is 0, so don't take the link down
|
||||
* if we don't know our ip yet
|
||||
*/
|
||||
if (!bond_time_in_interval(bond, trans_start, bond->params.missed_max) ||
|
||||
if (!bond_time_in_interval(bond, last_tx, bond->params.missed_max) ||
|
||||
!bond_time_in_interval(bond, slave->last_rx, bond->params.missed_max)) {
|
||||
|
||||
bond_propose_link_state(slave, BOND_LINK_DOWN);
|
||||
@@ -3431,7 +3436,7 @@ re_arm:
|
||||
*/
|
||||
static int bond_ab_arp_inspect(struct bonding *bond)
|
||||
{
|
||||
unsigned long trans_start, last_rx;
|
||||
unsigned long last_tx, last_rx;
|
||||
struct list_head *iter;
|
||||
struct slave *slave;
|
||||
int commit = 0;
|
||||
@@ -3482,9 +3487,9 @@ static int bond_ab_arp_inspect(struct bonding *bond)
|
||||
* - (more than missed_max*delta since receive AND
|
||||
* the bond has an IP address)
|
||||
*/
|
||||
trans_start = dev_trans_start(slave->dev);
|
||||
last_tx = slave_last_tx(slave);
|
||||
if (bond_is_active_slave(slave) &&
|
||||
(!bond_time_in_interval(bond, trans_start, bond->params.missed_max) ||
|
||||
(!bond_time_in_interval(bond, last_tx, bond->params.missed_max) ||
|
||||
!bond_time_in_interval(bond, last_rx, bond->params.missed_max))) {
|
||||
bond_propose_link_state(slave, BOND_LINK_DOWN);
|
||||
commit++;
|
||||
@@ -3501,8 +3506,8 @@ static int bond_ab_arp_inspect(struct bonding *bond)
|
||||
*/
|
||||
static void bond_ab_arp_commit(struct bonding *bond)
|
||||
{
|
||||
unsigned long trans_start;
|
||||
struct list_head *iter;
|
||||
unsigned long last_tx;
|
||||
struct slave *slave;
|
||||
|
||||
bond_for_each_slave(bond, slave, iter) {
|
||||
@@ -3511,10 +3516,10 @@ static void bond_ab_arp_commit(struct bonding *bond)
|
||||
continue;
|
||||
|
||||
case BOND_LINK_UP:
|
||||
trans_start = dev_trans_start(slave->dev);
|
||||
last_tx = slave_last_tx(slave);
|
||||
if (rtnl_dereference(bond->curr_active_slave) != slave ||
|
||||
(!rtnl_dereference(bond->curr_active_slave) &&
|
||||
bond_time_in_interval(bond, trans_start, 1))) {
|
||||
bond_time_in_interval(bond, last_tx, 1))) {
|
||||
struct slave *current_arp_slave;
|
||||
|
||||
current_arp_slave = rtnl_dereference(bond->current_arp_slave);
|
||||
@@ -5333,8 +5338,14 @@ static struct net_device *bond_sk_get_lower_dev(struct net_device *dev,
|
||||
static netdev_tx_t bond_tls_device_xmit(struct bonding *bond, struct sk_buff *skb,
|
||||
struct net_device *dev)
|
||||
{
|
||||
if (likely(bond_get_slave_by_dev(bond, tls_get_ctx(skb->sk)->netdev)))
|
||||
return bond_dev_queue_xmit(bond, skb, tls_get_ctx(skb->sk)->netdev);
|
||||
struct net_device *tls_netdev = rcu_dereference(tls_get_ctx(skb->sk)->netdev);
|
||||
|
||||
/* tls_netdev might become NULL, even if tls_is_sk_tx_device_offloaded
|
||||
* was true, if tls_device_down is running in parallel, but it's OK,
|
||||
* because bond_get_slave_by_dev has a NULL check.
|
||||
*/
|
||||
if (likely(bond_get_slave_by_dev(bond, tls_netdev)))
|
||||
return bond_dev_queue_xmit(bond, skb, tls_netdev);
|
||||
return bond_tx_drop(dev, skb);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1070,9 +1070,6 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||
|
||||
mcp251x_read_2regs(spi, CANINTF, &intf, &eflag);
|
||||
|
||||
/* mask out flags we don't care about */
|
||||
intf &= CANINTF_RX | CANINTF_TX | CANINTF_ERR;
|
||||
|
||||
/* receive buffer 0 */
|
||||
if (intf & CANINTF_RX0IF) {
|
||||
mcp251x_hw_rx(spi, 0);
|
||||
@@ -1082,6 +1079,18 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||
if (mcp251x_is_2510(spi))
|
||||
mcp251x_write_bits(spi, CANINTF,
|
||||
CANINTF_RX0IF, 0x00);
|
||||
|
||||
/* check if buffer 1 is already known to be full, no need to re-read */
|
||||
if (!(intf & CANINTF_RX1IF)) {
|
||||
u8 intf1, eflag1;
|
||||
|
||||
/* intf needs to be read again to avoid a race condition */
|
||||
mcp251x_read_2regs(spi, CANINTF, &intf1, &eflag1);
|
||||
|
||||
/* combine flags from both operations for error handling */
|
||||
intf |= intf1;
|
||||
eflag |= eflag1;
|
||||
}
|
||||
}
|
||||
|
||||
/* receive buffer 1 */
|
||||
@@ -1092,6 +1101,9 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||
clear_intf |= CANINTF_RX1IF;
|
||||
}
|
||||
|
||||
/* mask out flags we don't care about */
|
||||
intf &= CANINTF_RX | CANINTF_TX | CANINTF_ERR;
|
||||
|
||||
/* any error or tx interrupt we need to clear? */
|
||||
if (intf & (CANINTF_ERR | CANINTF_TX))
|
||||
clear_intf |= intf & (CANINTF_ERR | CANINTF_TX);
|
||||
|
||||
@@ -195,7 +195,7 @@ struct __packed ems_cpc_msg {
|
||||
__le32 ts_sec; /* timestamp in seconds */
|
||||
__le32 ts_nsec; /* timestamp in nano seconds */
|
||||
|
||||
union {
|
||||
union __packed {
|
||||
u8 generic[64];
|
||||
struct cpc_can_msg can_msg;
|
||||
struct cpc_can_params can_params;
|
||||
|
||||
@@ -610,6 +610,9 @@ static int felix_change_tag_protocol(struct dsa_switch *ds,
|
||||
|
||||
old_proto_ops = felix->tag_proto_ops;
|
||||
|
||||
if (proto_ops == old_proto_ops)
|
||||
return 0;
|
||||
|
||||
err = proto_ops->setup(ds);
|
||||
if (err)
|
||||
goto setup_failed;
|
||||
|
||||
@@ -1137,6 +1137,7 @@ static void vsc9959_tas_min_gate_lengths(struct tc_taprio_qopt_offload *taprio,
|
||||
{
|
||||
struct tc_taprio_sched_entry *entry;
|
||||
u64 gate_len[OCELOT_NUM_TC];
|
||||
u8 gates_ever_opened = 0;
|
||||
int tc, i, n;
|
||||
|
||||
/* Initialize arrays */
|
||||
@@ -1164,16 +1165,28 @@ static void vsc9959_tas_min_gate_lengths(struct tc_taprio_qopt_offload *taprio,
|
||||
for (tc = 0; tc < OCELOT_NUM_TC; tc++) {
|
||||
if (entry->gate_mask & BIT(tc)) {
|
||||
gate_len[tc] += entry->interval;
|
||||
gates_ever_opened |= BIT(tc);
|
||||
} else {
|
||||
/* Gate closes now, record a potential new
|
||||
* minimum and reinitialize length
|
||||
*/
|
||||
if (min_gate_len[tc] > gate_len[tc])
|
||||
if (min_gate_len[tc] > gate_len[tc] &&
|
||||
gate_len[tc])
|
||||
min_gate_len[tc] = gate_len[tc];
|
||||
gate_len[tc] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* min_gate_len[tc] actually tracks minimum *open* gate time, so for
|
||||
* permanently closed gates, min_gate_len[tc] will still be U64_MAX.
|
||||
* Therefore they are currently indistinguishable from permanently
|
||||
* open gates. Overwrite the gate len with 0 when we know they're
|
||||
* actually permanently closed, i.e. after the loop above.
|
||||
*/
|
||||
for (tc = 0; tc < OCELOT_NUM_TC; tc++)
|
||||
if (!(gates_ever_opened & BIT(tc)))
|
||||
min_gate_len[tc] = 0;
|
||||
}
|
||||
|
||||
/* Update QSYS_PORT_MAX_SDU to make sure the static guard bands added by the
|
||||
|
||||
@@ -265,12 +265,10 @@ static void aq_nic_service_timer_cb(struct timer_list *t)
|
||||
static void aq_nic_polling_timer_cb(struct timer_list *t)
|
||||
{
|
||||
struct aq_nic_s *self = from_timer(self, t, polling_timer);
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
unsigned int i = 0U;
|
||||
|
||||
for (i = 0U, aq_vec = self->aq_vec[0];
|
||||
self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
|
||||
aq_vec_isr(i, (void *)aq_vec);
|
||||
for (i = 0U; self->aq_vecs > i; ++i)
|
||||
aq_vec_isr(i, (void *)self->aq_vec[i]);
|
||||
|
||||
mod_timer(&self->polling_timer, jiffies +
|
||||
AQ_CFG_POLLING_TIMER_INTERVAL);
|
||||
@@ -1014,7 +1012,6 @@ int aq_nic_get_regs_count(struct aq_nic_s *self)
|
||||
|
||||
u64 *aq_nic_get_stats(struct aq_nic_s *self, u64 *data)
|
||||
{
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
struct aq_stats_s *stats;
|
||||
unsigned int count = 0U;
|
||||
unsigned int i = 0U;
|
||||
@@ -1064,11 +1061,11 @@ u64 *aq_nic_get_stats(struct aq_nic_s *self, u64 *data)
|
||||
data += i;
|
||||
|
||||
for (tc = 0U; tc < self->aq_nic_cfg.tcs; tc++) {
|
||||
for (i = 0U, aq_vec = self->aq_vec[0];
|
||||
aq_vec && self->aq_vecs > i;
|
||||
++i, aq_vec = self->aq_vec[i]) {
|
||||
for (i = 0U; self->aq_vecs > i; ++i) {
|
||||
if (!self->aq_vec[i])
|
||||
break;
|
||||
data += count;
|
||||
count = aq_vec_get_sw_stats(aq_vec, tc, data);
|
||||
count = aq_vec_get_sw_stats(self->aq_vec[i], tc, data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1382,7 +1379,6 @@ int aq_nic_set_loopback(struct aq_nic_s *self)
|
||||
|
||||
int aq_nic_stop(struct aq_nic_s *self)
|
||||
{
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
unsigned int i = 0U;
|
||||
|
||||
netif_tx_disable(self->ndev);
|
||||
@@ -1400,9 +1396,8 @@ int aq_nic_stop(struct aq_nic_s *self)
|
||||
|
||||
aq_ptp_irq_free(self);
|
||||
|
||||
for (i = 0U, aq_vec = self->aq_vec[0];
|
||||
self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
|
||||
aq_vec_stop(aq_vec);
|
||||
for (i = 0U; self->aq_vecs > i; ++i)
|
||||
aq_vec_stop(self->aq_vec[i]);
|
||||
|
||||
aq_ptp_ring_stop(self);
|
||||
|
||||
|
||||
@@ -189,8 +189,8 @@ static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac,
|
||||
}
|
||||
|
||||
slot->skb = skb;
|
||||
ring->end += nr_frags + 1;
|
||||
netdev_sent_queue(net_dev, skb->len);
|
||||
ring->end += nr_frags + 1;
|
||||
|
||||
wmb();
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "bnxt_ptp.h"
|
||||
#include "bnxt_coredump.h"
|
||||
#include "bnxt_nvm_defs.h"
|
||||
#include "bnxt_ethtool.h"
|
||||
|
||||
static void __bnxt_fw_recover(struct bnxt *bp)
|
||||
{
|
||||
|
||||
@@ -393,6 +393,9 @@ int bcmgenet_mii_probe(struct net_device *dev)
|
||||
if (priv->internal_phy && !GENET_IS_V5(priv))
|
||||
dev->phydev->irq = PHY_MAC_INTERRUPT;
|
||||
|
||||
/* Indicate that the MAC is responsible for PHY PM */
|
||||
dev->phydev->mac_managed_pm = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1932,6 +1932,7 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
int data_len, qidx, ret = 0, mss;
|
||||
struct tls_record_info *record;
|
||||
struct chcr_ktls_info *tx_info;
|
||||
struct net_device *tls_netdev;
|
||||
struct tls_context *tls_ctx;
|
||||
struct sge_eth_txq *q;
|
||||
struct adapter *adap;
|
||||
@@ -1945,7 +1946,12 @@ static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
mss = skb_is_gso(skb) ? skb_shinfo(skb)->gso_size : data_len;
|
||||
|
||||
tls_ctx = tls_get_ctx(skb->sk);
|
||||
if (unlikely(tls_ctx->netdev != dev))
|
||||
tls_netdev = rcu_dereference_bh(tls_ctx->netdev);
|
||||
/* Don't quit on NULL: if tls_device_down is running in parallel,
|
||||
* netdev might become NULL, even if tls_is_sk_tx_device_offloaded was
|
||||
* true. Rather continue processing this packet.
|
||||
*/
|
||||
if (unlikely(tls_netdev && tls_netdev != dev))
|
||||
goto out;
|
||||
|
||||
tx_ctx = chcr_get_ktls_tx_context(tls_ctx);
|
||||
|
||||
@@ -340,14 +340,14 @@ static int tsnep_tx_map(struct sk_buff *skb, struct tsnep_tx *tx, int count)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void tsnep_tx_unmap(struct tsnep_tx *tx, int count)
|
||||
static void tsnep_tx_unmap(struct tsnep_tx *tx, int index, int count)
|
||||
{
|
||||
struct device *dmadev = tx->adapter->dmadev;
|
||||
struct tsnep_tx_entry *entry;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
entry = &tx->entry[(tx->read + i) % TSNEP_RING_SIZE];
|
||||
entry = &tx->entry[(index + i) % TSNEP_RING_SIZE];
|
||||
|
||||
if (entry->len) {
|
||||
if (i == 0)
|
||||
@@ -395,7 +395,7 @@ static netdev_tx_t tsnep_xmit_frame_ring(struct sk_buff *skb,
|
||||
|
||||
retval = tsnep_tx_map(skb, tx, count);
|
||||
if (retval != 0) {
|
||||
tsnep_tx_unmap(tx, count);
|
||||
tsnep_tx_unmap(tx, tx->write, count);
|
||||
dev_kfree_skb_any(entry->skb);
|
||||
entry->skb = NULL;
|
||||
|
||||
@@ -464,7 +464,7 @@ static bool tsnep_tx_poll(struct tsnep_tx *tx, int napi_budget)
|
||||
if (skb_shinfo(entry->skb)->nr_frags > 0)
|
||||
count += skb_shinfo(entry->skb)->nr_frags;
|
||||
|
||||
tsnep_tx_unmap(tx, count);
|
||||
tsnep_tx_unmap(tx, tx->read, count);
|
||||
|
||||
if ((skb_shinfo(entry->skb)->tx_flags & SKBTX_IN_PROGRESS) &&
|
||||
(__le32_to_cpu(entry->desc_wb->properties) &
|
||||
@@ -1282,7 +1282,7 @@ MODULE_DEVICE_TABLE(of, tsnep_of_match);
|
||||
static struct platform_driver tsnep_driver = {
|
||||
.driver = {
|
||||
.name = TSNEP,
|
||||
.of_match_table = of_match_ptr(tsnep_of_match),
|
||||
.of_match_table = tsnep_of_match,
|
||||
},
|
||||
.probe = tsnep_probe,
|
||||
.remove = tsnep_remove,
|
||||
|
||||
@@ -1660,8 +1660,8 @@ static int dpaa2_eth_add_bufs(struct dpaa2_eth_priv *priv,
|
||||
buf_array[i] = addr;
|
||||
|
||||
/* tracing point */
|
||||
trace_dpaa2_eth_buf_seed(priv->net_dev,
|
||||
page, DPAA2_ETH_RX_BUF_RAW_SIZE,
|
||||
trace_dpaa2_eth_buf_seed(priv->net_dev, page_address(page),
|
||||
DPAA2_ETH_RX_BUF_RAW_SIZE,
|
||||
addr, priv->rx_buf_size,
|
||||
bpid);
|
||||
}
|
||||
|
||||
@@ -2580,6 +2580,12 @@ static void __rvu_flr_handler(struct rvu *rvu, u16 pcifunc)
|
||||
rvu_blklf_teardown(rvu, pcifunc, BLKADDR_NPA);
|
||||
rvu_reset_lmt_map_tbl(rvu, pcifunc);
|
||||
rvu_detach_rsrcs(rvu, NULL, pcifunc);
|
||||
/* In scenarios where PF/VF drivers detach NIXLF without freeing MCAM
|
||||
* entries, check and free the MCAM entries explicitly to avoid leak.
|
||||
* Since LF is detached use LF number as -1.
|
||||
*/
|
||||
rvu_npc_free_mcam_entries(rvu, pcifunc, -1);
|
||||
|
||||
mutex_unlock(&rvu->flr_lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -1097,6 +1097,9 @@ static void npc_enadis_default_entries(struct rvu *rvu, u16 pcifunc,
|
||||
|
||||
void rvu_npc_disable_default_entries(struct rvu *rvu, u16 pcifunc, int nixlf)
|
||||
{
|
||||
if (nixlf < 0)
|
||||
return;
|
||||
|
||||
npc_enadis_default_entries(rvu, pcifunc, nixlf, false);
|
||||
|
||||
/* Delete multicast and promisc MCAM entries */
|
||||
@@ -1136,6 +1139,9 @@ bool rvu_npc_enable_mcam_by_entry_index(struct rvu *rvu, int entry, int intf, bo
|
||||
|
||||
void rvu_npc_enable_default_entries(struct rvu *rvu, u16 pcifunc, int nixlf)
|
||||
{
|
||||
if (nixlf < 0)
|
||||
return;
|
||||
|
||||
/* Enables only broadcast match entry. Promisc/Allmulti are enabled
|
||||
* in set_rx_mode mbox handler.
|
||||
*/
|
||||
@@ -1675,7 +1681,7 @@ static void npc_load_kpu_profile(struct rvu *rvu)
|
||||
* Firmware database method.
|
||||
* Default KPU profile.
|
||||
*/
|
||||
if (!request_firmware(&fw, kpu_profile, rvu->dev)) {
|
||||
if (!request_firmware_direct(&fw, kpu_profile, rvu->dev)) {
|
||||
dev_info(rvu->dev, "Loading KPU profile from firmware: %s\n",
|
||||
kpu_profile);
|
||||
rvu->kpu_fwdata = kzalloc(fw->size, GFP_KERNEL);
|
||||
@@ -1939,6 +1945,7 @@ static void rvu_npc_hw_init(struct rvu *rvu, int blkaddr)
|
||||
|
||||
static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
|
||||
{
|
||||
struct npc_mcam_kex *mkex = rvu->kpu.mkex;
|
||||
struct npc_mcam *mcam = &rvu->hw->mcam;
|
||||
struct rvu_hwinfo *hw = rvu->hw;
|
||||
u64 nibble_ena, rx_kex, tx_kex;
|
||||
@@ -1951,15 +1958,15 @@ static void rvu_npc_setup_interfaces(struct rvu *rvu, int blkaddr)
|
||||
mcam->counters.max--;
|
||||
mcam->rx_miss_act_cntr = mcam->counters.max;
|
||||
|
||||
rx_kex = npc_mkex_default.keyx_cfg[NIX_INTF_RX];
|
||||
tx_kex = npc_mkex_default.keyx_cfg[NIX_INTF_TX];
|
||||
rx_kex = mkex->keyx_cfg[NIX_INTF_RX];
|
||||
tx_kex = mkex->keyx_cfg[NIX_INTF_TX];
|
||||
nibble_ena = FIELD_GET(NPC_PARSE_NIBBLE, rx_kex);
|
||||
|
||||
nibble_ena = rvu_npc_get_tx_nibble_cfg(rvu, nibble_ena);
|
||||
if (nibble_ena) {
|
||||
tx_kex &= ~NPC_PARSE_NIBBLE;
|
||||
tx_kex |= FIELD_PREP(NPC_PARSE_NIBBLE, nibble_ena);
|
||||
npc_mkex_default.keyx_cfg[NIX_INTF_TX] = tx_kex;
|
||||
mkex->keyx_cfg[NIX_INTF_TX] = tx_kex;
|
||||
}
|
||||
|
||||
/* Configure RX interfaces */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user