mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Cross-tree/merge window issues:
- rtl8150: don't incorrectly assign random MAC addresses; fix late in
the 5.9 cycle started depending on a return code from a function
which changed with the 5.10 PR from the usb subsystem
Current release regressions:
- Revert "virtio-net: ethtool configurable RXCSUM", it was causing
crashes at probe when control vq was not negotiated/available
Previous release regressions:
- ixgbe: fix probing of multi-port 10 Gigabit Intel NICs with an MDIO
bus, only first device would be probed correctly
- nexthop: Fix performance regression in nexthop deletion by
effectively switching from recently added synchronize_rcu() to
synchronize_rcu_expedited()
- netsec: ignore 'phy-mode' device property on ACPI systems; the
property is not populated correctly by the firmware, but firmware
configures the PHY so just keep boot settings
Previous releases - always broken:
- tcp: fix to update snd_wl1 in bulk receiver fast path, addressing
bulk transfers getting "stuck"
- icmp: randomize the global rate limiter to prevent attackers from
getting useful signal
- r8169: fix operation under forced interrupt threading, make the
driver always use hard irqs, even on RT, given the handler is light
and only wants to schedule napi (and do so through a _irqoff()
variant, preferably)
- bpf: Enforce pointer id generation for all may-be-null register
type to avoid pointers erroneously getting marked as null-checked
- tipc: re-configure queue limit for broadcast link
- net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN
tunnels
- fix various issues in chelsio inline tls driver
Misc:
- bpf: improve just-added bpf_redirect_neigh() helper api to support
supplying nexthop by the caller - in case BPF program has already
done a lookup we can avoid doing another one
- remove unnecessary break statements
- make MCTCP not select IPV6, but rather depend on it"
* tag 'net-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits)
tcp: fix to update snd_wl1 in bulk receiver fast path
net: Properly typecast int values to set sk_max_pacing_rate
netfilter: nf_fwd_netdev: clear timestamp in forwarding path
ibmvnic: save changed mac address to adapter->mac_addr
selftests: mptcp: depends on built-in IPv6
Revert "virtio-net: ethtool configurable RXCSUM"
rtnetlink: fix data overflow in rtnl_calcit()
net: ethernet: mtk-star-emac: select REGMAP_MMIO
net: hdlc_raw_eth: Clear the IFF_TX_SKB_SHARING flag after calling ether_setup
net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device
bpf, libbpf: Guard bpf inline asm from bpf_tail_call_static
bpf, selftests: Extend test_tc_redirect to use modified bpf_redirect_neigh()
bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop
mptcp: depends on IPV6 but not as a module
sfc: move initialisation of efx->filter_sem to efx_init_struct()
mpls: load mpls_gso after mpls_iptunnel
net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels
net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action()
net: dsa: bcm_sf2: make const array static, makes object smaller
mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it
...
This commit is contained in:
@@ -30,7 +30,9 @@ Optional properties: (See ethernet.txt file in the same directory)
|
||||
- max-frame-size: See ethernet.txt in the same directory.
|
||||
|
||||
The MAC address will be determined using the optional properties
|
||||
defined in ethernet.txt.
|
||||
defined in ethernet.txt. The 'phy-mode' property is required, but may
|
||||
be set to the empty string if the PHY configuration is programmed by
|
||||
the firmware or set by hardware straps, and needs to be preserved.
|
||||
|
||||
Example:
|
||||
eth0: ethernet@522d0000 {
|
||||
|
||||
@@ -1142,13 +1142,15 @@ icmp_ratelimit - INTEGER
|
||||
icmp_msgs_per_sec - INTEGER
|
||||
Limit maximal number of ICMP packets sent per second from this host.
|
||||
Only messages whose type matches icmp_ratemask (see below) are
|
||||
controlled by this limit.
|
||||
controlled by this limit. For security reasons, the precise count
|
||||
of messages per second is randomized.
|
||||
|
||||
Default: 1000
|
||||
|
||||
icmp_msgs_burst - INTEGER
|
||||
icmp_msgs_per_sec controls number of ICMP packets sent per second,
|
||||
while icmp_msgs_burst controls the burst size of these packets.
|
||||
For security reasons, the precise burst size is randomized.
|
||||
|
||||
Default: 50
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ More reading
|
||||
This documentation is based on the LWN.net articles [1]_\ [2]_. Rafal Milecki
|
||||
also made a very complete and comprehensive summary called "A state of network
|
||||
acceleration" that describes how things were before this infrastructure was
|
||||
mailined [3]_ and it also makes a rough summary of this work [4]_.
|
||||
mainlined [3]_ and it also makes a rough summary of this work [4]_.
|
||||
|
||||
.. [1] https://lwn.net/Articles/738214/
|
||||
.. [2] https://lwn.net/Articles/742164/
|
||||
|
||||
@@ -3244,7 +3244,8 @@ R: KP Singh <kpsingh@chromium.org>
|
||||
L: netdev@vger.kernel.org
|
||||
L: bpf@vger.kernel.org
|
||||
S: Supported
|
||||
Q: https://patchwork.ozlabs.org/project/netdev/list/?delegate=77147
|
||||
W: https://bpf.io/
|
||||
Q: https://patchwork.kernel.org/project/netdevbpf/list/?delegate=121173
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
|
||||
F: Documentation/bpf/
|
||||
|
||||
@@ -54,7 +54,7 @@ static void bcm_sf2_recalc_clock(struct dsa_switch *ds)
|
||||
unsigned long new_rate;
|
||||
unsigned int ports_active;
|
||||
/* Frequenty in Mhz */
|
||||
const unsigned long rate_table[] = {
|
||||
static const unsigned long rate_table[] = {
|
||||
59220000,
|
||||
60820000,
|
||||
62500000,
|
||||
|
||||
@@ -1181,7 +1181,7 @@ static const struct felix_info seville_info_vsc9953 = {
|
||||
.stats_layout = vsc9953_stats_layout,
|
||||
.num_stats = ARRAY_SIZE(vsc9953_stats_layout),
|
||||
.vcap = vsc9953_vcap_props,
|
||||
.shared_queue_sz = 2048 * 1024,
|
||||
.shared_queue_sz = 256 * 1024,
|
||||
.num_mact_rows = 2048,
|
||||
.num_ports = 10,
|
||||
.mdio_bus_alloc = vsc9953_mdio_bus_alloc,
|
||||
|
||||
@@ -1163,7 +1163,6 @@ int aq_nic_set_link_ksettings(struct aq_nic_s *self,
|
||||
default:
|
||||
err = -1;
|
||||
goto err_exit;
|
||||
break;
|
||||
}
|
||||
if (!(self->aq_nic_cfg.aq_hw_caps->link_speed_msk & rate)) {
|
||||
err = -1;
|
||||
|
||||
@@ -16,6 +16,7 @@ if CHELSIO_INLINE_CRYPTO
|
||||
config CRYPTO_DEV_CHELSIO_TLS
|
||||
tristate "Chelsio Crypto Inline TLS Driver"
|
||||
depends on CHELSIO_T4
|
||||
depends on TLS
|
||||
depends on TLS_TOE
|
||||
help
|
||||
Support Chelsio Inline TLS with Chelsio crypto accelerator.
|
||||
|
||||
@@ -92,11 +92,13 @@ static void chtls_sock_release(struct kref *ref)
|
||||
static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
|
||||
struct sock *sk)
|
||||
{
|
||||
struct adapter *adap = pci_get_drvdata(cdev->pdev);
|
||||
struct net_device *ndev = cdev->ports[0];
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
struct net_device *temp;
|
||||
int addr_type;
|
||||
#endif
|
||||
int i;
|
||||
|
||||
switch (sk->sk_family) {
|
||||
case PF_INET:
|
||||
@@ -127,8 +129,12 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
|
||||
return NULL;
|
||||
|
||||
if (is_vlan_dev(ndev))
|
||||
return vlan_dev_real_dev(ndev);
|
||||
return ndev;
|
||||
ndev = vlan_dev_real_dev(ndev);
|
||||
|
||||
for_each_port(adap, i)
|
||||
if (cdev->ports[i] == ndev)
|
||||
return ndev;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void assign_rxopt(struct sock *sk, unsigned int opt)
|
||||
@@ -477,7 +483,6 @@ void chtls_destroy_sock(struct sock *sk)
|
||||
chtls_purge_write_queue(sk);
|
||||
free_tls_keyid(sk);
|
||||
kref_put(&csk->kref, chtls_sock_release);
|
||||
csk->cdev = NULL;
|
||||
if (sk->sk_family == AF_INET)
|
||||
sk->sk_prot = &tcp_prot;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
@@ -736,14 +741,13 @@ void chtls_listen_stop(struct chtls_dev *cdev, struct sock *sk)
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (sk->sk_family == PF_INET6) {
|
||||
struct chtls_sock *csk;
|
||||
struct net_device *ndev = chtls_find_netdev(cdev, sk);
|
||||
int addr_type = 0;
|
||||
|
||||
csk = rcu_dereference_sk_user_data(sk);
|
||||
addr_type = ipv6_addr_type((const struct in6_addr *)
|
||||
&sk->sk_v6_rcv_saddr);
|
||||
if (addr_type != IPV6_ADDR_ANY)
|
||||
cxgb4_clip_release(csk->egress_dev, (const u32 *)
|
||||
cxgb4_clip_release(ndev, (const u32 *)
|
||||
&sk->sk_v6_rcv_saddr, 1);
|
||||
}
|
||||
#endif
|
||||
@@ -1157,6 +1161,9 @@ static struct sock *chtls_recv_sock(struct sock *lsk,
|
||||
ndev = n->dev;
|
||||
if (!ndev)
|
||||
goto free_dst;
|
||||
if (is_vlan_dev(ndev))
|
||||
ndev = vlan_dev_real_dev(ndev);
|
||||
|
||||
port_id = cxgb4_port_idx(ndev);
|
||||
|
||||
csk = chtls_sock_create(cdev);
|
||||
|
||||
@@ -902,9 +902,9 @@ static int chtls_skb_copy_to_page_nocache(struct sock *sk,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
|
||||
static bool csk_mem_free(struct chtls_dev *cdev, struct sock *sk)
|
||||
{
|
||||
return (cdev->max_host_sndbuf - sk->sk_wmem_queued);
|
||||
return (cdev->max_host_sndbuf - sk->sk_wmem_queued > 0);
|
||||
}
|
||||
|
||||
static int csk_wait_memory(struct chtls_dev *cdev,
|
||||
@@ -1240,6 +1240,7 @@ int chtls_sendpage(struct sock *sk, struct page *page,
|
||||
copied = 0;
|
||||
csk = rcu_dereference_sk_user_data(sk);
|
||||
cdev = csk->cdev;
|
||||
lock_sock(sk);
|
||||
timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
|
||||
|
||||
err = sk_stream_wait_connect(sk, &timeo);
|
||||
|
||||
@@ -434,7 +434,6 @@ static int enic_grxclsrule(struct enic *enic, struct ethtool_rxnfc *cmd)
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
fsp->h_u.tcp_ip4_spec.ip4src = flow_get_u32_src(&n->keys);
|
||||
|
||||
@@ -1817,6 +1817,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
|
||||
priv->rxdes0_edorr_mask = BIT(30);
|
||||
priv->txdes0_edotr_mask = BIT(30);
|
||||
priv->is_aspeed = true;
|
||||
/* Disable ast2600 problematic HW arbitration */
|
||||
if (of_device_is_compatible(np, "aspeed,ast2600-mac")) {
|
||||
iowrite32(FTGMAC100_TM_DEFAULT,
|
||||
priv->base + FTGMAC100_OFFSET_TM);
|
||||
}
|
||||
} else {
|
||||
priv->rxdes0_edorr_mask = BIT(15);
|
||||
priv->txdes0_edotr_mask = BIT(15);
|
||||
|
||||
@@ -169,6 +169,14 @@
|
||||
#define FTGMAC100_MACCR_FAST_MODE (1 << 19)
|
||||
#define FTGMAC100_MACCR_SW_RST (1 << 31)
|
||||
|
||||
/*
|
||||
* test mode control register
|
||||
*/
|
||||
#define FTGMAC100_TM_RQ_TX_VALID_DIS (1 << 28)
|
||||
#define FTGMAC100_TM_RQ_RR_IDLE_PREV (1 << 27)
|
||||
#define FTGMAC100_TM_DEFAULT \
|
||||
(FTGMAC100_TM_RQ_TX_VALID_DIS | FTGMAC100_TM_RQ_RR_IDLE_PREV)
|
||||
|
||||
/*
|
||||
* PHY control register
|
||||
*/
|
||||
|
||||
@@ -4235,8 +4235,13 @@ static int handle_change_mac_rsp(union ibmvnic_crq *crq,
|
||||
dev_err(dev, "Error %ld in CHANGE_MAC_ADDR_RSP\n", rc);
|
||||
goto out;
|
||||
}
|
||||
/* crq->change_mac_addr.mac_addr is the requested one
|
||||
* crq->change_mac_addr_rsp.mac_addr is the returned valid one.
|
||||
*/
|
||||
ether_addr_copy(netdev->dev_addr,
|
||||
&crq->change_mac_addr_rsp.mac_addr[0]);
|
||||
ether_addr_copy(adapter->mac_addr,
|
||||
&crq->change_mac_addr_rsp.mac_addr[0]);
|
||||
out:
|
||||
complete(&adapter->fw_done);
|
||||
return rc;
|
||||
|
||||
@@ -901,15 +901,13 @@ static bool ixgbe_x550em_a_has_mii(struct ixgbe_hw *hw)
|
||||
**/
|
||||
s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw)
|
||||
{
|
||||
s32 (*write)(struct mii_bus *bus, int addr, int regnum, u16 val);
|
||||
s32 (*read)(struct mii_bus *bus, int addr, int regnum);
|
||||
struct ixgbe_adapter *adapter = hw->back;
|
||||
struct pci_dev *pdev = adapter->pdev;
|
||||
struct device *dev = &adapter->netdev->dev;
|
||||
struct mii_bus *bus;
|
||||
|
||||
bus = devm_mdiobus_alloc(dev);
|
||||
if (!bus)
|
||||
return -ENOMEM;
|
||||
|
||||
switch (hw->device_id) {
|
||||
/* C3000 SoCs */
|
||||
case IXGBE_DEV_ID_X550EM_A_KR:
|
||||
@@ -922,16 +920,23 @@ s32 ixgbe_mii_bus_init(struct ixgbe_hw *hw)
|
||||
case IXGBE_DEV_ID_X550EM_A_1G_T:
|
||||
case IXGBE_DEV_ID_X550EM_A_1G_T_L:
|
||||
if (!ixgbe_x550em_a_has_mii(hw))
|
||||
return -ENODEV;
|
||||
bus->read = &ixgbe_x550em_a_mii_bus_read;
|
||||
bus->write = &ixgbe_x550em_a_mii_bus_write;
|
||||
return 0;
|
||||
read = &ixgbe_x550em_a_mii_bus_read;
|
||||
write = &ixgbe_x550em_a_mii_bus_write;
|
||||
break;
|
||||
default:
|
||||
bus->read = &ixgbe_mii_bus_read;
|
||||
bus->write = &ixgbe_mii_bus_write;
|
||||
read = &ixgbe_mii_bus_read;
|
||||
write = &ixgbe_mii_bus_write;
|
||||
break;
|
||||
}
|
||||
|
||||
bus = devm_mdiobus_alloc(dev);
|
||||
if (!bus)
|
||||
return -ENOMEM;
|
||||
|
||||
bus->read = read;
|
||||
bus->write = write;
|
||||
|
||||
/* Use the position of the device in the PCI hierarchy as the id */
|
||||
snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mdio-%s", ixgbe_driver_name,
|
||||
pci_name(pdev));
|
||||
|
||||
@@ -350,7 +350,6 @@ static s32 ixgbe_calc_eeprom_checksum_X540(struct ixgbe_hw *hw)
|
||||
if (ixgbe_read_eerd_generic(hw, pointer, &length)) {
|
||||
hw_dbg(hw, "EEPROM read failed\n");
|
||||
return IXGBE_ERR_EEPROM;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Skip pointer section if length is invalid. */
|
||||
|
||||
@@ -1113,7 +1113,7 @@ out:
|
||||
return rc;
|
||||
|
||||
probe_err_register:
|
||||
kfree(KSEG0ADDR(lp->td_ring));
|
||||
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
|
||||
probe_err_td_ring:
|
||||
iounmap(lp->tx_dma_regs);
|
||||
probe_err_dma_tx:
|
||||
@@ -1133,7 +1133,7 @@ static int korina_remove(struct platform_device *pdev)
|
||||
iounmap(lp->eth_regs);
|
||||
iounmap(lp->rx_dma_regs);
|
||||
iounmap(lp->tx_dma_regs);
|
||||
kfree(KSEG0ADDR(lp->td_ring));
|
||||
kfree((struct dma_desc *)KSEG0ADDR(lp->td_ring));
|
||||
|
||||
unregister_netdev(bif->dev);
|
||||
free_netdev(bif->dev);
|
||||
|
||||
@@ -17,6 +17,7 @@ config NET_MEDIATEK_SOC
|
||||
config NET_MEDIATEK_STAR_EMAC
|
||||
tristate "MediaTek STAR Ethernet MAC support"
|
||||
select PHYLIB
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
This driver supports the ethernet MAC IP first used on
|
||||
MediaTek MT85** SoCs.
|
||||
|
||||
@@ -4694,7 +4694,7 @@ static int rtl8169_close(struct net_device *dev)
|
||||
|
||||
phy_disconnect(tp->phydev);
|
||||
|
||||
pci_free_irq(pdev, 0, tp);
|
||||
free_irq(pci_irq_vector(pdev, 0), tp);
|
||||
|
||||
dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray,
|
||||
tp->RxPhyAddr);
|
||||
@@ -4745,8 +4745,8 @@ static int rtl_open(struct net_device *dev)
|
||||
|
||||
rtl_request_firmware(tp);
|
||||
|
||||
retval = pci_request_irq(pdev, 0, rtl8169_interrupt, NULL, tp,
|
||||
dev->name);
|
||||
retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,
|
||||
IRQF_NO_THREAD | IRQF_SHARED, dev->name, tp);
|
||||
if (retval < 0)
|
||||
goto err_release_fw_2;
|
||||
|
||||
@@ -4763,7 +4763,7 @@ out:
|
||||
return retval;
|
||||
|
||||
err_free_irq:
|
||||
pci_free_irq(pdev, 0, tp);
|
||||
free_irq(pci_irq_vector(pdev, 0), tp);
|
||||
err_release_fw_2:
|
||||
rtl_release_firmware(tp);
|
||||
rtl8169_rx_clear(tp);
|
||||
|
||||
@@ -1014,6 +1014,7 @@ int efx_init_struct(struct efx_nic *efx,
|
||||
efx->num_mac_stats = MC_CMD_MAC_NSTATS;
|
||||
BUILD_BUG_ON(MC_CMD_MAC_NSTATS - 1 != MC_CMD_MAC_GENERATION_END);
|
||||
mutex_init(&efx->mac_lock);
|
||||
init_rwsem(&efx->filter_sem);
|
||||
#ifdef CONFIG_RFS_ACCEL
|
||||
mutex_init(&efx->rps_mutex);
|
||||
spin_lock_init(&efx->rps_hash_lock);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user