Skip to content

Commit 2a3a028

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Handle init flow failures properly in iwlwifi driver, from Shahar S Matityahu. 2) mac80211 TXQs need to be unscheduled on powersave start, from Felix Fietkau. 3) SKB memory accounting fix in A-MDSU aggregation, from Felix Fietkau. 4) Increase RCU lock hold time in mlx5 FPGA code, from Saeed Mahameed. 5) Avoid checksum complete with XDP in mlx5, also from Saeed. 6) Fix netdev feature clobbering in ibmvnic driver, from Thomas Falcon. 7) Partial sent TLS record leak fix from Jakub Kicinski. 8) Reject zero size iova range in vhost, from Jason Wang. 9) Allow pending work to complete before clcsock release from Karsten Graul. 10) Fix XDP handling max MTU in thunderx, from Matteo Croce. 11) A lot of protocols look at the sa_family field of a sockaddr before validating it's length is large enough, from Tetsuo Handa. 12) Don't write to free'd pointer in qede ptp error path, from Colin Ian King. 13) Have to recompile IP options in ipv4_link_failure because it can be invoked from ARP, from Stephen Suryaputra. 14) Doorbell handling fixes in qed from Denis Bolotin. 15) Revert net-sysfs kobject register leak fix, it causes new problems. From Wang Hai. 16) Spectre v1 fix in ATM code, from Gustavo A. R. Silva. 17) Fix put of BROPT_VLAN_STATS_PER_PORT in bridging code, from Nikolay Aleksandrov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (111 commits) socket: fix compat SO_RCVTIMEO_NEW/SO_SNDTIMEO_NEW tcp: tcp_grow_window() needs to respect tcp_space() ocelot: Clean up stats update deferred work ocelot: Don't sleep in atomic context (irqs_disabled()) net: bridge: fix netlink export of vlan_stats_per_port option qed: fix spelling mistake "faspath" -> "fastpath" tipc: set sysctl_tipc_rmem and named_timeout right range tipc: fix link established but not in session net: Fix missing meta data in skb with vlan packet net: atm: Fix potential Spectre v1 vulnerabilities net/core: work around section mismatch warning for ptp_classifier net: bridge: fix per-port af_packet sockets bnx2x: fix spelling mistake "dicline" -> "decline" route: Avoid crash from dereferencing NULL rt->from MAINTAINERS: normalize Woojung Huh's email address bonding: fix event handling for stacked bonds Revert "net-sysfs: Fix memory leak in netdev_register_kobject" rtnetlink: fix rtnl_valid_stats_req() nlmsg_len check qed: Fix the DORQ's attentions handling qed: Fix missing DORQ attentions ...
2 parents 444fe99 + e698642 commit 2a3a028

125 files changed

Lines changed: 1118 additions & 741 deletions

File tree

Some content is hidden

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

‎Documentation/networking/rxrpc.txt‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,16 +1009,18 @@ The kernel interface functions are as follows:
10091009

10101010
(*) Check call still alive.
10111011

1012-
u32 rxrpc_kernel_check_life(struct socket *sock,
1013-
struct rxrpc_call *call);
1012+
bool rxrpc_kernel_check_life(struct socket *sock,
1013+
struct rxrpc_call *call,
1014+
u32 *_life);
10141015
void rxrpc_kernel_probe_life(struct socket *sock,
10151016
struct rxrpc_call *call);
10161017

1017-
The first function returns a number that is updated when ACKs are received
1018-
from the peer (notably including PING RESPONSE ACKs which we can elicit by
1019-
sending PING ACKs to see if the call still exists on the server). The
1020-
caller should compare the numbers of two calls to see if the call is still
1021-
alive after waiting for a suitable interval.
1018+
The first function passes back in *_life a number that is updated when
1019+
ACKs are received from the peer (notably including PING RESPONSE ACKs
1020+
which we can elicit by sending PING ACKs to see if the call still exists
1021+
on the server). The caller should compare the numbers of two calls to see
1022+
if the call is still alive after waiting for a suitable interval. It also
1023+
returns true as long as the call hasn't yet reached the completed state.
10221024

10231025
This allows the caller to work out if the server is still contactable and
10241026
if the call is still alive on the server while waiting for the server to

‎MAINTAINERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10145,7 +10145,7 @@ F: drivers/spi/spi-at91-usart.c
1014510145
F: Documentation/devicetree/bindings/mfd/atmel-usart.txt
1014610146

1014710147
MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
10148-
M: Woojung Huh <Woojung.Huh@microchip.com>
10148+
M: Woojung Huh <woojung.huh@microchip.com>
1014910149
M: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
1015010150
L: netdev@vger.kernel.org
1015110151
S: Maintained

‎drivers/isdn/mISDN/socket.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,10 @@ base_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
710710
struct sock *sk = sock->sk;
711711
int err = 0;
712712

713-
if (!maddr || maddr->family != AF_ISDN)
713+
if (addr_len < sizeof(struct sockaddr_mISDN))
714714
return -EINVAL;
715715

716-
if (addr_len < sizeof(struct sockaddr_mISDN))
716+
if (!maddr || maddr->family != AF_ISDN)
717717
return -EINVAL;
718718

719719
lock_sock(sk);

‎drivers/net/bonding/bond_main.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3213,8 +3213,12 @@ static int bond_netdev_event(struct notifier_block *this,
32133213
return NOTIFY_DONE;
32143214

32153215
if (event_dev->flags & IFF_MASTER) {
3216+
int ret;
3217+
32163218
netdev_dbg(event_dev, "IFF_MASTER\n");
3217-
return bond_master_netdev_event(event, event_dev);
3219+
ret = bond_master_netdev_event(event, event_dev);
3220+
if (ret != NOTIFY_DONE)
3221+
return ret;
32183222
}
32193223

32203224
if (event_dev->flags & IFF_SLAVE) {

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ int bnx2x_vfpf_update_vlan(struct bnx2x *bp, u16 vid, u8 vf_qid, bool add)
957957
bnx2x_sample_bulletin(bp);
958958

959959
if (bp->shadow_bulletin.content.valid_bitmap & 1 << VLAN_VALID) {
960-
BNX2X_ERR("Hypervisor will dicline the request, avoiding\n");
960+
BNX2X_ERR("Hypervisor will decline the request, avoiding\n");
961961
rc = -EINVAL;
962962
goto out;
963963
}

‎drivers/net/ethernet/cavium/thunder/nicvf_main.c‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
#define DRV_NAME "nicvf"
3333
#define DRV_VERSION "1.0"
3434

35+
/* NOTE: Packets bigger than 1530 are split across multiple pages and XDP needs
36+
* the buffer to be contiguous. Allow XDP to be set up only if we don't exceed
37+
* this value, keeping headroom for the 14 byte Ethernet header and two
38+
* VLAN tags (for QinQ)
39+
*/
40+
#define MAX_XDP_MTU (1530 - ETH_HLEN - VLAN_HLEN * 2)
41+
3542
/* Supported devices */
3643
static const struct pci_device_id nicvf_id_table[] = {
3744
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM,
@@ -1582,6 +1589,15 @@ static int nicvf_change_mtu(struct net_device *netdev, int new_mtu)
15821589
struct nicvf *nic = netdev_priv(netdev);
15831590
int orig_mtu = netdev->mtu;
15841591

1592+
/* For now just support only the usual MTU sized frames,
1593+
* plus some headroom for VLAN, QinQ.
1594+
*/
1595+
if (nic->xdp_prog && new_mtu > MAX_XDP_MTU) {
1596+
netdev_warn(netdev, "Jumbo frames not yet supported with XDP, current MTU %d.\n",
1597+
netdev->mtu);
1598+
return -EINVAL;
1599+
}
1600+
15851601
netdev->mtu = new_mtu;
15861602

15871603
if (!netif_running(netdev))
@@ -1830,8 +1846,10 @@ static int nicvf_xdp_setup(struct nicvf *nic, struct bpf_prog *prog)
18301846
bool bpf_attached = false;
18311847
int ret = 0;
18321848

1833-
/* For now just support only the usual MTU sized frames */
1834-
if (prog && (dev->mtu > 1500)) {
1849+
/* For now just support only the usual MTU sized frames,
1850+
* plus some headroom for VLAN, QinQ.
1851+
*/
1852+
if (prog && dev->mtu > MAX_XDP_MTU) {
18351853
netdev_warn(dev, "Jumbo frames not yet supported with XDP, current MTU %d.\n",
18361854
dev->mtu);
18371855
return -EOPNOTSUPP;

‎drivers/net/ethernet/freescale/fec_main.c‎

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,13 +1840,9 @@ static int fec_enet_clk_enable(struct net_device *ndev, bool enable)
18401840
int ret;
18411841

18421842
if (enable) {
1843-
ret = clk_prepare_enable(fep->clk_ahb);
1844-
if (ret)
1845-
return ret;
1846-
18471843
ret = clk_prepare_enable(fep->clk_enet_out);
18481844
if (ret)
1849-
goto failed_clk_enet_out;
1845+
return ret;
18501846

18511847
if (fep->clk_ptp) {
18521848
mutex_lock(&fep->ptp_clk_mutex);
@@ -1866,7 +1862,6 @@ static int fec_enet_clk_enable(struct net_device *ndev, bool enable)
18661862

18671863
phy_reset_after_clk_enable(ndev->phydev);
18681864
} else {
1869-
clk_disable_unprepare(fep->clk_ahb);
18701865
clk_disable_unprepare(fep->clk_enet_out);
18711866
if (fep->clk_ptp) {
18721867
mutex_lock(&fep->ptp_clk_mutex);
@@ -1885,8 +1880,6 @@ static int fec_enet_clk_enable(struct net_device *ndev, bool enable)
18851880
failed_clk_ptp:
18861881
if (fep->clk_enet_out)
18871882
clk_disable_unprepare(fep->clk_enet_out);
1888-
failed_clk_enet_out:
1889-
clk_disable_unprepare(fep->clk_ahb);
18901883

18911884
return ret;
18921885
}
@@ -3470,6 +3463,9 @@ fec_probe(struct platform_device *pdev)
34703463
ret = clk_prepare_enable(fep->clk_ipg);
34713464
if (ret)
34723465
goto failed_clk_ipg;
3466+
ret = clk_prepare_enable(fep->clk_ahb);
3467+
if (ret)
3468+
goto failed_clk_ahb;
34733469

34743470
fep->reg_phy = devm_regulator_get_optional(&pdev->dev, "phy");
34753471
if (!IS_ERR(fep->reg_phy)) {
@@ -3563,6 +3559,9 @@ fec_probe(struct platform_device *pdev)
35633559
pm_runtime_put(&pdev->dev);
35643560
pm_runtime_disable(&pdev->dev);
35653561
failed_regulator:
3562+
clk_disable_unprepare(fep->clk_ahb);
3563+
failed_clk_ahb:
3564+
clk_disable_unprepare(fep->clk_ipg);
35663565
failed_clk_ipg:
35673566
fec_enet_clk_enable(ndev, false);
35683567
failed_clk:
@@ -3686,6 +3685,7 @@ static int __maybe_unused fec_runtime_suspend(struct device *dev)
36863685
struct net_device *ndev = dev_get_drvdata(dev);
36873686
struct fec_enet_private *fep = netdev_priv(ndev);
36883687

3688+
clk_disable_unprepare(fep->clk_ahb);
36893689
clk_disable_unprepare(fep->clk_ipg);
36903690

36913691
return 0;
@@ -3695,8 +3695,20 @@ static int __maybe_unused fec_runtime_resume(struct device *dev)
36953695
{
36963696
struct net_device *ndev = dev_get_drvdata(dev);
36973697
struct fec_enet_private *fep = netdev_priv(ndev);
3698+
int ret;
36983699

3699-
return clk_prepare_enable(fep->clk_ipg);
3700+
ret = clk_prepare_enable(fep->clk_ahb);
3701+
if (ret)
3702+
return ret;
3703+
ret = clk_prepare_enable(fep->clk_ipg);
3704+
if (ret)
3705+
goto failed_clk_ipg;
3706+
3707+
return 0;
3708+
3709+
failed_clk_ipg:
3710+
clk_disable_unprepare(fep->clk_ahb);
3711+
return ret;
37003712
}
37013713

37023714
static const struct dev_pm_ops fec_pm_ops = {

‎drivers/net/ethernet/ibm/ibmvnic.c‎

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3762,6 +3762,7 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
37623762
{
37633763
struct device *dev = &adapter->vdev->dev;
37643764
struct ibmvnic_query_ip_offload_buffer *buf = &adapter->ip_offload_buf;
3765+
netdev_features_t old_hw_features = 0;
37653766
union ibmvnic_crq crq;
37663767
int i;
37673768

@@ -3837,24 +3838,41 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
38373838
adapter->ip_offload_ctrl.large_rx_ipv4 = 0;
38383839
adapter->ip_offload_ctrl.large_rx_ipv6 = 0;
38393840

3840-
adapter->netdev->features = NETIF_F_SG | NETIF_F_GSO;
3841+
if (adapter->state != VNIC_PROBING) {
3842+
old_hw_features = adapter->netdev->hw_features;
3843+
adapter->netdev->hw_features = 0;
3844+
}
3845+
3846+
adapter->netdev->hw_features = NETIF_F_SG | NETIF_F_GSO | NETIF_F_GRO;
38413847

38423848
if (buf->tcp_ipv4_chksum || buf->udp_ipv4_chksum)
3843-
adapter->netdev->features |= NETIF_F_IP_CSUM;
3849+
adapter->netdev->hw_features |= NETIF_F_IP_CSUM;
38443850

38453851
if (buf->tcp_ipv6_chksum || buf->udp_ipv6_chksum)
3846-
adapter->netdev->features |= NETIF_F_IPV6_CSUM;
3852+
adapter->netdev->hw_features |= NETIF_F_IPV6_CSUM;
38473853

38483854
if ((adapter->netdev->features &
38493855
(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)))
3850-
adapter->netdev->features |= NETIF_F_RXCSUM;
3856+
adapter->netdev->hw_features |= NETIF_F_RXCSUM;
38513857

38523858
if (buf->large_tx_ipv4)
3853-
adapter->netdev->features |= NETIF_F_TSO;
3859+
adapter->netdev->hw_features |= NETIF_F_TSO;
38543860
if (buf->large_tx_ipv6)
3855-
adapter->netdev->features |= NETIF_F_TSO6;
3861+
adapter->netdev->hw_features |= NETIF_F_TSO6;
38563862

3857-
adapter->netdev->hw_features |= adapter->netdev->features;
3863+
if (adapter->state == VNIC_PROBING) {
3864+
adapter->netdev->features |= adapter->netdev->hw_features;
3865+
} else if (old_hw_features != adapter->netdev->hw_features) {
3866+
netdev_features_t tmp = 0;
3867+
3868+
/* disable features no longer supported */
3869+
adapter->netdev->features &= adapter->netdev->hw_features;
3870+
/* turn on features now supported if previously enabled */
3871+
tmp = (old_hw_features ^ adapter->netdev->hw_features) &
3872+
adapter->netdev->hw_features;
3873+
adapter->netdev->features |=
3874+
tmp & adapter->netdev->wanted_features;
3875+
}
38583876

38593877
memset(&crq, 0, sizeof(crq));
38603878
crq.control_ip_offload.first = IBMVNIC_CRQ_CMD;

‎drivers/net/ethernet/mellanox/mlx5/core/en.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ void mlx5e_close_channels(struct mlx5e_channels *chs);
858858
* switching channels
859859
*/
860860
typedef int (*mlx5e_fp_hw_modify)(struct mlx5e_priv *priv);
861+
int mlx5e_safe_reopen_channels(struct mlx5e_priv *priv);
861862
int mlx5e_safe_switch_channels(struct mlx5e_priv *priv,
862863
struct mlx5e_channels *new_chs,
863864
mlx5e_fp_hw_modify hw_modify);

‎drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,17 @@ static int mlx5e_tx_reporter_recover_from_ctx(struct mlx5e_tx_err_ctx *err_ctx)
186186

187187
static int mlx5e_tx_reporter_recover_all(struct mlx5e_priv *priv)
188188
{
189-
int err;
189+
int err = 0;
190190

191191
rtnl_lock();
192192
mutex_lock(&priv->state_lock);
193-
mlx5e_close_locked(priv->netdev);
194-
err = mlx5e_open_locked(priv->netdev);
193+
194+
if (!test_bit(MLX5E_STATE_OPENED, &priv->state))
195+
goto out;
196+
197+
err = mlx5e_safe_reopen_channels(priv);
198+
199+
out:
195200
mutex_unlock(&priv->state_lock);
196201
rtnl_unlock();
197202

0 commit comments

Comments
 (0)