Skip to content

Commit 150b567

Browse files
committed
Merge tag 'net-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth, netfilter and wireless. Current release - fix to a fix: - rtnetlink: fix error code in rtnl_newlink() - tipc: fix NULL deref in cleanup_bearer() Current release - regressions: - ip: fix warning about invalid return from in ip_route_input_rcu() Current release - new code bugs: - udp: fix L4 hash after reconnect - eth: lan969x: fix cyclic dependency between modules - eth: bnxt_en: fix potential crash when dumping FW log coredump Previous releases - regressions: - wifi: mac80211: - fix a queue stall in certain cases of channel switch - wake the queues in case of failure in resume - splice: do not checksum AF_UNIX sockets - virtio_net: fix BUG()s in BQL support due to incorrect accounting of purged packets during interface stop - eth: - stmmac: fix TSO DMA API mis-usage causing oops - bnxt_en: fixes for HW GRO: GSO type on 5750X chips and oops due to incorrect aggregation ID mask on 5760X chips Previous releases - always broken: - Bluetooth: improve setsockopt() handling of malformed user input - eth: ocelot: fix PTP timestamping in presence of packet loss - ptp: kvm: x86: avoid "fail to initialize ptp_kvm" when simply not supported" * tag 'net-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (81 commits) net: dsa: tag_ocelot_8021q: fix broken reception net: dsa: microchip: KSZ9896 register regmap alignment to 32 bit boundaries net: renesas: rswitch: fix initial MPIC register setting Bluetooth: btmtk: avoid UAF in btmtk_process_coredump Bluetooth: iso: Fix circular lock in iso_conn_big_sync Bluetooth: iso: Fix circular lock in iso_listen_bis Bluetooth: SCO: Add support for 16 bits transparent voice setting Bluetooth: iso: Fix recursive locking warning Bluetooth: iso: Always release hdev at the end of iso_listen_bis Bluetooth: hci_event: Fix using rcu_read_(un)lock while iterating Bluetooth: hci_core: Fix sleeping function called from invalid context team: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL team: Fix initial vlan_feature set in __team_compute_features bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL bonding: Fix initial {vlan,mpls}_feature set in bond_compute_features net, team, bonding: Add netdev_base_features helper net/sched: netem: account for backlog updates from child qdisc net: dsa: felix: fix stuck CPU-injected packets with short taprio windows splice: do not checksum AF_UNIX sockets net: usb: qmi_wwan: add Telit FE910C04 compositions ...
2 parents 231825b + ad913df commit 150b567

Some content is hidden

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

85 files changed

+852
-578
lines changed

Diff for: Documentation/networking/ip-sysctl.rst

+6
Original file line numberDiff line numberDiff line change
@@ -2170,6 +2170,12 @@ nexthop_compat_mode - BOOLEAN
21702170
understands the new API, this sysctl can be disabled to achieve full
21712171
performance benefits of the new API by disabling the nexthop expansion
21722172
and extraneous notifications.
2173+
2174+
Note that as a backward-compatible mode, dumping of modern features
2175+
might be incomplete or wrong. For example, resilient groups will not be
2176+
shown as such, but rather as just a list of next hops. Also weights that
2177+
do not fit into 8 bits will show incorrectly.
2178+
21732179
Default: true (backward compat mode)
21742180

21752181
fib_notify_on_flag_change - INTEGER

Diff for: MAINTAINERS

+3-1
Original file line numberDiff line numberDiff line change
@@ -15345,7 +15345,7 @@ M: Daniel Machon <[email protected]>
1534515345
1534615346
1534715347
S: Maintained
15348-
F: drivers/net/ethernet/microchip/lan969x/*
15348+
F: drivers/net/ethernet/microchip/sparx5/lan969x/*
1534915349

1535015350
MICROCHIP LCDFB DRIVER
1535115351
M: Nicolas Ferre <[email protected]>
@@ -16337,6 +16337,7 @@ F: Documentation/networking/
1633716337
F: Documentation/networking/net_cachelines/
1633816338
F: Documentation/process/maintainer-netdev.rst
1633916339
F: Documentation/userspace-api/netlink/
16340+
F: include/linux/ethtool.h
1634016341
F: include/linux/framer/framer-provider.h
1634116342
F: include/linux/framer/framer.h
1634216343
F: include/linux/in.h
@@ -16351,6 +16352,7 @@ F: include/linux/rtnetlink.h
1635116352
F: include/linux/seq_file_net.h
1635216353
F: include/linux/skbuff*
1635316354
F: include/net/
16355+
F: include/uapi/linux/ethtool.h
1635416356
F: include/uapi/linux/genetlink.h
1635516357
F: include/uapi/linux/hsr_netlink.h
1635616358
F: include/uapi/linux/in.h

Diff for: drivers/bluetooth/btmtk.c

+12-8
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
395395
{
396396
struct btmtk_data *data = hci_get_priv(hdev);
397397
int err;
398+
bool complete = false;
398399

399400
if (!IS_ENABLED(CONFIG_DEV_COREDUMP)) {
400401
kfree_skb(skb);
@@ -416,19 +417,22 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
416417
fallthrough;
417418
case HCI_DEVCOREDUMP_ACTIVE:
418419
default:
420+
/* Mediatek coredump data would be more than MTK_COREDUMP_NUM */
421+
if (data->cd_info.cnt >= MTK_COREDUMP_NUM &&
422+
skb->len > MTK_COREDUMP_END_LEN)
423+
if (!memcmp((char *)&skb->data[skb->len - MTK_COREDUMP_END_LEN],
424+
MTK_COREDUMP_END, MTK_COREDUMP_END_LEN - 1))
425+
complete = true;
426+
419427
err = hci_devcd_append(hdev, skb);
420428
if (err < 0)
421429
break;
422430
data->cd_info.cnt++;
423431

424-
/* Mediatek coredump data would be more than MTK_COREDUMP_NUM */
425-
if (data->cd_info.cnt > MTK_COREDUMP_NUM &&
426-
skb->len > MTK_COREDUMP_END_LEN)
427-
if (!memcmp((char *)&skb->data[skb->len - MTK_COREDUMP_END_LEN],
428-
MTK_COREDUMP_END, MTK_COREDUMP_END_LEN - 1)) {
429-
bt_dev_info(hdev, "Mediatek coredump end");
430-
hci_devcd_complete(hdev);
431-
}
432+
if (complete) {
433+
bt_dev_info(hdev, "Mediatek coredump end");
434+
hci_devcd_complete(hdev);
435+
}
432436

433437
break;
434438
}

Diff for: drivers/net/bonding/bond_main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -1520,9 +1520,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
15201520
struct slave *slave;
15211521

15221522
mask = features;
1523-
1524-
features &= ~NETIF_F_ONE_FOR_ALL;
1525-
features |= NETIF_F_ALL_FOR_ALL;
1523+
features = netdev_base_features(features);
15261524

15271525
bond_for_each_slave(bond, slave, iter) {
15281526
features = netdev_increment_features(features,
@@ -1536,6 +1534,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
15361534

15371535
#define BOND_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
15381536
NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \
1537+
NETIF_F_GSO_ENCAP_ALL | \
15391538
NETIF_F_HIGHDMA | NETIF_F_LRO)
15401539

15411540
#define BOND_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
@@ -1565,8 +1564,9 @@ static void bond_compute_features(struct bonding *bond)
15651564

15661565
if (!bond_has_slaves(bond))
15671566
goto done;
1568-
vlan_features &= NETIF_F_ALL_FOR_ALL;
1569-
mpls_features &= NETIF_F_ALL_FOR_ALL;
1567+
1568+
vlan_features = netdev_base_features(vlan_features);
1569+
mpls_features = netdev_base_features(mpls_features);
15701570

15711571
bond_for_each_slave(bond, slave, iter) {
15721572
vlan_features = netdev_increment_features(vlan_features,

Diff for: drivers/net/dsa/microchip/ksz_common.c

+18-24
Original file line numberDiff line numberDiff line change
@@ -1100,10 +1100,9 @@ static const struct regmap_range ksz9896_valid_regs[] = {
11001100
regmap_reg_range(0x1030, 0x1030),
11011101
regmap_reg_range(0x1100, 0x1115),
11021102
regmap_reg_range(0x111a, 0x111f),
1103-
regmap_reg_range(0x1122, 0x1127),
1104-
regmap_reg_range(0x112a, 0x112b),
1105-
regmap_reg_range(0x1136, 0x1139),
1106-
regmap_reg_range(0x113e, 0x113f),
1103+
regmap_reg_range(0x1120, 0x112b),
1104+
regmap_reg_range(0x1134, 0x113b),
1105+
regmap_reg_range(0x113c, 0x113f),
11071106
regmap_reg_range(0x1400, 0x1401),
11081107
regmap_reg_range(0x1403, 0x1403),
11091108
regmap_reg_range(0x1410, 0x1417),
@@ -1130,10 +1129,9 @@ static const struct regmap_range ksz9896_valid_regs[] = {
11301129
regmap_reg_range(0x2030, 0x2030),
11311130
regmap_reg_range(0x2100, 0x2115),
11321131
regmap_reg_range(0x211a, 0x211f),
1133-
regmap_reg_range(0x2122, 0x2127),
1134-
regmap_reg_range(0x212a, 0x212b),
1135-
regmap_reg_range(0x2136, 0x2139),
1136-
regmap_reg_range(0x213e, 0x213f),
1132+
regmap_reg_range(0x2120, 0x212b),
1133+
regmap_reg_range(0x2134, 0x213b),
1134+
regmap_reg_range(0x213c, 0x213f),
11371135
regmap_reg_range(0x2400, 0x2401),
11381136
regmap_reg_range(0x2403, 0x2403),
11391137
regmap_reg_range(0x2410, 0x2417),
@@ -1160,10 +1158,9 @@ static const struct regmap_range ksz9896_valid_regs[] = {
11601158
regmap_reg_range(0x3030, 0x3030),
11611159
regmap_reg_range(0x3100, 0x3115),
11621160
regmap_reg_range(0x311a, 0x311f),
1163-
regmap_reg_range(0x3122, 0x3127),
1164-
regmap_reg_range(0x312a, 0x312b),
1165-
regmap_reg_range(0x3136, 0x3139),
1166-
regmap_reg_range(0x313e, 0x313f),
1161+
regmap_reg_range(0x3120, 0x312b),
1162+
regmap_reg_range(0x3134, 0x313b),
1163+
regmap_reg_range(0x313c, 0x313f),
11671164
regmap_reg_range(0x3400, 0x3401),
11681165
regmap_reg_range(0x3403, 0x3403),
11691166
regmap_reg_range(0x3410, 0x3417),
@@ -1190,10 +1187,9 @@ static const struct regmap_range ksz9896_valid_regs[] = {
11901187
regmap_reg_range(0x4030, 0x4030),
11911188
regmap_reg_range(0x4100, 0x4115),
11921189
regmap_reg_range(0x411a, 0x411f),
1193-
regmap_reg_range(0x4122, 0x4127),
1194-
regmap_reg_range(0x412a, 0x412b),
1195-
regmap_reg_range(0x4136, 0x4139),
1196-
regmap_reg_range(0x413e, 0x413f),
1190+
regmap_reg_range(0x4120, 0x412b),
1191+
regmap_reg_range(0x4134, 0x413b),
1192+
regmap_reg_range(0x413c, 0x413f),
11971193
regmap_reg_range(0x4400, 0x4401),
11981194
regmap_reg_range(0x4403, 0x4403),
11991195
regmap_reg_range(0x4410, 0x4417),
@@ -1220,10 +1216,9 @@ static const struct regmap_range ksz9896_valid_regs[] = {
12201216
regmap_reg_range(0x5030, 0x5030),
12211217
regmap_reg_range(0x5100, 0x5115),
12221218
regmap_reg_range(0x511a, 0x511f),
1223-
regmap_reg_range(0x5122, 0x5127),
1224-
regmap_reg_range(0x512a, 0x512b),
1225-
regmap_reg_range(0x5136, 0x5139),
1226-
regmap_reg_range(0x513e, 0x513f),
1219+
regmap_reg_range(0x5120, 0x512b),
1220+
regmap_reg_range(0x5134, 0x513b),
1221+
regmap_reg_range(0x513c, 0x513f),
12271222
regmap_reg_range(0x5400, 0x5401),
12281223
regmap_reg_range(0x5403, 0x5403),
12291224
regmap_reg_range(0x5410, 0x5417),
@@ -1250,10 +1245,9 @@ static const struct regmap_range ksz9896_valid_regs[] = {
12501245
regmap_reg_range(0x6030, 0x6030),
12511246
regmap_reg_range(0x6100, 0x6115),
12521247
regmap_reg_range(0x611a, 0x611f),
1253-
regmap_reg_range(0x6122, 0x6127),
1254-
regmap_reg_range(0x612a, 0x612b),
1255-
regmap_reg_range(0x6136, 0x6139),
1256-
regmap_reg_range(0x613e, 0x613f),
1248+
regmap_reg_range(0x6120, 0x612b),
1249+
regmap_reg_range(0x6134, 0x613b),
1250+
regmap_reg_range(0x613c, 0x613f),
12571251
regmap_reg_range(0x6300, 0x6301),
12581252
regmap_reg_range(0x6400, 0x6401),
12591253
regmap_reg_range(0x6403, 0x6403),

Diff for: drivers/net/dsa/ocelot/felix_vsc9959.c

+11-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define VSC9959_NUM_PORTS 6
2525

2626
#define VSC9959_TAS_GCL_ENTRY_MAX 63
27-
#define VSC9959_TAS_MIN_GATE_LEN_NS 33
27+
#define VSC9959_TAS_MIN_GATE_LEN_NS 35
2828
#define VSC9959_VCAP_POLICER_BASE 63
2929
#define VSC9959_VCAP_POLICER_MAX 383
3030
#define VSC9959_SWITCH_PCI_BAR 4
@@ -1056,11 +1056,15 @@ static void vsc9959_mdio_bus_free(struct ocelot *ocelot)
10561056
mdiobus_free(felix->imdio);
10571057
}
10581058

1059-
/* The switch considers any frame (regardless of size) as eligible for
1060-
* transmission if the traffic class gate is open for at least 33 ns.
1059+
/* The switch considers any frame (regardless of size) as eligible
1060+
* for transmission if the traffic class gate is open for at least
1061+
* VSC9959_TAS_MIN_GATE_LEN_NS.
1062+
*
10611063
* Overruns are prevented by cropping an interval at the end of the gate time
1062-
* slot for which egress scheduling is blocked, but we need to still keep 33 ns
1063-
* available for one packet to be transmitted, otherwise the port tc will hang.
1064+
* slot for which egress scheduling is blocked, but we need to still keep
1065+
* VSC9959_TAS_MIN_GATE_LEN_NS available for one packet to be transmitted,
1066+
* otherwise the port tc will hang.
1067+
*
10641068
* This function returns the size of a gate interval that remains available for
10651069
* setting the guard band, after reserving the space for one egress frame.
10661070
*/
@@ -1303,7 +1307,8 @@ static void vsc9959_tas_guard_bands_update(struct ocelot *ocelot, int port)
13031307
* per-tc static guard band lengths, so it reduces the
13041308
* useful gate interval length. Therefore, be careful
13051309
* to calculate a guard band (and therefore max_sdu)
1306-
* that still leaves 33 ns available in the time slot.
1310+
* that still leaves VSC9959_TAS_MIN_GATE_LEN_NS
1311+
* available in the time slot.
13071312
*/
13081313
max_sdu = div_u64(remaining_gate_len_ps, picos_per_byte);
13091314
/* A TC gate may be completely closed, which is a

Diff for: drivers/net/ethernet/broadcom/bnxt/bnxt.c

+8-10
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
15311531
if (TPA_START_IS_IPV6(tpa_start1))
15321532
tpa_info->gso_type = SKB_GSO_TCPV6;
15331533
/* RSS profiles 1 and 3 with extract code 0 for inner 4-tuple */
1534-
else if (cmp_type == CMP_TYPE_RX_L2_TPA_START_CMP &&
1534+
else if (!BNXT_CHIP_P4_PLUS(bp) &&
15351535
TPA_START_HASH_TYPE(tpa_start) == 3)
15361536
tpa_info->gso_type = SKB_GSO_TCPV6;
15371537
tpa_info->rss_hash =
@@ -2226,15 +2226,13 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
22262226
if (cmp_type == CMP_TYPE_RX_L2_V3_CMP) {
22272227
type = bnxt_rss_ext_op(bp, rxcmp);
22282228
} else {
2229-
u32 hash_type = RX_CMP_HASH_TYPE(rxcmp);
2229+
u32 itypes = RX_CMP_ITYPES(rxcmp);
22302230

2231-
/* RSS profiles 1 and 3 with extract code 0 for inner
2232-
* 4-tuple
2233-
*/
2234-
if (hash_type != 1 && hash_type != 3)
2235-
type = PKT_HASH_TYPE_L3;
2236-
else
2231+
if (itypes == RX_CMP_FLAGS_ITYPE_TCP ||
2232+
itypes == RX_CMP_FLAGS_ITYPE_UDP)
22372233
type = PKT_HASH_TYPE_L4;
2234+
else
2235+
type = PKT_HASH_TYPE_L3;
22382236
}
22392237
skb_set_hash(skb, le32_to_cpu(rxcmp->rx_cmp_rss_hash), type);
22402238
}
@@ -8367,7 +8365,7 @@ static int bnxt_alloc_all_ctx_pg_info(struct bnxt *bp, int ctx_max)
83678365
struct bnxt_ctx_mem_type *ctxm = &ctx->ctx_arr[type];
83688366
int n = 1;
83698367

8370-
if (!ctxm->max_entries)
8368+
if (!ctxm->max_entries || ctxm->pg_info)
83718369
continue;
83728370

83738371
if (ctxm->instance_bmap)
@@ -8971,8 +8969,8 @@ static int bnxt_backing_store_cfg_v2(struct bnxt *bp, u32 ena)
89718969
continue;
89728970
}
89738971
bnxt_bs_trace_init(bp, ctxm);
8974-
last_type = type;
89758972
}
8973+
last_type = type;
89768974
}
89778975

89788976
if (last_type == BNXT_CTX_INV) {

Diff for: drivers/net/ethernet/broadcom/bnxt/bnxt.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ struct rx_cmp {
267267
(((le32_to_cpu((rxcmp)->rx_cmp_misc_v1) & RX_CMP_RSS_HASH_TYPE) >>\
268268
RX_CMP_RSS_HASH_TYPE_SHIFT) & RSS_PROFILE_ID_MASK)
269269

270+
#define RX_CMP_ITYPES(rxcmp) \
271+
(le32_to_cpu((rxcmp)->rx_cmp_len_flags_type) & RX_CMP_FLAGS_ITYPES_MASK)
272+
270273
#define RX_CMP_V3_HASH_TYPE_LEGACY(rxcmp) \
271274
((le32_to_cpu((rxcmp)->rx_cmp_misc_v1) & RX_CMP_V3_RSS_EXT_OP_LEGACY) >>\
272275
RX_CMP_V3_RSS_EXT_OP_LEGACY_SHIFT)
@@ -378,7 +381,7 @@ struct rx_agg_cmp {
378381
u32 rx_agg_cmp_opaque;
379382
__le32 rx_agg_cmp_v;
380383
#define RX_AGG_CMP_V (1 << 0)
381-
#define RX_AGG_CMP_AGG_ID (0xffff << 16)
384+
#define RX_AGG_CMP_AGG_ID (0x0fff << 16)
382385
#define RX_AGG_CMP_AGG_ID_SHIFT 16
383386
__le32 rx_agg_cmp_unused;
384387
};
@@ -416,7 +419,7 @@ struct rx_tpa_start_cmp {
416419
#define RX_TPA_START_CMP_V3_RSS_HASH_TYPE_SHIFT 7
417420
#define RX_TPA_START_CMP_AGG_ID (0x7f << 25)
418421
#define RX_TPA_START_CMP_AGG_ID_SHIFT 25
419-
#define RX_TPA_START_CMP_AGG_ID_P5 (0xffff << 16)
422+
#define RX_TPA_START_CMP_AGG_ID_P5 (0x0fff << 16)
420423
#define RX_TPA_START_CMP_AGG_ID_SHIFT_P5 16
421424
#define RX_TPA_START_CMP_METADATA1 (0xf << 28)
422425
#define RX_TPA_START_CMP_METADATA1_SHIFT 28
@@ -540,7 +543,7 @@ struct rx_tpa_end_cmp {
540543
#define RX_TPA_END_CMP_PAYLOAD_OFFSET_SHIFT 16
541544
#define RX_TPA_END_CMP_AGG_ID (0x7f << 25)
542545
#define RX_TPA_END_CMP_AGG_ID_SHIFT 25
543-
#define RX_TPA_END_CMP_AGG_ID_P5 (0xffff << 16)
546+
#define RX_TPA_END_CMP_AGG_ID_P5 (0x0fff << 16)
544547
#define RX_TPA_END_CMP_AGG_ID_SHIFT_P5 16
545548

546549
__le32 rx_tpa_end_cmp_tsdelta;

Diff for: drivers/net/ethernet/chelsio/cxgb4/cxgb4.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ void t4_idma_monitor(struct adapter *adapter,
20762076
struct sge_idma_monitor_state *idma,
20772077
int hz, int ticks);
20782078
int t4_set_vf_mac_acl(struct adapter *adapter, unsigned int vf,
2079-
unsigned int naddr, u8 *addr);
2079+
u8 start, unsigned int naddr, u8 *addr);
20802080
void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
20812081
u32 start_index, bool sleep_ok);
20822082
void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,

Diff for: drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3234,7 +3234,7 @@ static int cxgb4_mgmt_set_vf_mac(struct net_device *dev, int vf, u8 *mac)
32343234

32353235
dev_info(pi->adapter->pdev_dev,
32363236
"Setting MAC %pM on VF %d\n", mac, vf);
3237-
ret = t4_set_vf_mac_acl(adap, vf + 1, 1, mac);
3237+
ret = t4_set_vf_mac_acl(adap, vf + 1, pi->lport, 1, mac);
32383238
if (!ret)
32393239
ether_addr_copy(adap->vfinfo[vf].vf_mac_addr, mac);
32403240
return ret;

Diff for: drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -10215,11 +10215,12 @@ int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size)
1021510215
* t4_set_vf_mac_acl - Set MAC address for the specified VF
1021610216
* @adapter: The adapter
1021710217
* @vf: one of the VFs instantiated by the specified PF
10218+
* @start: The start port id associated with specified VF
1021810219
* @naddr: the number of MAC addresses
1021910220
* @addr: the MAC address(es) to be set to the specified VF
1022010221
*/
1022110222
int t4_set_vf_mac_acl(struct adapter *adapter, unsigned int vf,
10222-
unsigned int naddr, u8 *addr)
10223+
u8 start, unsigned int naddr, u8 *addr)
1022310224
{
1022410225
struct fw_acl_mac_cmd cmd;
1022510226

@@ -10234,7 +10235,7 @@ int t4_set_vf_mac_acl(struct adapter *adapter, unsigned int vf,
1023410235
cmd.en_to_len16 = cpu_to_be32((unsigned int)FW_LEN16(cmd));
1023510236
cmd.nmac = naddr;
1023610237

10237-
switch (adapter->pf) {
10238+
switch (start) {
1023810239
case 3:
1023910240
memcpy(cmd.macaddr3, addr, sizeof(cmd.macaddr3));
1024010241
break;

Diff for: drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c

+8-10
Original file line numberDiff line numberDiff line change
@@ -1452,23 +1452,21 @@ int rvu_mbox_handler_npc_install_flow(struct rvu *rvu,
14521452
* hence modify pcifunc accordingly.
14531453
*/
14541454

1455-
/* AF installing for a PF/VF */
1456-
if (!req->hdr.pcifunc)
1455+
if (!req->hdr.pcifunc) {
1456+
/* AF installing for a PF/VF */
14571457
target = req->vf;
1458-
1459-
/* PF installing for its VF */
1460-
if (!from_vf && req->vf && !from_rep_dev) {
1458+
} else if (!from_vf && req->vf && !from_rep_dev) {
1459+
/* PF installing for its VF */
14611460
target = (req->hdr.pcifunc & ~RVU_PFVF_FUNC_MASK) | req->vf;
14621461
pf_set_vfs_mac = req->default_rule &&
14631462
(req->features & BIT_ULL(NPC_DMAC));
1464-
}
1465-
1466-
/* Representor device installing for a representee */
1467-
if (from_rep_dev && req->vf)
1463+
} else if (from_rep_dev && req->vf) {
1464+
/* Representor device installing for a representee */
14681465
target = req->vf;
1469-
else
1466+
} else {
14701467
/* msg received from PF/VF */
14711468
target = req->hdr.pcifunc;
1469+
}
14721470

14731471
/* ignore chan_mask in case pf func is not AF, revisit later */
14741472
if (!is_pffunc_af(req->hdr.pcifunc))

0 commit comments

Comments
 (0)