Skip to content

Commit a811c1f

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Fix reference count leaks in various parts of batman-adv, from Xiyu Yang. 2) Update NAT checksum even when it is zero, from Guillaume Nault. 3) sk_psock reference count leak in tls code, also from Xiyu Yang. 4) Sanity check TCA_FQ_CODEL_DROP_BATCH_SIZE netlink attribute in fq_codel, from Eric Dumazet. 5) Fix panic in choke_reset(), also from Eric Dumazet. 6) Fix VLAN accel handling in bnxt_fix_features(), from Michael Chan. 7) Disallow out of range quantum values in sch_sfq, from Eric Dumazet. 8) Fix crash in x25_disconnect(), from Yue Haibing. 9) Don't pass pointer to local variable back to the caller in nf_osf_hdr_ctx_init(), from Arnd Bergmann. 10) Wireguard should use the ECN decap helper functions, from Toke Høiland-Jørgensen. 11) Fix command entry leak in mlx5 driver, from Moshe Shemesh. 12) Fix uninitialized variable access in mptcp's subflow_syn_recv_sock(), from Paolo Abeni. 13) Fix unnecessary out-of-order ingress frame ordering in macsec, from Scott Dial. 14) IPv6 needs to use a global serial number for dst validation just like ipv4, from David Ahern. 15) Fix up PTP_1588_CLOCK deps, from Clay McClure. 16) Missing NLM_F_MULTI flag in gtp driver netlink messages, from Yoshiyuki Kurauchi. 17) Fix a regression in that dsa user port errors should not be fatal, from Florian Fainelli. 18) Fix iomap leak in enetc driver, from Dejin Zheng. 19) Fix use after free in lec_arp_clear_vccs(), from Cong Wang. 20) Initialize protocol value earlier in neigh code paths when generating events, from Roman Mashak. 21) netdev_update_features() must be called with RTNL mutex in macsec driver, from Antoine Tenart. 22) Validate untrusted GSO packets even more strictly, from Willem de Bruijn. 23) Wireguard decrypt worker needs a cond_resched(), from Jason Donenfeld. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (111 commits) net: flow_offload: skip hw stats check for FLOW_ACTION_HW_STATS_DONT_CARE MAINTAINERS: put DYNAMIC INTERRUPT MODERATION in proper order wireguard: send/receive: use explicit unlikely branch instead of implicit coalescing wireguard: selftests: initalize ipv6 members to NULL to squelch clang warning wireguard: send/receive: cond_resched() when processing worker ringbuffers wireguard: socket: remove errant restriction on looping to self wireguard: selftests: use normal kernel stack size on ppc64 net: ethernet: ti: am65-cpsw-nuss: fix irqs type ionic: Use debugfs_create_bool() to export bool net: dsa: Do not leave DSA master with NULL netdev_ops net: dsa: remove duplicate assignment in dsa_slave_add_cls_matchall_mirred net: stricter validation of untrusted gso packets seg6: fix SRH processing to comply with RFC8754 net: mscc: ocelot: ANA_AUTOAGE_AGE_PERIOD holds a value in seconds, not ms net: dsa: ocelot: the MAC table on Felix is twice as large net: dsa: sja1105: the PTP_CLK extts input reacts on both edges selftests: net: tcp_mmap: fix SO_RCVLOWAT setting net: hsr: fix incorrect type usage for protocol variable net: macsec: fix rtnl locking issue net: mvpp2: cls: Prevent buffer overflow in mvpp2_ethtool_cls_rule_del() ...
2 parents b938895 + 16f8036 commit a811c1f

File tree

107 files changed

+801
-462
lines changed

Some content is hidden

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

107 files changed

+801
-462
lines changed

Documentation/networking/devlink/ice.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ The ``ice`` driver reports the following versions
6161
- running
6262
- ICE OS Default Package
6363
- The name of the DDP package that is active in the device. The DDP
64-
package is loaded by the driver during initialization. Each varation
65-
of DDP package shall have a unique name.
64+
package is loaded by the driver during initialization. Each
65+
variation of the DDP package has a unique name.
6666
* - ``fw.app``
6767
- running
6868
- 1.3.1.0

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5935,9 +5935,9 @@ F: lib/dynamic_debug.c
59355935
DYNAMIC INTERRUPT MODERATION
59365936
M: Tal Gilboa <talgi@mellanox.com>
59375937
S: Maintained
5938+
F: Documentation/networking/net_dim.rst
59385939
F: include/linux/dim.h
59395940
F: lib/dim/
5940-
F: Documentation/networking/net_dim.rst
59415941

59425942
DZ DECSTATION DZ11 SERIAL DRIVER
59435943
M: "Maciej W. Rozycki" <macro@linux-mips.org>

drivers/crypto/chelsio/chcr_ktls.c

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -673,41 +673,14 @@ int chcr_ktls_cpl_set_tcb_rpl(struct adapter *adap, unsigned char *input)
673673
return 0;
674674
}
675675

676-
/*
677-
* chcr_write_cpl_set_tcb_ulp: update tcb values.
678-
* TCB is responsible to create tcp headers, so all the related values
679-
* should be correctly updated.
680-
* @tx_info - driver specific tls info.
681-
* @q - tx queue on which packet is going out.
682-
* @tid - TCB identifier.
683-
* @pos - current index where should we start writing.
684-
* @word - TCB word.
685-
* @mask - TCB word related mask.
686-
* @val - TCB word related value.
687-
* @reply - set 1 if looking for TP response.
688-
* return - next position to write.
689-
*/
690-
static void *chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
691-
struct sge_eth_txq *q, u32 tid,
692-
void *pos, u16 word, u64 mask,
676+
static void *__chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
677+
u32 tid, void *pos, u16 word, u64 mask,
693678
u64 val, u32 reply)
694679
{
695680
struct cpl_set_tcb_field_core *cpl;
696681
struct ulptx_idata *idata;
697682
struct ulp_txpkt *txpkt;
698-
void *save_pos = NULL;
699-
u8 buf[48] = {0};
700-
int left;
701683

702-
left = (void *)q->q.stat - pos;
703-
if (unlikely(left < CHCR_SET_TCB_FIELD_LEN)) {
704-
if (!left) {
705-
pos = q->q.desc;
706-
} else {
707-
save_pos = pos;
708-
pos = buf;
709-
}
710-
}
711684
/* ULP_TXPKT */
712685
txpkt = pos;
713686
txpkt->cmd_dest = htonl(ULPTX_CMD_V(ULP_TX_PKT) | ULP_TXPKT_DEST_V(0));
@@ -732,18 +705,54 @@ static void *chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
732705
idata = (struct ulptx_idata *)(cpl + 1);
733706
idata->cmd_more = htonl(ULPTX_CMD_V(ULP_TX_SC_NOOP));
734707
idata->len = htonl(0);
708+
pos = idata + 1;
735709

736-
if (save_pos) {
737-
pos = chcr_copy_to_txd(buf, &q->q, save_pos,
738-
CHCR_SET_TCB_FIELD_LEN);
739-
} else {
740-
/* check again if we are at the end of the queue */
741-
if (left == CHCR_SET_TCB_FIELD_LEN)
710+
return pos;
711+
}
712+
713+
714+
/*
715+
* chcr_write_cpl_set_tcb_ulp: update tcb values.
716+
* TCB is responsible to create tcp headers, so all the related values
717+
* should be correctly updated.
718+
* @tx_info - driver specific tls info.
719+
* @q - tx queue on which packet is going out.
720+
* @tid - TCB identifier.
721+
* @pos - current index where should we start writing.
722+
* @word - TCB word.
723+
* @mask - TCB word related mask.
724+
* @val - TCB word related value.
725+
* @reply - set 1 if looking for TP response.
726+
* return - next position to write.
727+
*/
728+
static void *chcr_write_cpl_set_tcb_ulp(struct chcr_ktls_info *tx_info,
729+
struct sge_eth_txq *q, u32 tid,
730+
void *pos, u16 word, u64 mask,
731+
u64 val, u32 reply)
732+
{
733+
int left = (void *)q->q.stat - pos;
734+
735+
if (unlikely(left < CHCR_SET_TCB_FIELD_LEN)) {
736+
if (!left) {
742737
pos = q->q.desc;
743-
else
744-
pos = idata + 1;
738+
} else {
739+
u8 buf[48] = {0};
740+
741+
__chcr_write_cpl_set_tcb_ulp(tx_info, tid, buf, word,
742+
mask, val, reply);
743+
744+
return chcr_copy_to_txd(buf, &q->q, pos,
745+
CHCR_SET_TCB_FIELD_LEN);
746+
}
745747
}
746748

749+
pos = __chcr_write_cpl_set_tcb_ulp(tx_info, tid, pos, word,
750+
mask, val, reply);
751+
752+
/* check again if we are at the end of the queue */
753+
if (left == CHCR_SET_TCB_FIELD_LEN)
754+
pos = q->q.desc;
755+
747756
return pos;
748757
}
749758

drivers/net/dsa/mv88e6xxx/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ config NET_DSA_MV88E6XXX_PTP
2424
bool "PTP support for Marvell 88E6xxx"
2525
default n
2626
depends on NET_DSA_MV88E6XXX_GLOBAL2
27+
depends on PTP_1588_CLOCK
2728
imply NETWORK_PHY_TIMESTAMPING
28-
imply PTP_1588_CLOCK
2929
help
3030
Say Y to enable PTP hardware timestamping on Marvell 88E6xxx switch
3131
chips that support it.

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3962,7 +3962,6 @@ static const struct mv88e6xxx_ops mv88e6190_ops = {
39623962
.serdes_get_stats = mv88e6390_serdes_get_stats,
39633963
.serdes_get_regs_len = mv88e6390_serdes_get_regs_len,
39643964
.serdes_get_regs = mv88e6390_serdes_get_regs,
3965-
.phylink_validate = mv88e6390_phylink_validate,
39663965
.gpio_ops = &mv88e6352_gpio_ops,
39673966
.phylink_validate = mv88e6390_phylink_validate,
39683967
};
@@ -4021,7 +4020,6 @@ static const struct mv88e6xxx_ops mv88e6190x_ops = {
40214020
.serdes_get_stats = mv88e6390_serdes_get_stats,
40224021
.serdes_get_regs_len = mv88e6390_serdes_get_regs_len,
40234022
.serdes_get_regs = mv88e6390_serdes_get_regs,
4024-
.phylink_validate = mv88e6390_phylink_validate,
40254023
.gpio_ops = &mv88e6352_gpio_ops,
40264024
.phylink_validate = mv88e6390x_phylink_validate,
40274025
};
@@ -4079,7 +4077,6 @@ static const struct mv88e6xxx_ops mv88e6191_ops = {
40794077
.serdes_get_stats = mv88e6390_serdes_get_stats,
40804078
.serdes_get_regs_len = mv88e6390_serdes_get_regs_len,
40814079
.serdes_get_regs = mv88e6390_serdes_get_regs,
4082-
.phylink_validate = mv88e6390_phylink_validate,
40834080
.avb_ops = &mv88e6390_avb_ops,
40844081
.ptp_ops = &mv88e6352_ptp_ops,
40854082
.phylink_validate = mv88e6390_phylink_validate,
@@ -4235,7 +4232,6 @@ static const struct mv88e6xxx_ops mv88e6290_ops = {
42354232
.serdes_get_stats = mv88e6390_serdes_get_stats,
42364233
.serdes_get_regs_len = mv88e6390_serdes_get_regs_len,
42374234
.serdes_get_regs = mv88e6390_serdes_get_regs,
4238-
.phylink_validate = mv88e6390_phylink_validate,
42394235
.gpio_ops = &mv88e6352_gpio_ops,
42404236
.avb_ops = &mv88e6390_avb_ops,
42414237
.ptp_ops = &mv88e6352_ptp_ops,

drivers/net/dsa/ocelot/felix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
400400
ocelot->stats_layout = felix->info->stats_layout;
401401
ocelot->num_stats = felix->info->num_stats;
402402
ocelot->shared_queue_sz = felix->info->shared_queue_sz;
403+
ocelot->num_mact_rows = felix->info->num_mact_rows;
403404
ocelot->vcap_is2_keys = felix->info->vcap_is2_keys;
404405
ocelot->vcap_is2_actions= felix->info->vcap_is2_actions;
405406
ocelot->vcap = felix->info->vcap;

drivers/net/dsa/ocelot/felix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ struct felix_info {
1515
const u32 *const *map;
1616
const struct ocelot_ops *ops;
1717
int shared_queue_sz;
18+
int num_mact_rows;
1819
const struct ocelot_stat_layout *stats_layout;
1920
unsigned int num_stats;
2021
int num_ports;

drivers/net/dsa/ocelot/felix_vsc9959.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ struct felix_info felix_info_vsc9959 = {
12201220
.vcap_is2_actions = vsc9959_vcap_is2_actions,
12211221
.vcap = vsc9959_vcap_props,
12221222
.shared_queue_sz = 128 * 1024,
1223+
.num_mact_rows = 2048,
12231224
.num_ports = 6,
12241225
.switch_pci_bar = 4,
12251226
.imdio_pci_bar = 0,

drivers/net/dsa/sja1105/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ tristate "NXP SJA1105 Ethernet switch family support"
2020
config NET_DSA_SJA1105_PTP
2121
bool "Support for the PTP clock on the NXP SJA1105 Ethernet switch"
2222
depends on NET_DSA_SJA1105
23+
depends on PTP_1588_CLOCK
2324
help
2425
This enables support for timestamping and PTP clock manipulations in
2526
the SJA1105 DSA driver.

drivers/net/dsa/sja1105/sja1105_ptp.c

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616

1717
/* PTPSYNCTS has no interrupt or update mechanism, because the intended
1818
* hardware use case is for the timestamp to be collected synchronously,
19-
* immediately after the CAS_MASTER SJA1105 switch has triggered a CASSYNC
20-
* pulse on the PTP_CLK pin. When used as a generic extts source, it needs
21-
* polling and a comparison with the old value. The polling interval is just
22-
* the Nyquist rate of a canonical PPS input (e.g. from a GPS module).
23-
* Anything of higher frequency than 1 Hz will be lost, since there is no
24-
* timestamp FIFO.
19+
* immediately after the CAS_MASTER SJA1105 switch has performed a CASSYNC
20+
* one-shot toggle (no return to level) on the PTP_CLK pin. When used as a
21+
* generic extts source, the PTPSYNCTS register needs polling and a comparison
22+
* with the old value. The polling interval is configured as the Nyquist rate
23+
* of a signal with 50% duty cycle and 1Hz frequency, which is sadly all that
24+
* this hardware can do (but may be enough for some setups). Anything of higher
25+
* frequency than 1 Hz will be lost, since there is no timestamp FIFO.
2526
*/
26-
#define SJA1105_EXTTS_INTERVAL (HZ / 2)
27+
#define SJA1105_EXTTS_INTERVAL (HZ / 4)
2728

2829
/* This range is actually +/- SJA1105_MAX_ADJ_PPB
2930
* divided by 1000 (ppb -> ppm) and with a 16-bit
@@ -754,7 +755,16 @@ static int sja1105_extts_enable(struct sja1105_private *priv,
754755
return -EOPNOTSUPP;
755756

756757
/* Reject requests with unsupported flags */
757-
if (extts->flags)
758+
if (extts->flags & ~(PTP_ENABLE_FEATURE |
759+
PTP_RISING_EDGE |
760+
PTP_FALLING_EDGE |
761+
PTP_STRICT_FLAGS))
762+
return -EOPNOTSUPP;
763+
764+
/* We can only enable time stamping on both edges, sadly. */
765+
if ((extts->flags & PTP_STRICT_FLAGS) &&
766+
(extts->flags & PTP_ENABLE_FEATURE) &&
767+
(extts->flags & PTP_EXTTS_EDGES) != PTP_EXTTS_EDGES)
758768
return -EOPNOTSUPP;
759769

760770
rc = sja1105_change_ptp_clk_pin_func(priv, PTP_PF_EXTTS);

0 commit comments

Comments
 (0)