* [PATCH 14/33] net: hns3: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:18 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Yisen Zhuang, Salil Mehta
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114789 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index bd031af..a64d69c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2104,6 +2104,7 @@ static void hns3_rx_checksum(struct hns3_enet_ring *ring, struct sk_buff *skb,
case HNS3_OL4_TYPE_MAC_IN_UDP:
case HNS3_OL4_TYPE_NVGRE:
skb->csum_level = 1;
+ /* fall through */
case HNS3_OL4_TYPE_NO_TUN:
/* Can checksum ipv4 or ipv6 + UDP/TCP/SCTP packets */
if ((l3_type == HNS3_L3_TYPE_IPV4 ||
--
2.7.4
^ permalink raw reply related
* [PATCH 13/33] net: hns: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:17 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Yisen Zhuang, Salil Mehta
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114788 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 3957205..08f3c47 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -307,6 +307,7 @@ static int __lb_setup(struct net_device *ndev,
break;
case MAC_LOOP_PHY_NONE:
ret = hns_nic_config_phy_loopback(phy_dev, 0x0);
+ /* fall through */
case MAC_LOOP_NONE:
if (!ret && h->dev->ops->set_loopback) {
if (priv->ae_handle->phy_if != PHY_INTERFACE_MODE_XGMII)
--
2.7.4
^ permalink raw reply related
* [PATCH 11/33] net: tulip: de4x5: mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:16 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: linux-parisc
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114784 ("Missing break in switch")
Addresses-Coverity-ID: 114785 ("Missing break in switch")
Addresses-Coverity-ID: 114786 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/dec/tulip/de4x5.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index a31b4df..66535d1 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -3204,6 +3204,8 @@ srom_map_media(struct net_device *dev)
case SROM_10BASETF:
if (!lp->params.fdx) return -1;
lp->fdx = true;
+ /* fall through */
+
case SROM_10BASET:
if (lp->params.fdx && !lp->fdx) return -1;
if ((lp->chipset == DC21140) || ((lp->chipset & ~0x00ff) == DC2114x)) {
@@ -3224,6 +3226,8 @@ srom_map_media(struct net_device *dev)
case SROM_100BASETF:
if (!lp->params.fdx) return -1;
lp->fdx = true;
+ /* fall through */
+
case SROM_100BASET:
if (lp->params.fdx && !lp->fdx) return -1;
lp->media = _100Mb;
@@ -3236,6 +3240,8 @@ srom_map_media(struct net_device *dev)
case SROM_100BASEFF:
if (!lp->params.fdx) return -1;
lp->fdx = true;
+ /* fall through */
+
case SROM_100BASEF:
if (lp->params.fdx && !lp->fdx) return -1;
lp->media = _100Mb;
--
2.7.4
^ permalink raw reply related
* [PATCH 09/33] net: thunderx: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:15 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Sunil Goutham, Robert Richter, linux-arm-kernel
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114781 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index 5603f5a..92ba958 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -527,6 +527,7 @@ static int nicvf_get_rss_hash_opts(struct nicvf *nic,
case SCTP_V4_FLOW:
case SCTP_V6_FLOW:
info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* Fall through */
case IPV4_FLOW:
case IPV6_FLOW:
info->data |= RXH_IP_SRC | RXH_IP_DST;
--
2.7.4
^ permalink raw reply related
* [PATCH 07/33] cxgb4/t4_hw: mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:13 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Ganesh Goudar
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114777 ("Missing break in switch")
Addresses-Coverity-ID: 114778 ("Missing break in switch")
Addresses-Coverity-ID: 114779 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 2d9943f..5fe5d16 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -7504,10 +7504,13 @@ int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
switch (nmac) {
case 5:
memcpy(mac + 24, c.nmac3, sizeof(c.nmac3));
+ /* Fall through */
case 4:
memcpy(mac + 18, c.nmac2, sizeof(c.nmac2));
+ /* Fall through */
case 3:
memcpy(mac + 12, c.nmac1, sizeof(c.nmac1));
+ /* Fall through */
case 2:
memcpy(mac + 6, c.nmac0, sizeof(c.nmac0));
}
--
2.7.4
^ permalink raw reply related
* [PATCH 06/33] cxgb4/l2t: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:13 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Ganesh Goudar
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114910 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/chelsio/cxgb4/l2t.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
index 77c2c53..301c4df 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
@@ -231,6 +231,7 @@ int cxgb4_l2t_send(struct net_device *dev, struct sk_buff *skb,
if (e->state == L2T_STATE_STALE)
e->state = L2T_STATE_VALID;
spin_unlock_bh(&e->lock);
+ /* fall through */
case L2T_STATE_VALID: /* fast-path, send the packet on */
return t4_ofld_send(adap, skb);
case L2T_STATE_RESOLVING:
--
2.7.4
^ permalink raw reply related
* [PATCH 05/33] liquidio: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:13 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 143135 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 8ef87a7..6fb13fa 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -2209,6 +2209,7 @@ static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
case SIOCSHWTSTAMP:
if (lio->oct_dev->ptp_enable)
return hwtstamp_ioctl(netdev, ifr);
+ /* fall through */
default:
return -EOPNOTSUPP;
}
--
2.7.4
^ permalink raw reply related
* [PATCH 03/33] bnx2x: Mark expected switch fall-thoughs
From: Gustavo A. R. Silva @ 2018-08-07 23:11 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Michael Chan
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114878 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d7f51ab..8bb1e38 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1729,8 +1729,8 @@ static int bnxt_async_event_process(struct bnxt *bp,
speed);
}
set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
- /* fall through */
}
+ /* fall through */
case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);
break;
--
2.7.4
^ permalink raw reply related
* [PATCH 04/33] net: macb: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:11 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Nicolas Ferre
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/cadence/macb_ptp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/cadence/macb_ptp.c b/drivers/net/ethernet/cadence/macb_ptp.c
index 6788351..cd5296b8 100644
--- a/drivers/net/ethernet/cadence/macb_ptp.c
+++ b/drivers/net/ethernet/cadence/macb_ptp.c
@@ -466,6 +466,7 @@ int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
case HWTSTAMP_TX_ONESTEP_SYNC:
if (gem_ptp_set_one_step_sync(bp, 1) != 0)
return -ERANGE;
+ /* fall through */
case HWTSTAMP_TX_ON:
tx_bd_control = TSTAMP_ALL_FRAMES;
break;
--
2.7.4
^ permalink raw reply related
* [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2018-08-07 23:09 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Solarflare linux maintainers, Edward Cree, Bert Kenward,
Jes Sorensen, linux-acenic, Michael Chan, Nicolas Ferre,
Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
Ganesh Goudar, Santosh Raspatur, Sunil Goutham, Robert Richter,
linux-arm-kernel, linux-parisc, Sathya Perla, Ajit
Hi all,
In preparation to enabling -Wimplicit-fallthrough, this patchset aims
to add some annotations in order to mark switch cases where we are
expecting to fall through.
Thanks
Gustavo A. R. Silva (33):
8390: axnet_cs: Mark expected switch fall-through
alteon: acenic: mark expected switch fall-through
bnx2x: Mark expected switch fall-thoughs
net: macb: Mark expected switch fall-through
liquidio: mark expected switch fall-through
cxgb4/l2t: Mark expected switch fall-through
cxgb4/t4_hw: mark expected switch fall-throughs
cxgb3/l2t: Mark expected switch fall-through
net: thunderx: mark expected switch fall-through
net: tulip_core: mark expected switch fall-through
net: tulip: de4x5: mark expected switch fall-throughs
be2net: Mark expected switch fall-through
net: hns: Mark expected switch fall-through
net: hns3: Mark expected switch fall-through
i40e_main: mark expected switch fall-through
i40e_txrx: mark expected switch fall-through
net/mlx4/mcg: Mark expected switch fall-throughs
net/mlx4/en_rx: Mark expected switch fall-throughs
igb_main: Mark expected switch fall-throughs
igb: e1000_82575: Mark expected switch fall-through
igb: e1000_phy: Mark expected switch fall-through
igbvf: netdev: Mark expected switch fall-through
vxge: Mark expected switch fall-throughs
net/mlx5e: Mark expected switch fall-throughs
qed: qed_dev: Mark expected switch fall-throughs
netxen_nic: Mark expected switch fall-throughs
qede: qede_fp: Mark expected switch fall-through
qlcnic: Mark expected switch fall-througs
qlge: mark expected switch fall-through
net: ethernet: sxgbe: mark expected switch fall-throughs
net: sfc: falcon: mark expected switch fall-through
net: tlan: Mark expected switch fall-through
net: ethernet: ti: cpts: mark expected switch fall-through
drivers/net/ethernet/8390/axnet_cs.c | 1 +
drivers/net/ethernet/alteon/acenic.c | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
drivers/net/ethernet/cadence/macb_ptp.c | 1 +
drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 +
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 1 +
drivers/net/ethernet/chelsio/cxgb3/l2t.c | 1 +
drivers/net/ethernet/chelsio/cxgb4/l2t.c | 1 +
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 +++
drivers/net/ethernet/dec/tulip/de4x5.c | 6 ++++++
drivers/net/ethernet/dec/tulip/tulip_core.c | 1 +
drivers/net/ethernet/emulex/benet/be_ethtool.c | 1 +
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 1 +
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++-
drivers/net/ethernet/intel/igb/e1000_82575.c | 1 +
drivers/net/ethernet/intel/igb/e1000_phy.c | 1 +
drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
drivers/net/ethernet/intel/igbvf/netdev.c | 1 +
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 ++
drivers/net/ethernet/mellanox/mlx4/mcg.c | 2 ++
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++
drivers/net/ethernet/neterion/vxge/vxge-config.c | 3 +++
drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 3 ++-
drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++--
drivers/net/ethernet/qlogic/qede/qede_fp.c | 2 ++
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 3 ++-
drivers/net/ethernet/qlogic/qlge/qlge_mpi.c | 1 +
drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c | 2 ++
drivers/net/ethernet/sfc/falcon/ethtool.c | 1 +
drivers/net/ethernet/ti/cpts.c | 1 +
drivers/net/ethernet/ti/tlan.c | 1 +
33 files changed, 52 insertions(+), 6 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH 02/33] alteon: acenic: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:09 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Jes Sorensen, linux-acenic
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114891 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/alteon/acenic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c
index 08945ba..4f11f98 100644
--- a/drivers/net/ethernet/alteon/acenic.c
+++ b/drivers/net/ethernet/alteon/acenic.c
@@ -551,6 +551,7 @@ static int acenic_probe_one(struct pci_dev *pdev,
ap->name);
break;
}
+ /* Fall through */
case PCI_VENDOR_ID_SGI:
printk(KERN_INFO "%s: SGI AceNIC ", ap->name);
break;
--
2.7.4
^ permalink raw reply related
* Re: [PATCH net-next] selftests: forwarding: gre_multipath: Update next-hop statistics match criteria
From: David Miller @ 2018-08-07 23:02 UTC (permalink / raw)
To: nird; +Cc: netdev, mlxsw
In-Reply-To: <20180807164155.2831-1-nird@mellanox.com>
From: Nir Dotan <nird@mellanox.com>
Date: Tue, 7 Aug 2018 19:41:55 +0300
> gre_multipath test was using egress vlan_id matching on flows, for the
> purpose of collecting next-hops statistics, later to be compared
> against configured weights.
> As matching on vlan_id on egress direction is not supported on all HW
> devices, change the match criteria to use destination IP.
>
> Signed-off-by: Nir Dotan <nird@mellanox.com>
> Acked-by: Petr Machata <petrm@mellanox.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 1/1] tc-tests: initial version of nat action unit tests
From: David Miller @ 2018-08-07 22:55 UTC (permalink / raw)
To: kleib; +Cc: netdev, jhs, xiyou.wangcong, jiri, lucasb
In-Reply-To: <1533669523-3935-1-git-send-email-kleib@mojatatu.com>
From: Keara Leibovitz <kleib@mojatatu.com>
Date: Tue, 7 Aug 2018 15:18:43 -0400
> Initial set of nat action unit tests.
>
> Signed-off-by: Keara Leibovitz <kleib@mojatatu.com>
Applied, thank you.
^ permalink raw reply
* Re: [Patch net] llc: use refcount_inc_not_zero() for llc_sap_find()
From: David Miller @ 2018-08-07 22:54 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev
In-Reply-To: <20180807194138.5863-1-xiyou.wangcong@gmail.com>
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 7 Aug 2018 12:41:38 -0700
> llc_sap_put() decreases the refcnt before deleting sap
> from the global list. Therefore, there is a chance
> llc_sap_find() could find a sap with zero refcnt
> in this global list.
>
> Close this race condition by checking if refcnt is zero
> or not in llc_sap_find(), if it is zero then it is being
> removed so we can just treat it as gone.
>
> Reported-by: <syzbot+278893f3f7803871f7ce@syzkaller.appspotmail.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH net v2] dccp: fix undefined behavior with 'cwnd' shift in ccid2_cwnd_restart()
From: David Miller @ 2018-08-07 22:49 UTC (permalink / raw)
To: alexey.kodanev; +Cc: netdev, gerrit, dccp
In-Reply-To: <1533661437-26715-1-git-send-email-alexey.kodanev@oracle.com>
From: Alexey Kodanev <alexey.kodanev@oracle.com>
Date: Tue, 7 Aug 2018 20:03:57 +0300
> The shift of 'cwnd' with '(now - hc->tx_lsndtime) / hc->tx_rto' value
> can lead to undefined behavior [1].
>
> In order to fix this use a gradual shift of the window with a 'while'
> loop, similar to what tcp_cwnd_restart() is doing.
>
> When comparing delta and RTO there is a minor difference between TCP
> and DCCP, the last one also invokes dccp_cwnd_restart() and reduces
> 'cwnd' if delta equals RTO. That case is preserved in this change.
...
> Fixes: 113ced1f52e5 ("dccp ccid-2: Perform congestion-window validation")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> ---
>
> v2: instead of checking the value with min(), use gradual shifting,
> similar to tcp_cwnd_restart().
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH] net: nixge: Get rid of unused struct member 'last_link'
From: David Miller @ 2018-08-08 1:01 UTC (permalink / raw)
To: mdf; +Cc: keescook, netdev, linux-kernel, alex.williams
In-Reply-To: <20180807233520.31127-1-mdf@kernel.org>
From: Moritz Fischer <mdf@kernel.org>
Date: Tue, 7 Aug 2018 16:35:20 -0700
> Get rid of unused struct member 'last_link'
>
> Signed-off-by: Moritz Fischer <mdf@kernel.org>
Applied, thanks.
^ permalink raw reply
* Re: [net-next 00/12][pull request] 40GbE Intel Wired LAN Driver Updates 2018-08-07
From: David Miller @ 2018-08-07 22:43 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
In-Reply-To: <20180807192757.21592-1-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 7 Aug 2018 12:27:45 -0700
> This series contains updates to i40e and i40evf only.
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs
From: David Miller @ 2018-08-08 0:59 UTC (permalink / raw)
To: gustavo
Cc: netdev, linux-kernel, linux-net-drivers, ecree, bkenward, jes,
linux-acenic, michael.chan, nicolas.ferre, derek.chickles,
satananda.burla, felix.manlunas, raghu.vatsavayi, ganeshgr,
santosh, sgoutham, rric, linux-arm-kernel, linux-parisc,
sathya.perla, ajit.khaparde, sriharsha.basavapatna, somnath.kotur,
yisen.zhuang, salil.mehta, jeffrey.t.kirsher, intel-wired-lan,
tariqt, l
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Tue, 7 Aug 2018 18:09:00 -0500
> In preparation to enabling -Wimplicit-fallthrough, this patchset aims
> to add some annotations in order to mark switch cases where we are
> expecting to fall through.
Ok, I went through all of these and they look good.
If any are not correct we can revert/fix.
Series applied, thanks.
^ permalink raw reply
* Re: [RFC] spi: add spi multiplexing functions for dt
From: Ben Whitten @ 2018-08-07 22:03 UTC (permalink / raw)
To: Andreas Färber; +Cc: 潘建宏, hasnain.virk, netdev
In-Reply-To: <89395911-b928-6af8-f6a7-7b1d5ac6b701@suse.de>
On Tue, 7 Aug 2018 at 22:17, Andreas Färber <afaerber@suse.de> wrote:
>
> Hi Ben,
>
> Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> > Like I2C busses SPI devices can also sit behind multiplexers.
> > This patch adds is based off the I2C implementation and allows
> > description in the devicetree.
> >
> > Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
> > ---
> > drivers/spi/Kconfig | 10 +++
> > drivers/spi/Makefile | 3 +
> > drivers/spi/spi-mux.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++
> > include/linux/spi-mux.h | 55 +++++++++++++++
> > 4 files changed, 249 insertions(+)
> > create mode 100644 drivers/spi/spi-mux.c
> > create mode 100644 include/linux/spi-mux.h
>
> Did this get sent by mistake? It needs to go to linux-spi list and
> maintainers.
It certainly did, didn't spot it in my outgoing patches directory.
Please disregard, sorry for the noise.
> Tip: git config sendemail.cccmd "scripts/get_maintainer.pl
> --nogit-fallback --norolestats"
Thanks for the tip
Cheers,
Ben
^ permalink raw reply
* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
From: Jason A. Donenfeld @ 2018-08-07 23:48 UTC (permalink / raw)
To: Andy Lutomirski
Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
Linux Crypto Mailing List, LKML, Netdev, David Miller,
Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
Karthikeyan Bhargavan
In-Reply-To: <CALCETrWo-vCt_bHMBPAEHEr3P4=AJq-95Bf=00aAEAcE839wLw@mail.gmail.com>
Hey Andy,
On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski <luto@amacapital.net> wrote:
> For "zinc: add simd helper", I think it should be in include/linux,
> and include/linux/simd.h should (immediately or maybe in the future)
> include <asm/simd.h> to pick up arch-specific stuff. And the patch
> should get sent to linux-arch@vger.kernel.org.
I guess you saw my prompt about that in the previous commit message?
Based on your encouragement, I implemented it:
https://git.zx2c4.com/linux-dev/commit/?h=simd This is _far_ more
invasive than I wanted to be, as I don't want this patch submission to
grow unwieldy and never be merged, but I guess we can roll with this
for now...
> In your blake2s_arch() implementation, you're not passing in a
> simd_context_t. Is that still a work in progress? I thought the plan
> was to pass it in rather than doing the check in the _arch()
> functions.
I'm inclined to do the explicit context passing only when a function
is likely to be used in that kind of environment, and adjust as
needed. Long term, anyway, that API will be removed once the x86 guys
figure out lazy FPU restoration and the amortization doesn't add
anything.
Jason
^ permalink raw reply
* Re: [PATCH lora-next 02/10] net: lora: add methods for devm registration
From: Andreas Färber @ 2018-08-07 21:25 UTC (permalink / raw)
To: Ben Whitten; +Cc: starnight, hasnain.virk, netdev, Ben Whitten
In-Reply-To: <1533663131-16313-4-git-send-email-ben.whitten@gmail.com>
Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> From: Ben Whitten <ben.whitten@lairdtech.com>
>
> Follow the devm model so that we can avoid lengthy unwind code.
>
> Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com>
> ---
> drivers/net/lora/dev.c | 20 ++++++++++++++++++++
> include/linux/lora/dev.h | 1 +
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/net/lora/dev.c b/drivers/net/lora/dev.c
> index 8c01106..69a8b52 100644
> --- a/drivers/net/lora/dev.c
> +++ b/drivers/net/lora/dev.c
> @@ -84,6 +84,26 @@ void free_loradev(struct net_device *dev)
> }
> EXPORT_SYMBOL_GPL(free_loradev);
>
> +static void devm_lora_unregister(struct device *dev, void *res)
> +{
> + free_loradev(*(struct net_device **)res);
Suggest to use a variable.
> +}
> +
> +int devm_lora_register_netdev(struct device *dev, struct net_device *net)
Nice idea, but why a separate registration function? Suggest to instead
introduce devm_alloc_loradev(). If you then reorder those two patches to
the front of the series, I'll queue them immediately.
Thanks,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply
* Re: [RFC] spi: add spi multiplexing functions for dt
From: Andreas Färber @ 2018-08-07 21:17 UTC (permalink / raw)
To: Ben Whitten; +Cc: starnight, hasnain.virk, netdev
In-Reply-To: <1533663131-16313-3-git-send-email-ben.whitten@gmail.com>
Hi Ben,
Am 07.08.2018 um 19:32 schrieb Ben Whitten:
> Like I2C busses SPI devices can also sit behind multiplexers.
> This patch adds is based off the I2C implementation and allows
> description in the devicetree.
>
> Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
> ---
> drivers/spi/Kconfig | 10 +++
> drivers/spi/Makefile | 3 +
> drivers/spi/spi-mux.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/spi-mux.h | 55 +++++++++++++++
> 4 files changed, 249 insertions(+)
> create mode 100644 drivers/spi/spi-mux.c
> create mode 100644 include/linux/spi-mux.h
Did this get sent by mistake? It needs to go to linux-spi list and
maintainers.
Tip: git config sendemail.cccmd "scripts/get_maintainer.pl
--nogit-fallback --norolestats"
Cheers,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply
* [PATCH 33/33] net: ethernet: ti: cpts: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:32 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 114813 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/ti/cpts.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index b4ea58d..b96b93c 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -161,6 +161,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
*/
break;
}
+ /* fall through */
case CPTS_EV_PUSH:
case CPTS_EV_RX:
list_del_init(&event->list);
--
2.7.4
^ permalink raw reply related
* [PATCH 32/33] net: tlan: Mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:31 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Samuel Chessman
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 141440 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/ti/tlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index c769cd9..93d1428 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -966,6 +966,7 @@ static int tlan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
switch (cmd) {
case SIOCGMIIPHY: /* get address of MII PHY in use. */
data->phy_id = phy;
+ /* fall through */
case SIOCGMIIREG: /* read MII PHY register. */
--
2.7.4
^ permalink raw reply related
* [PATCH 31/33] net: sfc: falcon: mark expected switch fall-through
From: Gustavo A. R. Silva @ 2018-08-07 23:31 UTC (permalink / raw)
To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
Cc: Solarflare linux maintainers, Edward Cree, Bert Kenward
In-Reply-To: <cover.1533675546.git.gustavo@embeddedor.com>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Addresses-Coverity-ID: 1384500 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/ethernet/sfc/falcon/ethtool.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/sfc/falcon/ethtool.c b/drivers/net/ethernet/sfc/falcon/ethtool.c
index 5604915..1ccdb7a 100644
--- a/drivers/net/ethernet/sfc/falcon/ethtool.c
+++ b/drivers/net/ethernet/sfc/falcon/ethtool.c
@@ -963,6 +963,7 @@ ef4_ethtool_get_rxnfc(struct net_device *net_dev,
switch (info->flow_type) {
case TCP_V4_FLOW:
info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+ /* Fall through */
case UDP_V4_FLOW:
case SCTP_V4_FLOW:
case AH_ESP_V4_FLOW:
--
2.7.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox