Skip to content

Commit 1722389

Browse files
committed
Merge tag 'net-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bpf and netfilter. A lot of networking people were at a conference last week, busy catching COVID, so relatively short PR. Current release - regressions: - tcp: process the 3rd ACK with sk_socket for TFO and MPTCP Current release - new code bugs: - l2tp: protect session IDR and tunnel session list with one lock, make sure the state is coherent to avoid a warning - eth: bnxt_en: update xdp_rxq_info in queue restart logic - eth: airoha: fix location of the MBI_RX_AGE_SEL_MASK field Previous releases - regressions: - xsk: require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len, the field reuses previously un-validated pad Previous releases - always broken: - tap/tun: drop short frames to prevent crashes later in the stack - eth: ice: add a per-VF limit on number of FDIR filters - af_unix: disable MSG_OOB handling for sockets in sockmap/sockhash" * tag 'net-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (34 commits) tun: add missing verification for short frame tap: add missing verification for short frame mISDN: Fix a use after free in hfcmulti_tx() gve: Fix an edge case for TSO skb validity check bnxt_en: update xdp_rxq_info in queue restart logic tcp: process the 3rd ACK with sk_socket for TFO/MPTCP selftests/bpf: Add XDP_UMEM_TX_METADATA_LEN to XSK TX metadata test xsk: Require XDP_UMEM_TX_METADATA_LEN to actuate tx_metadata_len bpf: Fix a segment issue when downgrading gso_size net: mediatek: Fix potential NULL pointer dereference in dummy net_device handling MAINTAINERS: make Breno the netconsole maintainer MAINTAINERS: Update bonding entry net: nexthop: Initialize all fields in dumped nexthops net: stmmac: Correct byte order of perfect_match selftests: forwarding: skip if kernel not support setting bridge fdb learning limit tipc: Return non-zero value from tipc_udp_addr2str() on error netfilter: nft_set_pipapo_avx2: disable softinterrupts ice: Fix recipe read procedure ice: Add a per-VF limit on number of FDIR filters net: bonding: correctly annotate RCU in bond_should_notify_peers() ...
2 parents 8bf1000 + af65ea4 commit 1722389

File tree

43 files changed

+320
-123
lines changed

Some content is hidden

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

43 files changed

+320
-123
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,8 @@ Nadia Yvette Chambers <[email protected]> William Lee Irwin III <wli@holomorphy
474474
475475
476476
477+
478+
477479
478480
479481

Documentation/networking/xsk-tx-metadata.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ metadata on the receive side.
1111
General Design
1212
==============
1313

14-
The headroom for the metadata is reserved via ``tx_metadata_len`` in
15-
``struct xdp_umem_reg``. The metadata length is therefore the same for
16-
every socket that shares the same umem. The metadata layout is a fixed UAPI,
17-
refer to ``union xsk_tx_metadata`` in ``include/uapi/linux/if_xdp.h``.
18-
Thus, generally, the ``tx_metadata_len`` field above should contain
19-
``sizeof(union xsk_tx_metadata)``.
14+
The headroom for the metadata is reserved via ``tx_metadata_len`` and
15+
``XDP_UMEM_TX_METADATA_LEN`` flag in ``struct xdp_umem_reg``. The metadata
16+
length is therefore the same for every socket that shares the same umem.
17+
The metadata layout is a fixed UAPI, refer to ``union xsk_tx_metadata`` in
18+
``include/uapi/linux/if_xdp.h``. Thus, generally, the ``tx_metadata_len``
19+
field above should contain ``sizeof(union xsk_tx_metadata)``.
20+
21+
Note that in the original implementation the ``XDP_UMEM_TX_METADATA_LEN``
22+
flag was not required. Applications might attempt to create a umem
23+
with a flag first and if it fails, do another attempt without a flag.
2024

2125
The headroom and the metadata itself should be located right before
2226
``xdp_desc->addr`` in the umem frame. Within a frame, the metadata

MAINTAINERS

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3906,11 +3906,10 @@ F: include/net/bluetooth/
39063906
F: net/bluetooth/
39073907

39083908
BONDING DRIVER
3909-
M: Jay Vosburgh <[email protected]>
3909+
M: Jay Vosburgh <[email protected]>
39103910
M: Andy Gospodarek <[email protected]>
39113911
3912-
S: Supported
3913-
W: http://sourceforge.net/projects/bonding/
3912+
S: Maintained
39143913
F: Documentation/networking/bonding.rst
39153914
F: drivers/net/bonding/
39163915
F: include/net/bond*
@@ -3974,8 +3973,10 @@ S: Odd Fixes
39743973
F: drivers/net/ethernet/netronome/nfp/bpf/
39753974

39763975
BPF JIT for POWERPC (32-BIT AND 64-BIT)
3977-
M: Naveen N. Rao <[email protected]>
39783976
M: Michael Ellerman <[email protected]>
3977+
M: Hari Bathini <[email protected]>
3978+
M: Christophe Leroy <[email protected]>
3979+
R: Naveen N Rao <[email protected]>
39793980
39803981
S: Supported
39813982
F: arch/powerpc/net/
@@ -12529,7 +12530,7 @@ F: mm/kmsan/
1252912530
F: scripts/Makefile.kmsan
1253012531

1253112532
KPROBES
12532-
M: Naveen N. Rao <naveen[email protected]>
12533+
M: Naveen N Rao <naveen@kernel.org>
1253312534
M: Anil S Keshavamurthy <[email protected]>
1253412535
M: "David S. Miller" <[email protected]>
1253512536
M: Masami Hiramatsu <[email protected]>
@@ -12906,7 +12907,7 @@ LINUX FOR POWERPC (32-BIT AND 64-BIT)
1290612907
M: Michael Ellerman <[email protected]>
1290712908
R: Nicholas Piggin <[email protected]>
1290812909
R: Christophe Leroy <[email protected]>
12909-
R: Naveen N. Rao <naveen[email protected]>
12910+
R: Naveen N Rao <naveen@kernel.org>
1291012911
1291112912
S: Supported
1291212913
W: https://github.com/linuxppc/wiki/wiki
@@ -15762,6 +15763,12 @@ S: Maintained
1576215763
F: Documentation/devicetree/bindings/hwmon/nuvoton,nct6775.yaml
1576315764
F: drivers/hwmon/nct6775-i2c.c
1576415765

15766+
NETCONSOLE
15767+
M: Breno Leitao <[email protected]>
15768+
S: Maintained
15769+
F: Documentation/networking/netconsole.rst
15770+
F: drivers/net/netconsole.c
15771+
1576515772
NETDEVSIM
1576615773
M: Jakub Kicinski <[email protected]>
1576715774
S: Maintained

drivers/isdn/hardware/mISDN/hfcmulti.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ hfcmulti_dtmf(struct hfc_multi *hc)
19011901
static void
19021902
hfcmulti_tx(struct hfc_multi *hc, int ch)
19031903
{
1904-
int i, ii, temp, len = 0;
1904+
int i, ii, temp, tmp_len, len = 0;
19051905
int Zspace, z1, z2; /* must be int for calculation */
19061906
int Fspace, f1, f2;
19071907
u_char *d;
@@ -2122,14 +2122,15 @@ hfcmulti_tx(struct hfc_multi *hc, int ch)
21222122
HFC_wait_nodebug(hc);
21232123
}
21242124

2125+
tmp_len = (*sp)->len;
21252126
dev_kfree_skb(*sp);
21262127
/* check for next frame */
21272128
if (bch && get_next_bframe(bch)) {
2128-
len = (*sp)->len;
2129+
len = tmp_len;
21292130
goto next_frame;
21302131
}
21312132
if (dch && get_next_dframe(dch)) {
2132-
len = (*sp)->len;
2133+
len = tmp_len;
21332134
goto next_frame;
21342135
}
21352136

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,13 +1121,10 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
11211121
return bestslave;
11221122
}
11231123

1124+
/* must be called in RCU critical section or with RTNL held */
11241125
static bool bond_should_notify_peers(struct bonding *bond)
11251126
{
1126-
struct slave *slave;
1127-
1128-
rcu_read_lock();
1129-
slave = rcu_dereference(bond->curr_active_slave);
1130-
rcu_read_unlock();
1127+
struct slave *slave = rcu_dereference_rtnl(bond->curr_active_slave);
11311128

11321129
if (!slave || !bond->send_peer_notif ||
11331130
bond->send_peer_notif %

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4052,6 +4052,7 @@ static void bnxt_reset_rx_ring_struct(struct bnxt *bp,
40524052

40534053
rxr->page_pool->p.napi = NULL;
40544054
rxr->page_pool = NULL;
4055+
memset(&rxr->xdp_rxq, 0, sizeof(struct xdp_rxq_info));
40554056

40564057
ring = &rxr->rx_ring_struct;
40574058
rmem = &ring->ring_mem;
@@ -15018,6 +15019,16 @@ static int bnxt_queue_mem_alloc(struct net_device *dev, void *qmem, int idx)
1501815019
if (rc)
1501915020
return rc;
1502015021

15022+
rc = xdp_rxq_info_reg(&clone->xdp_rxq, bp->dev, idx, 0);
15023+
if (rc < 0)
15024+
goto err_page_pool_destroy;
15025+
15026+
rc = xdp_rxq_info_reg_mem_model(&clone->xdp_rxq,
15027+
MEM_TYPE_PAGE_POOL,
15028+
clone->page_pool);
15029+
if (rc)
15030+
goto err_rxq_info_unreg;
15031+
1502115032
ring = &clone->rx_ring_struct;
1502215033
rc = bnxt_alloc_ring(bp, &ring->ring_mem);
1502315034
if (rc)
@@ -15047,6 +15058,9 @@ static int bnxt_queue_mem_alloc(struct net_device *dev, void *qmem, int idx)
1504715058
bnxt_free_ring(bp, &clone->rx_agg_ring_struct.ring_mem);
1504815059
err_free_rx_ring:
1504915060
bnxt_free_ring(bp, &clone->rx_ring_struct.ring_mem);
15061+
err_rxq_info_unreg:
15062+
xdp_rxq_info_unreg(&clone->xdp_rxq);
15063+
err_page_pool_destroy:
1505015064
clone->page_pool->p.napi = NULL;
1505115065
page_pool_destroy(clone->page_pool);
1505215066
clone->page_pool = NULL;
@@ -15062,6 +15076,8 @@ static void bnxt_queue_mem_free(struct net_device *dev, void *qmem)
1506215076
bnxt_free_one_rx_ring(bp, rxr);
1506315077
bnxt_free_one_rx_agg_ring(bp, rxr);
1506415078

15079+
xdp_rxq_info_unreg(&rxr->xdp_rxq);
15080+
1506515081
page_pool_destroy(rxr->page_pool);
1506615082
rxr->page_pool = NULL;
1506715083

@@ -15145,6 +15161,7 @@ static int bnxt_queue_start(struct net_device *dev, void *qmem, int idx)
1514515161
rxr->rx_sw_agg_prod = clone->rx_sw_agg_prod;
1514615162
rxr->rx_next_cons = clone->rx_next_cons;
1514715163
rxr->page_pool = clone->page_pool;
15164+
rxr->xdp_rxq = clone->xdp_rxq;
1514815165

1514915166
bnxt_copy_rx_ring(bp, rxr, clone);
1515015167

drivers/net/ethernet/google/gve/gve_tx_dqo.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,22 +866,42 @@ static bool gve_can_send_tso(const struct sk_buff *skb)
866866
const int header_len = skb_tcp_all_headers(skb);
867867
const int gso_size = shinfo->gso_size;
868868
int cur_seg_num_bufs;
869+
int prev_frag_size;
869870
int cur_seg_size;
870871
int i;
871872

872873
cur_seg_size = skb_headlen(skb) - header_len;
874+
prev_frag_size = skb_headlen(skb);
873875
cur_seg_num_bufs = cur_seg_size > 0;
874876

875877
for (i = 0; i < shinfo->nr_frags; i++) {
876878
if (cur_seg_size >= gso_size) {
877879
cur_seg_size %= gso_size;
878880
cur_seg_num_bufs = cur_seg_size > 0;
881+
882+
if (prev_frag_size > GVE_TX_MAX_BUF_SIZE_DQO) {
883+
int prev_frag_remain = prev_frag_size %
884+
GVE_TX_MAX_BUF_SIZE_DQO;
885+
886+
/* If the last descriptor of the previous frag
887+
* is less than cur_seg_size, the segment will
888+
* span two descriptors in the previous frag.
889+
* Since max gso size (9728) is less than
890+
* GVE_TX_MAX_BUF_SIZE_DQO, it is impossible
891+
* for the segment to span more than two
892+
* descriptors.
893+
*/
894+
if (prev_frag_remain &&
895+
cur_seg_size > prev_frag_remain)
896+
cur_seg_num_bufs++;
897+
}
879898
}
880899

881900
if (unlikely(++cur_seg_num_bufs > max_bufs_per_seg))
882901
return false;
883902

884-
cur_seg_size += skb_frag_size(&shinfo->frags[i]);
903+
prev_frag_size = skb_frag_size(&shinfo->frags[i]);
904+
cur_seg_size += prev_frag_size;
885905
}
886906

887907
return true;

drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ ice_parse_rx_flow_user_data(struct ethtool_rx_flow_spec *fsp,
534534
*
535535
* Returns the number of available flow director filters to this VSI
536536
*/
537-
static int ice_fdir_num_avail_fltr(struct ice_hw *hw, struct ice_vsi *vsi)
537+
int ice_fdir_num_avail_fltr(struct ice_hw *hw, struct ice_vsi *vsi)
538538
{
539539
u16 vsi_num = ice_get_hw_vsi_num(hw, vsi->idx);
540540
u16 num_guar;

drivers/net/ethernet/intel/ice/ice_fdir.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ struct ice_fdir_base_pkt {
207207
const u8 *tun_pkt;
208208
};
209209

210+
struct ice_vsi;
211+
210212
int ice_alloc_fd_res_cntr(struct ice_hw *hw, u16 *cntr_id);
211213
int ice_free_fd_res_cntr(struct ice_hw *hw, u16 cntr_id);
212214
int ice_alloc_fd_guar_item(struct ice_hw *hw, u16 *cntr_id, u16 num_fltr);
@@ -218,6 +220,7 @@ int
218220
ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
219221
u8 *pkt, bool frag, bool tun);
220222
int ice_get_fdir_cnt_all(struct ice_hw *hw);
223+
int ice_fdir_num_avail_fltr(struct ice_hw *hw, struct ice_vsi *vsi);
221224
bool ice_fdir_is_dup_fltr(struct ice_hw *hw, struct ice_fdir_fltr *input);
222225
bool ice_fdir_has_frag(enum ice_fltr_ptype flow);
223226
struct ice_fdir_fltr *

drivers/net/ethernet/intel/ice/ice_switch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,10 +2400,10 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,
24002400

24012401
/* Propagate some data to the recipe database */
24022402
recps[idx].priority = root_bufs.content.act_ctrl_fwd_priority;
2403-
recps[idx].need_pass_l2 = root_bufs.content.act_ctrl &
2404-
ICE_AQ_RECIPE_ACT_NEED_PASS_L2;
2405-
recps[idx].allow_pass_l2 = root_bufs.content.act_ctrl &
2406-
ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2;
2403+
recps[idx].need_pass_l2 = !!(root_bufs.content.act_ctrl &
2404+
ICE_AQ_RECIPE_ACT_NEED_PASS_L2);
2405+
recps[idx].allow_pass_l2 = !!(root_bufs.content.act_ctrl &
2406+
ICE_AQ_RECIPE_ACT_ALLOW_PASS_L2);
24072407
bitmap_zero(recps[idx].res_idxs, ICE_MAX_FV_WORDS);
24082408
if (root_bufs.content.result_indx & ICE_AQ_RECIPE_RESULT_EN) {
24092409
set_bit(root_bufs.content.result_indx &

0 commit comments

Comments
 (0)