Skip to content

Commit 62a0e2f

Browse files
committed
Merge tag 'net-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni: "Including fixes from netfilter. It looks like that most people are still traveling: both the ML volume and the processing capacity are low. Previous releases - regressions: - netfilter: - nf_reject_ipv6: fix nf_reject_ip6_tcphdr_put() - nf_tables: keep deleted flowtable hooks until after RCU - tcp: check skb is non-NULL in tcp_rto_delta_us() - phy: aquantia: fix -ETIMEDOUT PHY probe failure when firmware not present - eth: virtio_net: fix mismatched buf address when unmapping for small packets - eth: stmmac: fix zero-division error when disabling tc cbs - eth: bonding: fix unnecessary warnings and logs from bond_xdp_get_xmit_slave() Previous releases - always broken: - netfilter: - fix clash resolution for bidirectional flows - fix allocation with no memcg accounting - eth: r8169: add tally counter fields added with RTL8125 - eth: ravb: fix rx and tx frame size limit" * tag 'net-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (35 commits) selftests: netfilter: Avoid hanging ipvs.sh kselftest: add test for nfqueue induced conntrack race netfilter: nfnetlink_queue: remove old clash resolution logic netfilter: nf_tables: missing objects with no memcg accounting netfilter: nf_tables: use rcu chain hook list iterator from netlink dump path netfilter: ctnetlink: compile ctnetlink_label_size with CONFIG_NF_CONNTRACK_EVENTS netfilter: nf_reject: Fix build warning when CONFIG_BRIDGE_NETFILTER=n netfilter: nf_tables: Keep deleted flowtable hooks until after RCU docs: tproxy: ignore non-transparent sockets in iptables netfilter: ctnetlink: Guard possible unused functions selftests: netfilter: nft_tproxy.sh: add tcp tests selftests: netfilter: add reverse-clash resolution test case netfilter: conntrack: add clash resolution for reverse collisions netfilter: nf_nat: don't try nat source port reallocation for reverse dir clash selftests/net: packetdrill: increase timing tolerance in debug mode usbnet: fix cyclical race on disconnect with work queue net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled virtio_net: Fix mismatched buf address when unmapping for small packets bonding: Fix unnecessary warnings and logs from bond_xdp_get_xmit_slave() r8169: add missing MODULE_FIRMWARE entry for RTL8126A rev.b ...
2 parents 5e54664 + aef3a58 commit 62a0e2f

Some content is hidden

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

41 files changed

+1289
-209
lines changed

Documentation/networking/tproxy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The idea is that you identify packets with destination address matching a local
1717
socket on your box, set the packet mark to a certain value::
1818

1919
# iptables -t mangle -N DIVERT
20-
# iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
20+
# iptables -t mangle -A PREROUTING -p tcp -m socket --transparent -j DIVERT
2121
# iptables -t mangle -A DIVERT -j MARK --set-mark 1
2222
# iptables -t mangle -A DIVERT -j ACCEPT
2323

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17316,8 +17316,8 @@ M: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
1731617316
L: netdev@vger.kernel.org
1731717317
S: Maintained
1731817318
F: Documentation/networking/oa-tc6-framework.rst
17319-
F: drivers/include/linux/oa_tc6.h
1732017319
F: drivers/net/ethernet/oa_tc6.c
17320+
F: include/linux/oa_tc6.h
1732117321

1732217322
OPEN FIRMWARE AND FLATTENED DEVICE TREE
1732317323
M: Rob Herring <robh@kernel.org>

drivers/net/bonding/bond_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5610,9 +5610,9 @@ bond_xdp_get_xmit_slave(struct net_device *bond_dev, struct xdp_buff *xdp)
56105610
break;
56115611

56125612
default:
5613-
/* Should never happen. Mode guarded by bond_xdp_check() */
5614-
netdev_err(bond_dev, "Unknown bonding mode %d for xdp xmit\n", BOND_MODE(bond));
5615-
WARN_ON_ONCE(1);
5613+
if (net_ratelimit())
5614+
netdev_err(bond_dev, "Unknown bonding mode %d for xdp xmit\n",
5615+
BOND_MODE(bond));
56165616
return NULL;
56175617
}
56185618

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,33 @@ struct rtl8169_counters {
579579
__le32 rx_multicast;
580580
__le16 tx_aborted;
581581
__le16 tx_underrun;
582+
/* new since RTL8125 */
583+
__le64 tx_octets;
584+
__le64 rx_octets;
585+
__le64 rx_multicast64;
586+
__le64 tx_unicast64;
587+
__le64 tx_broadcast64;
588+
__le64 tx_multicast64;
589+
__le32 tx_pause_on;
590+
__le32 tx_pause_off;
591+
__le32 tx_pause_all;
592+
__le32 tx_deferred;
593+
__le32 tx_late_collision;
594+
__le32 tx_all_collision;
595+
__le32 tx_aborted32;
596+
__le32 align_errors32;
597+
__le32 rx_frame_too_long;
598+
__le32 rx_runt;
599+
__le32 rx_pause_on;
600+
__le32 rx_pause_off;
601+
__le32 rx_pause_all;
602+
__le32 rx_unknown_opcode;
603+
__le32 rx_mac_error;
604+
__le32 tx_underrun32;
605+
__le32 rx_mac_missed;
606+
__le32 rx_tcam_dropped;
607+
__le32 tdu;
608+
__le32 rdu;
582609
};
583610

584611
struct rtl8169_tc_offsets {
@@ -681,6 +708,7 @@ MODULE_FIRMWARE(FIRMWARE_8107E_2);
681708
MODULE_FIRMWARE(FIRMWARE_8125A_3);
682709
MODULE_FIRMWARE(FIRMWARE_8125B_2);
683710
MODULE_FIRMWARE(FIRMWARE_8126A_2);
711+
MODULE_FIRMWARE(FIRMWARE_8126A_3);
684712

685713
static inline struct device *tp_to_dev(struct rtl8169_private *tp)
686714
{

drivers/net/ethernet/renesas/ravb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ struct ravb_hw_info {
10521052
netdev_features_t net_features;
10531053
int stats_len;
10541054
u32 tccr_mask;
1055+
u32 tx_max_frame_size;
10551056
u32 rx_max_frame_size;
10561057
u32 rx_buffer_size;
10571058
u32 rx_desc_size;

drivers/net/ethernet/renesas/ravb_main.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,16 @@ static void ravb_emac_init_gbeth(struct net_device *ndev)
555555

556556
static void ravb_emac_init_rcar(struct net_device *ndev)
557557
{
558-
/* Receive frame limit set register */
559-
ravb_write(ndev, ndev->mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN, RFLR);
558+
struct ravb_private *priv = netdev_priv(ndev);
559+
560+
/* Set receive frame length
561+
*
562+
* The length set here describes the frame from the destination address
563+
* up to and including the CRC data. However only the frame data,
564+
* excluding the CRC, are transferred to memory. To allow for the
565+
* largest frames add the CRC length to the maximum Rx descriptor size.
566+
*/
567+
ravb_write(ndev, priv->info->rx_max_frame_size + ETH_FCS_LEN, RFLR);
560568

561569
/* EMAC Mode: PAUSE prohibition; Duplex; RX Checksum; TX; RX */
562570
ravb_write(ndev, ECMR_ZPF | ECMR_DM |
@@ -2674,6 +2682,7 @@ static const struct ravb_hw_info ravb_gen2_hw_info = {
26742682
.net_features = NETIF_F_RXCSUM,
26752683
.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
26762684
.tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
2685+
.tx_max_frame_size = SZ_2K,
26772686
.rx_max_frame_size = SZ_2K,
26782687
.rx_buffer_size = SZ_2K +
26792688
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
@@ -2696,6 +2705,7 @@ static const struct ravb_hw_info ravb_gen3_hw_info = {
26962705
.net_features = NETIF_F_RXCSUM,
26972706
.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
26982707
.tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
2708+
.tx_max_frame_size = SZ_2K,
26992709
.rx_max_frame_size = SZ_2K,
27002710
.rx_buffer_size = SZ_2K +
27012711
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
@@ -2721,6 +2731,7 @@ static const struct ravb_hw_info ravb_gen4_hw_info = {
27212731
.net_features = NETIF_F_RXCSUM,
27222732
.stats_len = ARRAY_SIZE(ravb_gstrings_stats),
27232733
.tccr_mask = TCCR_TSRQ0 | TCCR_TSRQ1 | TCCR_TSRQ2 | TCCR_TSRQ3,
2734+
.tx_max_frame_size = SZ_2K,
27242735
.rx_max_frame_size = SZ_2K,
27252736
.rx_buffer_size = SZ_2K +
27262737
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)),
@@ -2770,6 +2781,7 @@ static const struct ravb_hw_info gbeth_hw_info = {
27702781
.net_features = NETIF_F_RXCSUM | NETIF_F_HW_CSUM,
27712782
.stats_len = ARRAY_SIZE(ravb_gstrings_stats_gbeth),
27722783
.tccr_mask = TCCR_TSRQ0,
2784+
.tx_max_frame_size = 1522,
27732785
.rx_max_frame_size = SZ_8K,
27742786
.rx_buffer_size = SZ_2K,
27752787
.rx_desc_size = sizeof(struct ravb_rx_desc),
@@ -2981,7 +2993,7 @@ static int ravb_probe(struct platform_device *pdev)
29812993
priv->avb_link_active_low =
29822994
of_property_read_bool(np, "renesas,ether-link-active-low");
29832995

2984-
ndev->max_mtu = info->rx_max_frame_size -
2996+
ndev->max_mtu = info->tx_max_frame_size -
29852997
(ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN);
29862998
ndev->min_mtu = ETH_MIN_MTU;
29872999

drivers/net/ethernet/seeq/ether3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,9 +847,11 @@ static void ether3_remove(struct expansion_card *ec)
847847
{
848848
struct net_device *dev = ecard_get_drvdata(ec);
849849

850+
ether3_outw(priv(dev)->regs.config2 |= CFG2_CTRLO, REG_CONFIG2);
850851
ecard_set_drvdata(ec, NULL);
851852

852853
unregister_netdev(dev);
854+
del_timer_sync(&priv(dev)->timer);
853855
free_netdev(dev);
854856
ecard_release_resources(ec);
855857
}

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
20352035
rx_q->queue_index = queue;
20362036
rx_q->priv_data = priv;
20372037

2038-
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
2038+
pp_params.flags = PP_FLAG_DMA_MAP | (xdp_prog ? PP_FLAG_DMA_SYNC_DEV : 0);
20392039
pp_params.pool_size = dma_conf->dma_rx_size;
20402040
num_pages = DIV_ROUND_UP(dma_conf->dma_buf_sz, PAGE_SIZE);
20412041
pp_params.order = ilog2(num_pages);

drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ static int tc_setup_cbs(struct stmmac_priv *priv,
386386
return ret;
387387

388388
priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB;
389+
return 0;
389390
}
390391

391392
/* Final adjustments for HW */

drivers/net/ethernet/xilinx/xilinx_axienet_main.c

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -736,15 +736,15 @@ static int axienet_device_reset(struct net_device *ndev)
736736
*
737737
* Would either be called after a successful transmit operation, or after
738738
* there was an error when setting up the chain.
739-
* Returns the number of descriptors handled.
739+
* Returns the number of packets handled.
740740
*/
741741
static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
742742
int nr_bds, bool force, u32 *sizep, int budget)
743743
{
744744
struct axidma_bd *cur_p;
745745
unsigned int status;
746+
int i, packets = 0;
746747
dma_addr_t phys;
747-
int i;
748748

749749
for (i = 0; i < nr_bds; i++) {
750750
cur_p = &lp->tx_bd_v[(first_bd + i) % lp->tx_bd_num];
@@ -763,8 +763,10 @@ static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
763763
(cur_p->cntrl & XAXIDMA_BD_CTRL_LENGTH_MASK),
764764
DMA_TO_DEVICE);
765765

766-
if (cur_p->skb && (status & XAXIDMA_BD_STS_COMPLETE_MASK))
766+
if (cur_p->skb && (status & XAXIDMA_BD_STS_COMPLETE_MASK)) {
767767
napi_consume_skb(cur_p->skb, budget);
768+
packets++;
769+
}
768770

769771
cur_p->app0 = 0;
770772
cur_p->app1 = 0;
@@ -780,7 +782,13 @@ static int axienet_free_tx_chain(struct axienet_local *lp, u32 first_bd,
780782
*sizep += status & XAXIDMA_BD_STS_ACTUAL_LEN_MASK;
781783
}
782784

783-
return i;
785+
if (!force) {
786+
lp->tx_bd_ci += i;
787+
if (lp->tx_bd_ci >= lp->tx_bd_num)
788+
lp->tx_bd_ci %= lp->tx_bd_num;
789+
}
790+
791+
return packets;
784792
}
785793

786794
/**
@@ -953,13 +961,10 @@ static int axienet_tx_poll(struct napi_struct *napi, int budget)
953961
u32 size = 0;
954962
int packets;
955963

956-
packets = axienet_free_tx_chain(lp, lp->tx_bd_ci, budget, false, &size, budget);
964+
packets = axienet_free_tx_chain(lp, lp->tx_bd_ci, lp->tx_bd_num, false,
965+
&size, budget);
957966

958967
if (packets) {
959-
lp->tx_bd_ci += packets;
960-
if (lp->tx_bd_ci >= lp->tx_bd_num)
961-
lp->tx_bd_ci %= lp->tx_bd_num;
962-
963968
u64_stats_update_begin(&lp->tx_stat_sync);
964969
u64_stats_add(&lp->tx_packets, packets);
965970
u64_stats_add(&lp->tx_bytes, size);
@@ -1282,9 +1287,10 @@ static irqreturn_t axienet_tx_irq(int irq, void *_ndev)
12821287
u32 cr = lp->tx_dma_cr;
12831288

12841289
cr &= ~(XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK);
1285-
axienet_dma_out32(lp, XAXIDMA_TX_CR_OFFSET, cr);
1286-
1287-
napi_schedule(&lp->napi_tx);
1290+
if (napi_schedule_prep(&lp->napi_tx)) {
1291+
axienet_dma_out32(lp, XAXIDMA_TX_CR_OFFSET, cr);
1292+
__napi_schedule(&lp->napi_tx);
1293+
}
12881294
}
12891295

12901296
return IRQ_HANDLED;
@@ -1326,9 +1332,10 @@ static irqreturn_t axienet_rx_irq(int irq, void *_ndev)
13261332
u32 cr = lp->rx_dma_cr;
13271333

13281334
cr &= ~(XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK);
1329-
axienet_dma_out32(lp, XAXIDMA_RX_CR_OFFSET, cr);
1330-
1331-
napi_schedule(&lp->napi_rx);
1335+
if (napi_schedule_prep(&lp->napi_rx)) {
1336+
axienet_dma_out32(lp, XAXIDMA_RX_CR_OFFSET, cr);
1337+
__napi_schedule(&lp->napi_rx);
1338+
}
13321339
}
13331340

13341341
return IRQ_HANDLED;

0 commit comments

Comments
 (0)