* Re: [PATCH net] tcp: refresh tcp_mstamp from timers callbacks
From: Mike Maloney @ 2017-12-13 16:10 UTC (permalink / raw)
To: Soheil Hassas Yeganeh
Cc: Neal Cardwell, Eric Dumazet, David Miller, netdev, Mike Maloney
In-Reply-To: <CACSApvaJ5Tzw_-zZuDyHY4U5CQMBa6Mi5FrF8PPyWKZhd64XqA@mail.gmail.com>
Acked-by: Mike Maloney <maloney@google.com>
Thanks for the quick fix!
On Tue, Dec 12, 2017 at 9:42 PM, Soheil Hassas Yeganeh
<soheil.kdev@gmail.com> wrote:
> On Tue, Dec 12, 2017 at 9:26 PM, Neal Cardwell <ncardwell@google.com> wrote:
>> On Tue, Dec 12, 2017 at 9:22 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>> From: Eric Dumazet <edumazet@google.com>
>>>
>>> Only the retransmit timer currently refreshes tcp_mstamp
>>>
>>> We should do the same for delayed acks and keepalives.
>>>
>>> Even if RFC 7323 does not request it, this is consistent to what linux
>>> did in the past, when TS values were based on jiffies.
>>>
>>> Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
>>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>>> Cc: Soheil Hassas Yeganeh <soheil@google.com>
>>> Cc: Mike Maloney <maloney@google.com>
>>> Cc: Neal Cardwell <ncardwell@google.com>
>>> ---
>>
>> Acked-by: Neal Cardwell <ncardwell@google.com>
>>
>> Thanks, Eric!
>>
>> neal
>
> Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
>
> This is a very nice catch! Thank you Eric!
^ permalink raw reply
* Re: [PATCH v4 net-next 4/4] bpftool: implement cgroup bpf operations
From: David Ahern @ 2017-12-13 16:13 UTC (permalink / raw)
To: Roman Gushchin, netdev
Cc: linux-kernel, kernel-team, ast, daniel, jakub.kicinski, kafai,
Quentin Monnet
In-Reply-To: <20171213151854.21960-5-guro@fb.com>
On 12/13/17 8:18 AM, Roman Gushchin wrote:
> This patch adds basic cgroup bpf operations to bpftool:
> cgroup list, attach and detach commands.
>
> Usage is described in the corresponding man pages,
> and examples are provided.
>
> Syntax:
> $ bpftool cgroup list CGROUP
> $ bpftool cgroup attach CGROUP ATTACH_TYPE PROG [ATTACH_FLAGS]
> $ bpftool cgroup detach CGROUP ATTACH_TYPE PROG
>
> Signed-off-by: Roman Gushchin <guro@fb.com>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
> Cc: Martin KaFai Lau <kafai@fb.com>
> Cc: Quentin Monnet <quentin.monnet@netronome.com>
> Reviewed-by: David Ahern <dsahern@gmail.com>
> ---
The updates for attach flags and man page look great. Very user
friendly. Thanks for the work on it.
^ permalink raw reply
* Re: [PATCH net-next v2 0/5] net: mvpp2: various improvements
From: David Miller @ 2017-12-13 16:17 UTC (permalink / raw)
To: antoine.tenart
Cc: gregory.clement, thomas.petazzoni, miquel.raynal, nadavh, mw,
stefanc, ymarkman, netdev, linux-kernel
In-Reply-To: <20171211081329.3683-1-antoine.tenart@free-electrons.com>
From: Antoine Tenart <antoine.tenart@free-electrons.com>
Date: Mon, 11 Dec 2017 09:13:24 +0100
> These patches are sent as a series to avoid any possible conflict, even
> though there're not entirely related. I can send them separately if
> needed. The series applies on today's net-next tree.
...
> Since v1:
> - Removed the patch disabling TSO on allocation errors.
Series applied.
^ permalink raw reply
* Re: [PATCH] Revert "ravb: add workaround for clock when resuming with WoL enabled"
From: David Miller @ 2017-12-13 16:19 UTC (permalink / raw)
To: geert+renesas
Cc: sergei.shtylyov, niklas.soderlund+renesas, netdev,
linux-renesas-soc
In-Reply-To: <1512982449-11051-1-git-send-email-geert+renesas@glider.be>
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon, 11 Dec 2017 09:54:09 +0100
> This reverts commit fbf3d034f2ff6264183cfa6845770e8cc2a986c8.
>
> As of commit 560869100b99a3da ("clk: renesas: cpg-mssr: Restore module
> clocks during resume"), the workaround is no longer needed.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next v5 0/4] net: fec: fix refclk enable for SMSC LAN8710/20
From: David Miller @ 2017-12-13 16:23 UTC (permalink / raw)
To: dev
Cc: robh+dt, mark.rutland, fugang.duan, andrew, f.fainelli,
frowand.list, geert+renesas, sergei.shtylyov, baruch, david.wu,
lukma, netdev, devicetree, linux-kernel, richard.leitner
In-Reply-To: <20171211121700.10200-1-dev@g0hl1n.net>
From: Richard Leitner <dev@g0hl1n.net>
Date: Mon, 11 Dec 2017 13:16:56 +0100
> From: Richard Leitner <richard.leitner@skidata.com>
>
> This patch series fixes the use of the SMSC LAN8710/20 with a Freescale ETH
> when the refclk is generated by the FSL.
>
> This patchset depends on the "phylib: Add device reset GPIO support" patch
> submitted by Geert Uytterhoeven/Sergei Shtylyov, which was merged to
> net-next as commit bafbdd527d56 ("phylib: Add device reset GPIO support").
>
> Changes v5:
> - fix reset delay calculation (max_t instead of min_t)
>
> Changes v4:
> - simplify dts parsing
> - simplify reset delay evaluation and execution
> - fec: ensure to only reset once during fec_enet_open()
> - remove dependency notes from commit message
> - add reviews and acks
>
> Changes v3:
> - use phylib to hard-reset the PHY
> - implement reset delays in phylib
> - add new phylib API & flag (PHY_RST_AFTER_CLK_EN) to determine if
> a PHY is affected
>
> Changes v2:
> - simplify and fix fec_reset_phy function to support multiple calls
> - include: linux: phy: harmonize phy_id{,_mask} type
> - reset the phy instead of not turning the clock on and off
> (which would have caused a power consumption regression)
Series applied, thanks.
^ permalink raw reply
* [PATCH net V2 3/3] net/mlx4_en: Fill all counters under one call of stats lock
From: Tariq Toukan @ 2017-12-13 16:12 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Tariq Toukan
In-Reply-To: <1513181531-17522-1-git-send-email-tariqt@mellanox.com>
From: Eran Ben Elisha <eranbe@mellanox.com>
Before this patch, the stats_lock was acquired twice. In between the
locks Driver sent command to gather some more statistics (per priority
and counter statistics). If the stats lock was acquired by get
statistics NDO in between we would have report out of sync counters.
Fix this by collecting all stats from Firmware in advance and then
fill the Software structs under one lock.
Fixes: 0b131561a7d6 ("net/mlx4_en: Add Flow control statistics display via ethtool")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_port.c | 57 +++++++++++++++-------------
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_port.c b/drivers/net/ethernet/mellanox/mlx4/en_port.c
index e0eb695318e6..1fa4849a6f56 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_port.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_port.c
@@ -188,7 +188,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
struct net_device *dev = mdev->pndev[port];
struct mlx4_en_priv *priv = netdev_priv(dev);
struct net_device_stats *stats = &dev->stats;
- struct mlx4_cmd_mailbox *mailbox;
+ struct mlx4_cmd_mailbox *mailbox, *mailbox_priority;
u64 in_mod = reset << 8 | port;
int err;
int i, counter_index;
@@ -198,6 +198,13 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
mailbox = mlx4_alloc_cmd_mailbox(mdev->dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
+
+ mailbox_priority = mlx4_alloc_cmd_mailbox(mdev->dev);
+ if (IS_ERR(mailbox_priority)) {
+ mlx4_free_cmd_mailbox(mdev->dev, mailbox);
+ return PTR_ERR(mailbox_priority);
+ }
+
err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, in_mod, 0,
MLX4_CMD_DUMP_ETH_STATS, MLX4_CMD_TIME_CLASS_B,
MLX4_CMD_NATIVE);
@@ -206,6 +213,28 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
mlx4_en_stats = mailbox->buf;
+ memset(&tmp_counter_stats, 0, sizeof(tmp_counter_stats));
+ counter_index = mlx4_get_default_counter_index(mdev->dev, port);
+ err = mlx4_get_counter_stats(mdev->dev, counter_index,
+ &tmp_counter_stats, reset);
+
+ /* 0xffs indicates invalid value */
+ memset(mailbox_priority->buf, 0xff,
+ sizeof(*flowstats) * MLX4_NUM_PRIORITIES);
+
+ if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN) {
+ memset(mailbox_priority->buf, 0,
+ sizeof(*flowstats) * MLX4_NUM_PRIORITIES);
+ err = mlx4_cmd_box(mdev->dev, 0, mailbox_priority->dma,
+ in_mod | MLX4_DUMP_ETH_STATS_FLOW_CONTROL,
+ 0, MLX4_CMD_DUMP_ETH_STATS,
+ MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
+ if (err)
+ goto out;
+ }
+
+ flowstats = mailbox_priority->buf;
+
spin_lock_bh(&priv->stats_lock);
mlx4_en_fold_software_stats(dev);
@@ -345,31 +374,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
priv->pkstats.tx_prio[8][0] = be64_to_cpu(mlx4_en_stats->TTOT_novlan);
priv->pkstats.tx_prio[8][1] = be64_to_cpu(mlx4_en_stats->TOCT_novlan);
- spin_unlock_bh(&priv->stats_lock);
-
- memset(&tmp_counter_stats, 0, sizeof(tmp_counter_stats));
- counter_index = mlx4_get_default_counter_index(mdev->dev, port);
- err = mlx4_get_counter_stats(mdev->dev, counter_index,
- &tmp_counter_stats, reset);
-
- /* 0xffs indicates invalid value */
- memset(mailbox->buf, 0xff, sizeof(*flowstats) * MLX4_NUM_PRIORITIES);
-
- if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN) {
- memset(mailbox->buf, 0,
- sizeof(*flowstats) * MLX4_NUM_PRIORITIES);
- err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma,
- in_mod | MLX4_DUMP_ETH_STATS_FLOW_CONTROL,
- 0, MLX4_CMD_DUMP_ETH_STATS,
- MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
- if (err)
- goto out;
- }
-
- flowstats = mailbox->buf;
-
- spin_lock_bh(&priv->stats_lock);
-
if (tmp_counter_stats.counter_mode == 0) {
priv->pf_stats.rx_bytes = be64_to_cpu(tmp_counter_stats.rx_bytes);
priv->pf_stats.tx_bytes = be64_to_cpu(tmp_counter_stats.tx_bytes);
@@ -410,6 +414,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset)
out:
mlx4_free_cmd_mailbox(mdev->dev, mailbox);
+ mlx4_free_cmd_mailbox(mdev->dev, mailbox_priority);
return err;
}
--
1.8.3.1
^ permalink raw reply related
* [PATCH net V2 0/3] mlx4 misc fixes
From: Tariq Toukan @ 2017-12-13 16:12 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Tariq Toukan
Hi Dave,
This patchset contains misc bug fixes from the team
to the mlx4 Core and Eth drivers.
Patch 1 by Eugenia fixes an MTU issue in selftest.
Patch 2 by Eran fixes an accounting issue in the resource tracker.
Patch 3 by Eran fixes a race condition that causes counter inconsistency.
Series generated against net commit:
200809716aed fou: fix some member types in guehdr
Thanks,
Tariq.
v2:
Patch 2: Add reviewer credit, rephrase commit message.
Eran Ben Elisha (2):
net/mlx4_core: Fix wrong calculation of free counters
net/mlx4_en: Fill all counters under one call of stats lock
Eugenia Emantayev (1):
net/mlx4_en: Fix selftest for small MTUs
drivers/net/ethernet/mellanox/mlx4/en_port.c | 57 ++++++++++++----------
drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 ++
.../net/ethernet/mellanox/mlx4/resource_tracker.c | 1 -
4 files changed, 35 insertions(+), 28 deletions(-)
--
1.8.3.1
^ permalink raw reply
* [PATCH net V2 2/3] net/mlx4_core: Fix wrong calculation of free counters
From: Tariq Toukan @ 2017-12-13 16:12 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Tariq Toukan
In-Reply-To: <1513181531-17522-1-git-send-email-tariqt@mellanox.com>
From: Eran Ben Elisha <eranbe@mellanox.com>
The field res_free indicates the total number of counters which are
available for allocation (reserved and unreserved). Fixed a bug where
the reserved counters were subtracted from res_free before any
allocation was performed.
Before this fix, free counters which were not reserved could not be
allocated.
Fixes: 9de92c60beaa ("net/mlx4_core: Adjust counter grant policy in the resource tracker")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 04304dd894c6..606a0e0beeae 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -611,7 +611,6 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
MLX4_MAX_PORTS;
else
res_alloc->guaranteed[t] = 0;
- res_alloc->res_free -= res_alloc->guaranteed[t];
break;
default:
break;
--
1.8.3.1
^ permalink raw reply related
* [PATCH net V2 1/3] net/mlx4_en: Fix selftest for small MTUs
From: Tariq Toukan @ 2017-12-13 16:12 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Eugenia Emantayev, Tariq Toukan
In-Reply-To: <1513181531-17522-1-git-send-email-tariqt@mellanox.com>
From: Eugenia Emantayev <eugenia@mellanox.com>
Set the minimal MTU threshold for running loopback selftest.
MTU should be big enough to include packet payload, NET_IP_ALIGN,
Ethernet headers and preamble length.
Fixes: e7c1c2c46201 ("mlx4_en: Added self diagnostics test implementation")
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
index 88699b181946..946d9db7c8c2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_selftest.c
@@ -185,7 +185,7 @@ void mlx4_en_ex_selftest(struct net_device *dev, u32 *flags, u64 *buf)
if (priv->mdev->dev->caps.flags &
MLX4_DEV_CAP_FLAG_UC_LOOPBACK) {
buf[3] = mlx4_en_test_registers(priv);
- if (priv->port_up)
+ if (priv->port_up && dev->mtu >= MLX4_SELFTEST_LB_MIN_MTU)
buf[4] = mlx4_en_test_loopback(priv);
}
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 1856e279a7e0..2b72677eccd4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -153,6 +153,9 @@
#define SMALL_PACKET_SIZE (256 - NET_IP_ALIGN)
#define HEADER_COPY_SIZE (128 - NET_IP_ALIGN)
#define MLX4_LOOPBACK_TEST_PAYLOAD (HEADER_COPY_SIZE - ETH_HLEN)
+#define PREAMBLE_LEN 8
+#define MLX4_SELFTEST_LB_MIN_MTU (MLX4_LOOPBACK_TEST_PAYLOAD + NET_IP_ALIGN + \
+ ETH_HLEN + PREAMBLE_LEN)
#define MLX4_EN_MIN_MTU 46
/* VLAN_HLEN is added twice,to support skb vlan tagged with multiple
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH v2 net-next] net: dsa: lan9303: Introduce lan9303_read_wait
From: Vivien Didelot @ 2017-12-13 16:32 UTC (permalink / raw)
To: Egil Hjelmeland, andrew, f.fainelli, netdev, linux-kernel; +Cc: Egil Hjelmeland
In-Reply-To: <20171213144250.27120-1-privat@egil-hjelmeland.no>
Egil Hjelmeland <privat@egil-hjelmeland.no> writes:
> Simplify lan9303_indirect_phy_wait_for_completion()
> and lan9303_switch_wait_for_completion() by using a new function
> lan9303_read_wait()
>
> Changes v1 -> v2:
> - param 'mask' type u32
> - removed param 'value' (will probably never be used)
> - add newline before return
>
> Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
^ permalink raw reply
* Re: [PATCH] net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x
From: Andrew Lunn @ 2017-12-13 16:44 UTC (permalink / raw)
To: Russell King; +Cc: Florian Fainelli, Jon Nettleton, netdev
In-Reply-To: <E1eP3Ev-0000ZJ-1L@rmk-PC.armlinux.org.uk>
On Wed, Dec 13, 2017 at 09:22:09AM +0000, Russell King wrote:
> Observed on the 88e1512 in SGMII-to-Copper mode, negotiating pause
> is unreliable. While the pause bits can be set in the advertisment
> register, they clear shortly after negotiation with a link partner
> commences irrespective of the cause of the negotiation.
>
> While these bits may be correctly conveyed to the link partner on the
> first negotiation, a subsequent negotiation (eg, due to negotiation
> restart by the link partner, or reconnection of the cable) will result
> in the link partner seeing these bits as zero, while the kernel
> believes that it has advertised pause modes.
>
> This leads to the local kernel evaluating (eg) symmetric pause mode,
> while the remote end evaluates that we have no pause mode capability.
>
> Since we can't guarantee the advertisment, disable pause mode support
> with this PHY when used in SGMII-to-Copper mode.
>
> The 88e1510 in RGMII-to-Copper mode appears to behave correctly.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH] net: phy: marvell: avoid configuring fiber page for SGMII-to-Copper
From: Andrew Lunn @ 2017-12-13 16:46 UTC (permalink / raw)
To: Russell King; +Cc: Florian Fainelli, Jon Nettleton, netdev
In-Reply-To: <E1eP3Ep-0000ZC-UN@rmk-PC.armlinux.org.uk>
On Wed, Dec 13, 2017 at 09:22:03AM +0000, Russell King wrote:
> When in SGMII-to-Copper mode, the fiber page is used for the MAC facing
> link, and does not require configuration of the fiber auto-negotiation
> settings. Avoid trying.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [BUG] skge: a possible sleep-in-atomic bug in skge_remove
From: Stephen Hemminger @ 2017-12-13 16:50 UTC (permalink / raw)
To: Jia-Ju Bai
Cc: David Miller, mlindner, shemminger, shemminger, netdev,
linux-kernel
In-Reply-To: <f2dee82a-af75-a3af-9899-5dec7950b9e8@gmail.com>
On Wed, 13 Dec 2017 15:42:56 +0800
Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
> On 2017/12/13 13:18, Stephen Hemminger wrote:
> > On Tue, 12 Dec 2017 20:57:01 -0500 (EST)
> > David Miller <davem@davemloft.net> wrote:
> >
> >> From: Stephen Hemminger <stephen@networkplumber.org>
> >> Date: Tue, 12 Dec 2017 10:22:40 -0800
> >>
> >>> On Tue, 12 Dec 2017 08:34:45 -0500 (EST)
> >>> David Miller <davem@davemloft.net> wrote:
> >>>
> >>>> From: Jia-Ju Bai <baijiaju1990@gmail.com>
> >>>> Date: Tue, 12 Dec 2017 16:38:12 +0800
> >>>>
> >>>>> According to drivers/net/ethernet/marvell/skge.c, the driver may sleep
> >>>>> under a spinlock.
> >>>>> The function call path is:
> >>>>> skge_remove (acquire the spinlock)
> >>>>> free_irq --> may sleep
> >>>>>
> >>>>> I do not find a good way to fix it, so I only report.
> >>>>> This possible bug is found by my static analysis tool (DSAC) and
> >>>>> checked by my code review.
> >>>> This was added by:
> >>>>
> >>>> commit a9e9fd7182332d0cf5f3e601df3e71dd431b70d7
> >>>> Author: Stephen Hemminger <shemminger@vyatta.com>
> >>>> Date: Tue Sep 27 13:41:37 2011 -0400
> >>>>
> >>>> skge: handle irq better on single port card
> >>>>
> >>>> I think the free_irq() can be moved below the unlock.
> >>>>
> >>>> Stephen, please take a look.
> >>> The IRQ was being free twice.
> >>> How did you see it, I really doubt any multi-port SKGE cards
> >>> still exist.
> >> He sees it by reading the code, please take a look at this
> >> and move the free_irq() out of the spin locked section since
> >> it can sleep.
> > Thanks, I was hoping for some automated static analysis tool.
>
> This bug was found by an automated static analysis tool named DSAC,
> which is written by myself.
> Then I manually checked driver source code, and finally sent the bug report.
Thanks.
Would it be possible to put tool in tools directory and then have
it automated by kbuild robot?
^ permalink raw reply
* Re: [PATCH v2 net-next 0/3] add VLAN support to DSA MT7530
From: Andrew Lunn @ 2017-12-13 16:50 UTC (permalink / raw)
To: sean.wang
Cc: davem, f.fainelli, vivien.didelot, netdev, linux-kernel,
linux-mediatek
In-Reply-To: <cover.1513136754.git.sean.wang@mediatek.com>
On Wed, Dec 13, 2017 at 12:01:10PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [patch net-next v3 00/10] net: sched: allow qdiscs to share filter block instances
From: David Ahern @ 2017-12-13 16:54 UTC (permalink / raw)
To: Jiri Pirko, netdev
Cc: davem, jhs, xiyou.wangcong, mlxsw, andrew, vivien.didelot,
f.fainelli, michael.chan, ganeshgr, saeedm, matanb, leonro,
idosch, jakub.kicinski, simon.horman, pieter.jansenvanvuuren,
john.hurley, alexander.h.duyck, ogerlitz, john.fastabend, daniel
In-Reply-To: <20171213151038.29665-1-jiri@resnulli.us>
On 12/13/17 8:10 AM, Jiri Pirko wrote:
> So back to the example. First, we create 2 qdiscs. Both will share
> block number 22. "22" is just an identification. If we don't pass any
> block number, a new one will be generated by kernel:
>
> $ tc qdisc add dev ens7 ingress block 22
> ^^^^^^^^
> $ tc qdisc add dev ens8 ingress block 22
> ^^^^^^^^
>
> Now if we list the qdiscs, we will see the block index in the output:
>
> $ tc qdisc
> qdisc ingress ffff: dev ens7 parent ffff:fff1 block 22
> qdisc ingress ffff: dev ens8 parent ffff:fff1 block 22
>
> To make is more visual, the situation looks like this:
>
> ens7 ingress qdisc ens7 ingress qdisc
> | |
> | |
> +----------> block 22 <----------+
>
> Unlimited number of qdiscs may share the same block.
>
> Now we can add filter to any of qdiscs sharing the same block:
>
> $ tc filter add dev ens7 ingress protocol ip pref 25 flower dst_ip 192.168.0.0/16 action drop
I still say this is very odd user semantic - making changes to device M
and the changes magically affect device N. Operating on the shared block
as a separate object makes it is much more direct and clear.
>
>
> We will see the same output if we list filters for ens7 and ens8, including stats:
>
> $ tc -s filter show dev ens7 ingress
> filter protocol ip pref 25 flower chain 0
> filter protocol ip pref 25 flower chain 0 handle 0x1
> eth_type ipv4
> dst_ip 192.168.0.0/16
> not_in_hw
> action order 1: gact action drop
> random type none pass val 0
> index 1 ref 1 bind 1 installed 39 sec used 2 sec
> Action statistics:
> Sent 3108 bytes 37 pkt (dropped 37, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
>
> $ tc -s filter show dev ens8 ingress
> filter protocol ip pref 25 flower chain 0
> filter protocol ip pref 25 flower chain 0 handle 0x1
> eth_type ipv4
> dst_ip 192.168.0.0/16
> not_in_hw
> action order 1: gact action drop
> random type none pass val 0
> index 1 ref 1 bind 1 installed 40 sec used 3 sec
> Action statistics:
> Sent 3108 bytes 37 pkt (dropped 37, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
>
^ permalink raw reply
* Re: [PATCH net-next v2 1/5] net: phy: phylink: Allow specifying PHY device flags
From: Andrew Lunn @ 2017-12-13 16:54 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, rmk+kernel, davem, vivien.didelot
In-Reply-To: <20171213000029.8649-2-f.fainelli@gmail.com>
On Tue, Dec 12, 2017 at 04:00:25PM -0800, Florian Fainelli wrote:
> In order to let subsystems like DSA fully utilize PHYLINK, we need to be able
> to communicate phy_device::flags from of_phy_{connect,attach} even when using
> PHYLINK APIs.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH net-next v2 3/5] net: phy: phylink: Remove error message
From: Andrew Lunn @ 2017-12-13 16:56 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, rmk+kernel, davem, vivien.didelot
In-Reply-To: <20171213000029.8649-4-f.fainelli@gmail.com>
On Tue, Dec 12, 2017 at 04:00:27PM -0800, Florian Fainelli wrote:
> Some subsystems like DSA may be trying to connect to a PHY through OF first,
> and then attempt a connect using a local MDIO bus, remove the error message:
> "unable to find PHY node" so we can let MAC drivers whether to print it or not.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH net-next v2 4/5] net: phy: phylink: Allow setting a custom link state callback
From: Andrew Lunn @ 2017-12-13 16:58 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, rmk+kernel, davem, vivien.didelot
In-Reply-To: <20171213000029.8649-5-f.fainelli@gmail.com>
On Tue, Dec 12, 2017 at 04:00:28PM -0800, Florian Fainelli wrote:
> phylink_get_fixed_state() currently consults an optional "link_gpio"
> GPIO descriptor, expand this mechanism to allow specifying a custom
> callback. This is necessary to support out of band link notifcation
> (e.g: from an interrupt within a MMIO register).
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH net-next v2 5/5] net: phy: phylink: Report MoCA as PORT_BNC
From: Andrew Lunn @ 2017-12-13 16:59 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, rmk+kernel, davem, vivien.didelot
In-Reply-To: <20171213000029.8649-6-f.fainelli@gmail.com>
On Tue, Dec 12, 2017 at 04:00:29PM -0800, Florian Fainelli wrote:
> Similarly to what PHYLIB already does, make sure that
> PHY_INTERFACE_MODE_MOCA is reported as PORT_BNC.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [patch net-next v3 00/10] net: sched: allow qdiscs to share filter block instances
From: Jiri Pirko @ 2017-12-13 17:07 UTC (permalink / raw)
To: David Ahern
Cc: netdev, davem, jhs, xiyou.wangcong, mlxsw, andrew, vivien.didelot,
f.fainelli, michael.chan, ganeshgr, saeedm, matanb, leonro,
idosch, jakub.kicinski, simon.horman, pieter.jansenvanvuuren,
john.hurley, alexander.h.duyck, ogerlitz, john.fastabend, daniel
In-Reply-To: <04bcfa37-a74e-9e2f-3ac1-7ed8e63e13df@gmail.com>
Wed, Dec 13, 2017 at 05:54:35PM CET, dsahern@gmail.com wrote:
>On 12/13/17 8:10 AM, Jiri Pirko wrote:
>> So back to the example. First, we create 2 qdiscs. Both will share
>> block number 22. "22" is just an identification. If we don't pass any
>> block number, a new one will be generated by kernel:
>>
>> $ tc qdisc add dev ens7 ingress block 22
>> ^^^^^^^^
>> $ tc qdisc add dev ens8 ingress block 22
>> ^^^^^^^^
>>
>> Now if we list the qdiscs, we will see the block index in the output:
>>
>> $ tc qdisc
>> qdisc ingress ffff: dev ens7 parent ffff:fff1 block 22
>> qdisc ingress ffff: dev ens8 parent ffff:fff1 block 22
>>
>> To make is more visual, the situation looks like this:
>>
>> ens7 ingress qdisc ens7 ingress qdisc
>> | |
>> | |
>> +----------> block 22 <----------+
>>
>> Unlimited number of qdiscs may share the same block.
>>
>> Now we can add filter to any of qdiscs sharing the same block:
>>
>> $ tc filter add dev ens7 ingress protocol ip pref 25 flower dst_ip 192.168.0.0/16 action drop
>
>I still say this is very odd user semantic - making changes to device M
>and the changes magically affect device N. Operating on the shared block
>as a separate object makes it is much more direct and clear.
I plan to do it as a follow-up patch. But this is how things are done
now and have to continue to work.
Also changes done on dev block X for dev A has to appear in block X
for dev B. Block X is share between A and B.
^ permalink raw reply
* Re: [PATCH] net: igmp: Use correct source address on IGMPv3 reports
From: Andrew Lunn @ 2017-12-13 17:15 UTC (permalink / raw)
To: Kevin Cernekee; +Cc: davem, kuznet, yoshfuji, netdev, linux-kernel
In-Reply-To: <20171211191345.104136-1-cernekee@chromium.org>
On Mon, Dec 11, 2017 at 11:13:45AM -0800, Kevin Cernekee wrote:
> Closing a multicast socket after the final IPv4 address is deleted
> from an interface can generate a membership report that uses the
> source IP from a different interface. The following test script, run
> from an isolated netns, reproduces the issue:
>
> #!/bin/bash
>
> ip link add dummy0 type dummy
> ip link add dummy1 type dummy
> ip link set dummy0 up
> ip link set dummy1 up
> ip addr add 10.1.1.1/24 dev dummy0
> ip addr add 192.168.99.99/24 dev dummy1
>
> tcpdump -U -i dummy0 &
> socat EXEC:"sleep 2" \
> UDP4-DATAGRAM:239.101.1.68:8889,ip-add-membership=239.0.1.68:10.1.1.1 &
>
> sleep 1
> ip addr del 10.1.1.1/24 dev dummy0
> sleep 5
> kill %tcpdump
>
> RFC 3376 specifies that the report must be sent with a valid IP source
> address from the destination subnet, or from address 0.0.0.0. Add an
> extra check to make sure this is the case.
>
> Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH] of_mdio / mdiobus: ensure mdio devices have fwnode correctly populated
From: Andrew Lunn @ 2017-12-13 17:15 UTC (permalink / raw)
To: Russell King
Cc: Florian Fainelli, Rob Herring, Frank Rowand, netdev, devicetree
In-Reply-To: <E1eOi7f-0002Rs-K7@rmk-PC.armlinux.org.uk>
On Tue, Dec 12, 2017 at 10:49:15AM +0000, Russell King wrote:
> Ensure that all mdio devices populate the struct device fwnode pointer
> as well as the of_node pointer to allow drivers that wish to use
> fwnode APIs to work.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH iproute2] Show 'external' link mode in output
From: Phil Dibowitz @ 2017-12-13 17:15 UTC (permalink / raw)
To: Sergei Shtylyov, netdev; +Cc: phild
In-Reply-To: <da953234-0678-f0bb-1a73-265b0b506c1c@cogentembedded.com>
[-- Attachment #1.1: Type: text/plain, Size: 556 bytes --]
On 12/13/2017 02:05 AM, Sergei Shtylyov wrote:
> Hello!
Hi!
> The original code is indented with tabs, you're using spaces. Not
> good. :-)
I sent a v2 of the patch later yesterday that fixed this.
Thanks!
--
Phil Dibowitz phil@ipom.com
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Be who you are and say what you feel, because those who mind don't
matter and those who matter don't mind."
- Dr. Seuss
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]
^ permalink raw reply
* Re: [patch net-next v3 00/10] net: sched: allow qdiscs to share filter block instances
From: David Ahern @ 2017-12-13 17:18 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, jhs, xiyou.wangcong, mlxsw, andrew, vivien.didelot,
f.fainelli, michael.chan, ganeshgr, saeedm, matanb, leonro,
idosch, jakub.kicinski, simon.horman, pieter.jansenvanvuuren,
john.hurley, alexander.h.duyck, ogerlitz, john.fastabend, daniel
In-Reply-To: <20171213170757.GJ2031@nanopsycho>
On 12/13/17 10:07 AM, Jiri Pirko wrote:
> Wed, Dec 13, 2017 at 05:54:35PM CET, dsahern@gmail.com wrote:
>> On 12/13/17 8:10 AM, Jiri Pirko wrote:
>>> So back to the example. First, we create 2 qdiscs. Both will share
>>> block number 22. "22" is just an identification. If we don't pass any
>>> block number, a new one will be generated by kernel:
>>>
>>> $ tc qdisc add dev ens7 ingress block 22
>>> ^^^^^^^^
>>> $ tc qdisc add dev ens8 ingress block 22
>>> ^^^^^^^^
>>>
>>> Now if we list the qdiscs, we will see the block index in the output:
>>>
>>> $ tc qdisc
>>> qdisc ingress ffff: dev ens7 parent ffff:fff1 block 22
>>> qdisc ingress ffff: dev ens8 parent ffff:fff1 block 22
>>>
>>> To make is more visual, the situation looks like this:
>>>
>>> ens7 ingress qdisc ens7 ingress qdisc
>>> | |
>>> | |
>>> +----------> block 22 <----------+
>>>
>>> Unlimited number of qdiscs may share the same block.
>>>
>>> Now we can add filter to any of qdiscs sharing the same block:
>>>
>>> $ tc filter add dev ens7 ingress protocol ip pref 25 flower dst_ip 192.168.0.0/16 action drop
>>
>> I still say this is very odd user semantic - making changes to device M
>> and the changes magically affect device N. Operating on the shared block
>> as a separate object makes it is much more direct and clear.
>
> I plan to do it as a follow-up patch. But this is how things are done
> now and have to continue to work.
Why is that? You are introducing the notion of a shared block with this
patch set. What is the legacy "how things are done now" you are
referring to?
> Also changes done on dev block X for dev A has to appear in block X
> for dev B. Block X is share between A and B.
>
Certainly - that's the definition of a shared block and you are
referring to display and datapath. For admin, it is more direct and
apparent in terms of what is happening to require changes (filter add
and deletes) to be done by specifying the shared block as the primary
object.
^ permalink raw reply
* Re: [PATCH net] net: phy: fix resume handling
From: Andrew Lunn @ 2017-12-13 17:19 UTC (permalink / raw)
To: Russell King; +Cc: Florian Fainelli, netdev
In-Reply-To: <E1eOi48-0002N2-QC@rmk-PC.armlinux.org.uk>
On Tue, Dec 12, 2017 at 10:45:36AM +0000, Russell King wrote:
> When a PHY has the BMCR_PDOWN bit set, it may decide to ignore writes
> to other registers, or reset the registers to power-on defaults.
> Micrel PHYs do this for their interrupt registers.
>
> The current structure of phylib tries to enable interrupts before
> resuming (and releasing) the BMCR_PDOWN bit. This fails, causing
> Micrel PHYs to stop working after a suspend/resume sequence if they
> are using interrupts.
>
> Fix this by ensuring that the PHY driver resume methods do not take
> the phydev->lock mutex themselves, but the callers of phy_resume()
> take that lock. This then allows us to move the call to phy_resume()
> before we enable interrupts in phy_start().
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
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