* Re: [PATCH net] macmace: Set platform device coherent_dma_mask
From: Geert Uytterhoeven @ 2018-05-03 8:46 UTC (permalink / raw)
To: Finn Thain
Cc: David S. Miller, linux-m68k, netdev, Linux Kernel Mailing List,
Christoph Hellwig
In-Reply-To: <alpine.LNX.2.21.1805031801310.8@nippy.intranet>
Hi Finn,
CC Christoph
On Thu, May 3, 2018 at 10:38 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Thu, 3 May 2018, Geert Uytterhoeven wrote:
>> > --- a/drivers/net/ethernet/apple/macmace.c
>> > +++ b/drivers/net/ethernet/apple/macmace.c
>> > @@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev)
>> > unsigned char checksum = 0;
>> > int err;
>> >
>> > + err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
>> > + if (err)
>> > + return err;
>> > +
>> > dev = alloc_etherdev(PRIV_BYTES);
>> > if (!dev)
>> > return -ENOMEM;
>>
>> Shouldn't this be handled in the platform code that instantiates the
>> device, i.e. in arch/m68k/mac/config.c:mac_platform_init()?
>
> I wondered about that too. The downside is that I'd have to convert
> platform_device_register_simple() into platform_device_register() and add
> all of the boilerplate that goes with that, for little gain.
>
>> Cfr. commit f61e64310b75733d ("m68k: set dma and coherent masks for
>> platform FEC ethernets").
>
> Yes, I looked at that patch before I sent this one. It makes sense to set
> the mask when defining the device since some devices tend to have inherent
> limitations (but that's not really applicable here).
>
> Moreover, it turns out that a number of platform drivers already call
> dma_set_mask_and_coherent() or dma_coerce_mask_and_coherent() or similar.
>
> I figured that platform drivers aren't expected to be particularly
> portable. Well, I'd expect macmace and macsonic to be portable to NuBus
> PowerMacs, but AFAIK the correct mask would remain DMA_BIT_MASK(32).
>
> So that's how I ended up with this patch. But if you are not pursuaded by
> my reasoning then just say the word and I'll take another approach.
Perhaps you can add a new helper (platform_device_register_simple_dma()?)
that takes the DMA mask, too?
With people setting the mask to kill the WARNING splat, this may become
more common.
struct platform_device_info already has a dma_mask field, but
platform_device_register_resndata() explicitly sets it to zero.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply
* Re: [PATCH net] macmace: Set platform device coherent_dma_mask
From: Christoph Hellwig @ 2018-05-03 8:51 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Finn Thain, David S. Miller, linux-m68k, netdev,
Linux Kernel Mailing List, Christoph Hellwig
In-Reply-To: <CAMuHMdU1XBqt7hwEW6JTas64ZNGCGCMr5HMZwuLo0O-ZBCOWyA@mail.gmail.com>
On Thu, May 03, 2018 at 10:46:56AM +0200, Geert Uytterhoeven wrote:
> Perhaps you can add a new helper (platform_device_register_simple_dma()?)
> that takes the DMA mask, too?
> With people setting the mask to kill the WARNING splat, this may become
> more common.
>
> struct platform_device_info already has a dma_mask field, but
> platform_device_register_resndata() explicitly sets it to zero.
Yes, that would be useful. The other assumption could be that
platform devices always allow an all-0xff dma mask.
^ permalink raw reply
* [PATCH ipsec-next] xfrm: use a dedicated slab cache for struct xfrm_state
From: Mathias Krause @ 2018-05-03 8:55 UTC (permalink / raw)
To: Steffen Klassert; +Cc: Mathias Krause, Herbert Xu, David S. Miller, netdev
struct xfrm_state is rather large (768 bytes here) and therefore wastes
quite a lot of memory as it falls into the kmalloc-1024 slab cache,
leaving 256 bytes of unused memory per XFRM state object -- a net waste
of 25%.
Using a dedicated slab cache for struct xfrm_state reduces the level of
internal fragmentation to a minimum.
On my configuration SLUB chooses to create a slab cache covering 4
pages holding 21 objects, resulting in an average memory waste of ~13
bytes per object -- a net waste of only 1.6%.
In my tests this led to memory savings of roughly 2.3MB for 10k XFRM
states.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
net/xfrm/xfrm_state.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index f9d2f2233f09..73db0ea8692a 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -42,6 +42,7 @@
static unsigned int xfrm_state_hashmax __read_mostly = 1 * 1024 * 1024;
static __read_mostly seqcount_t xfrm_state_hash_generation = SEQCNT_ZERO(xfrm_state_hash_generation);
+static struct kmem_cache *xfrm_state_cache __ro_after_init;
static DECLARE_WORK(xfrm_state_gc_work, xfrm_state_gc_task);
static HLIST_HEAD(xfrm_state_gc_list);
@@ -451,7 +452,7 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x)
}
xfrm_dev_state_free(x);
security_xfrm_state_free(x);
- kfree(x);
+ kmem_cache_free(xfrm_state_cache, x);
}
static void xfrm_state_gc_task(struct work_struct *work)
@@ -563,7 +564,7 @@ struct xfrm_state *xfrm_state_alloc(struct net *net)
{
struct xfrm_state *x;
- x = kzalloc(sizeof(struct xfrm_state), GFP_ATOMIC);
+ x = kmem_cache_alloc(xfrm_state_cache, GFP_ATOMIC | __GFP_ZERO);
if (x) {
write_pnet(&x->xs_net, net);
@@ -2307,6 +2308,10 @@ int __net_init xfrm_state_init(struct net *net)
{
unsigned int sz;
+ if (net_eq(net, &init_net))
+ xfrm_state_cache = KMEM_CACHE(xfrm_state,
+ SLAB_HWCACHE_ALIGN | SLAB_PANIC);
+
INIT_LIST_HEAD(&net->xfrm.state_all);
sz = sizeof(struct hlist_head) * 8;
--
1.7.10.4
^ permalink raw reply related
* Re: Silently dropped UDP packets on kernel 4.14
From: Kristian Evensen @ 2018-05-03 9:06 UTC (permalink / raw)
To: Florian Westphal; +Cc: Netfilter Development Mailing list, Network Development
In-Reply-To: <20180503050345.iyasach2ogf25dt3@breakpoint.cc>
Hi Florian,
On Thu, May 3, 2018 at 7:03 AM, Florian Westphal <fw@strlen.de> wrote:
> I'm sorry for suggesting that.
>
> It doesn't work, because of NAT.
> NAT rewrites packet content and changes the reply tuple, but the tuples
> determine the hash insertion location.
>
> I don't know how to solve this problem.
No problem. This has anyway served as a good exercise for getting more
familiar with the conntrack/nat code in the kernel. I did some more
tests and I see that on my router (or routers actually), just
replacing the ct solves the issue. While not a perfect solution, the
situation is improved considerably. Do you think a patch where the ct
is replace would be acceptable, or would upstream rather wait for a
"proper" fix to this problem? When replacing the ct, it is at least
possible to work around the problem in userspace, while without
replacing ct we are stuck with the original entry.
BR,
Kristian
^ permalink raw reply
* [PATCH V2] net/netlink: optimize seq_puts and seq_printf in af_netlink.c
From: YU Bo @ 2018-05-03 9:09 UTC (permalink / raw)
To: davem, xiyou.wangcong, yuzibode, tsu.yubo; +Cc: netdev, kernel-janitors
Before the patch, the command `cat /proc/net/netlink` will output like:
https://clbin.com/BojZv
After the patch:
https://clbin.com/lnu4L
The optimization will make convenience for using `cat /proc/net/netlink`
But,The checkpatch will give a warning:
WARNING: quoted string split across lines
Signed-off-by: Bo YU <tsu.yubo@gmail.com>
---
Changes in v2:
Do not break the indentation of the code line
---
net/netlink/af_netlink.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 55342c4d5cec..2e2dd88fc79f 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2606,13 +2606,13 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
{
if (v == SEQ_START_TOKEN) {
seq_puts(seq,
- "sk Eth Pid Groups "
- "Rmem Wmem Dump Locks Drops Inode\n");
+ "sk Eth Pid Groups "
+ "Rmem Wmem Dump Locks Drops Inode\n");
} else {
struct sock *s = v;
struct netlink_sock *nlk = nlk_sk(s);
- seq_printf(seq, "%pK %-3d %-6u %08x %-8d %-8d %d %-8d %-8d %-8lu\n",
+ seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8d %-8lu\n",
s,
s->sk_protocol,
nlk->portid,
^ permalink raw reply related
* [PATCH] net/mlx5e: fix spelling mistake: "loobpack" -> "loopback"
From: Colin King @ 2018-05-03 9:12 UTC (permalink / raw)
To: Saeed Mahameed, Matan Barak, Leon Romanovsky, netdev, linux-rdma
Cc: kernel-janitors, David S . Miller, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Trivial fix to spelling mistake in netdev_err error message
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
index 707976482c09..027f54ac1ca2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
@@ -290,7 +290,7 @@ static int mlx5e_test_loopback(struct mlx5e_priv *priv)
if (!test_bit(MLX5E_STATE_OPENED, &priv->state)) {
netdev_err(priv->netdev,
- "\tCan't perform loobpack test while device is down\n");
+ "\tCan't perform loopback test while device is down\n");
return -ENODEV;
}
--
2.17.0
^ permalink raw reply related
* [PATCH net-next] net: core: rework skb_probe_transport_header()
From: Paolo Abeni @ 2018-05-03 9:35 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Eric Dumazet, Jason Wang
When the transport header is not available, skb_probe_transport_header()
resorts to fully dissect the flow keys, even if it only needs the
ransport offset. We can obtain the latter using a simpler flow dissector -
flow_keys_buf_dissector - and a smaller struct for key storage.
The above gives ~50% performance improvement in micro benchmarking around
skb_probe_transport_header(), mostly due to the smaller memset. Small, but
measurable improvement is measured also in macro benchmarking - raw xmit
tput from a VM.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
include/linux/skbuff.h | 7 +++++--
include/net/flow_dissector.h | 5 +++++
net/core/flow_dissector.c | 1 +
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 908d66e55b14..63cb523d3519 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2350,11 +2350,14 @@ static inline void skb_pop_mac_header(struct sk_buff *skb)
static inline void skb_probe_transport_header(struct sk_buff *skb,
const int offset_hint)
{
- struct flow_keys keys;
+ struct flow_keys_basic keys;
if (skb_transport_header_was_set(skb))
return;
- else if (skb_flow_dissect_flow_keys(skb, &keys, 0))
+
+ memset(&keys, 0, sizeof(keys));
+ if (__skb_flow_dissect(skb, &flow_keys_buf_dissector, &keys,
+ 0, 0, 0, 0, 0))
skb_set_transport_header(skb, keys.control.thoff);
else
skb_set_transport_header(skb, offset_hint);
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h
index 9a074776f70b..e81dab6e9ac6 100644
--- a/include/net/flow_dissector.h
+++ b/include/net/flow_dissector.h
@@ -226,6 +226,11 @@ struct flow_dissector {
unsigned short int offset[FLOW_DISSECTOR_KEY_MAX];
};
+struct flow_keys_basic {
+ struct flow_dissector_key_control control;
+ struct flow_dissector_key_basic basic;
+};
+
struct flow_keys {
struct flow_dissector_key_control control;
#define FLOW_KEYS_HASH_START_FIELD basic
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index d29f09bc5ff9..ac7b4de4a0f0 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -1418,6 +1418,7 @@ struct flow_dissector flow_keys_dissector __read_mostly;
EXPORT_SYMBOL(flow_keys_dissector);
struct flow_dissector flow_keys_buf_dissector __read_mostly;
+EXPORT_SYMBOL(flow_keys_buf_dissector);
static int __init init_default_flow_dissectors(void)
{
--
2.14.3
^ permalink raw reply related
* Re: Silently dropped UDP packets on kernel 4.14
From: Michal Kubecek @ 2018-05-03 9:42 UTC (permalink / raw)
To: Florian Westphal
Cc: Kristian Evensen, Netfilter Development Mailing list,
Network Development
In-Reply-To: <20180503050345.iyasach2ogf25dt3@breakpoint.cc>
On Thu, May 03, 2018 at 07:03:45AM +0200, Florian Westphal wrote:
> Kristian Evensen <kristian.evensen@gmail.com> wrote:
> > I went for the early-insert approached and have patched
>
> I'm sorry for suggesting that.
>
> It doesn't work, because of NAT.
> NAT rewrites packet content and changes the reply tuple, but the tuples
> determine the hash insertion location.
>
> I don't know how to solve this problem.
It's an old problem which surfaces from time to time when some special
conditions make it more visible. When I was facing it in 2015, I found
this thread from as early as 2009:
https://www.spinics.net/lists/linux-net/msg16712.html
In our case, the customer was using IPVS in "one packet scheduling" mode
(it drops the conntrack entry after each packet) which increased the
probability of insert collisions significantly. Using NFQUEUE
We were lucky, though, as it turned out the only reason why customer
needed connection tracking was to make sure fragments of long UDP
datagrams are not sent to different real servers. For newer kernels
after commit 6aafeef03b9d ("netfilter: push reasm skb through instead of
original frag skbs"), this was no longer necessary so that they could
disable connection tracking for these packets.
For older kernels without this change, I tried several ideas, each of
which didn't work for some reason. We ended up with rather hacky
workaround, not dropping the packet on collision (so that its conntrack
wasn't inserted into the table and was dropped once the packet was
sent). It worked fine for our customer but like the early insert
approach, it wouldn't work with NAT.
One of the ideas I had was this:
- keep also unconfirmed conntracks in some data structure
- check new packets also against unconfirmed conntracks
- if it matches an unconfirmed conntrack, defer its processing
until that conntrack is either inserted or discarded
But as it would be rather complicated to implement without races and
harming performance, I didn't want to actually try it until I would
run out of other ideas. With NAT coming to the play, there doesn't seem
to be many other options.
Michal Kubecek
^ permalink raw reply
* Re: [PATCH V2] net/netlink: optimize seq_puts and seq_printf in af_netlink.c
From: Julia Lawall @ 2018-05-03 9:44 UTC (permalink / raw)
To: YU Bo; +Cc: davem, xiyou.wangcong, yuzibode, netdev, kernel-janitors
In-Reply-To: <20180503090901.35bxgzs2tjsl7bqr@debian>
On Thu, 3 May 2018, YU Bo wrote:
> Before the patch, the command `cat /proc/net/netlink` will output like:
>
> https://clbin.com/BojZv
>
> After the patch:
>
> https://clbin.com/lnu4L
>
> The optimization will make convenience for using `cat /proc/net/netlink`
> But,The checkpatch will give a warning:
>
> WARNING: quoted string split across lines
The interest of the checkpatch warning is that someone may want to grep
for something that has actually been split over two lines. If this is not
an issue in your case and if there are good reasons for splitting the
string, then you can ignore checkpatch.
julia
>
> Signed-off-by: Bo YU <tsu.yubo@gmail.com>
> ---
> Changes in v2:
> Do not break the indentation of the code line
> ---
> net/netlink/af_netlink.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index 55342c4d5cec..2e2dd88fc79f 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -2606,13 +2606,13 @@ static int netlink_seq_show(struct seq_file *seq, void
> *v)
> {
> if (v == SEQ_START_TOKEN) {
> seq_puts(seq,
> - "sk Eth Pid Groups "
> - "Rmem Wmem Dump Locks Drops
> Inode\n");
> + "sk Eth Pid Groups "
> + "Rmem Wmem Dump Locks Drops Inode\n");
> } else {
> struct sock *s = v;
> struct netlink_sock *nlk = nlk_sk(s);
>
> - seq_printf(seq, "%pK %-3d %-6u %08x %-8d %-8d %d %-8d %-8d
> %-8lu\n",
> + seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8d
> %-8lu\n",
> s,
> s->sk_protocol,
> nlk->portid,
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [RFC PATCH 1/5] net: macb: Check MDIO state before read/write and use timeouts
From: Claudiu Beznea @ 2018-05-03 10:08 UTC (permalink / raw)
To: harinikatakamlinux, nicolas.ferre, davem
Cc: netdev, linux-kernel, harinik, michals, appanad,
Shubhrajyoti Datta
In-Reply-To: <1521726700-22634-2-git-send-email-harinikatakamlinux@gmail.com>
On 22.03.2018 15:51, harinikatakamlinux@gmail.com wrote:
> From: Harini Katakam <harinik@xilinx.com>
>
> Replace the while loop in MDIO read/write functions with a timeout.
> In addition, add a check for MDIO bus busy before initiating a new
> operation as well to make sure there is no ongoing MDIO operation.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> Signed-off-by: Harini Katakam <harinik@xilinx.com>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 54 ++++++++++++++++++++++++++++++--
> 1 file changed, 52 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index d09bd43..f4030c1 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -321,6 +321,21 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
> {
> struct macb *bp = bus->priv;
> int value;
> + ulong timeout;
> +
> + timeout = jiffies + msecs_to_jiffies(1000);
> + /* wait for end of transfer */
> + do {
> + if (MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
> + break;
> +
> + cpu_relax();
> + } while (!time_after_eq(jiffies, timeout));
> +
> + if (time_after_eq(jiffies, timeout)) {
> + netdev_err(bp->dev, "wait for end of transfer timed out\n");
> + return -ETIMEDOUT;
> + }
Wouldn't be cleaner to keep it in this way:
while (!MACB_BFEXT(IDLE, macb_readl(bp, NSR))) {
if (time_after_eq(jiffies, timeout) {
netdev_err(bp->dev, "wait for end of transfer timed out\n");
return -ETIMEDOUT;
}
cpu_relax();
}
>
> macb_writel(bp, MAN, (MACB_BF(SOF, MACB_MAN_SOF)
> | MACB_BF(RW, MACB_MAN_READ)
> @@ -328,9 +343,19 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
> | MACB_BF(REGA, regnum)
> | MACB_BF(CODE, MACB_MAN_CODE)));
>
> + timeout = jiffies + msecs_to_jiffies(1000);
> /* wait for end of transfer */
> - while (!MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
> + do {
> + if (MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
> + break;
> +
> cpu_relax();
> + } while (!time_after_eq(jiffies, timeout));
> +
> + if (time_after_eq(jiffies, timeout)) {
> + netdev_err(bp->dev, "wait for end of transfer timed out\n");
> + return -ETIMEDOUT;
> + }
>
> value = MACB_BFEXT(DATA, macb_readl(bp, MAN));
>
> @@ -341,6 +366,21 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
> u16 value)
> {
> struct macb *bp = bus->priv;
> + ulong timeout;
> +
> + timeout = jiffies + msecs_to_jiffies(1000);
> + /* wait for end of transfer */
> + do {
> + if (MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
> + break;
> +
> + cpu_relax();
> + } while (!time_after_eq(jiffies, timeout));
> +
> + if (time_after_eq(jiffies, timeout)) {
> + netdev_err(bp->dev, "wait for end of transfer timed out\n");
> + return -ETIMEDOUT;
> + }
>
> macb_writel(bp, MAN, (MACB_BF(SOF, MACB_MAN_SOF)
> | MACB_BF(RW, MACB_MAN_WRITE)
> @@ -349,9 +389,19 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
> | MACB_BF(CODE, MACB_MAN_CODE)
> | MACB_BF(DATA, value)));
>
> + timeout = jiffies + msecs_to_jiffies(1000);
> /* wait for end of transfer */
> - while (!MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
> + do {
> + if (MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
> + break;
> +
> cpu_relax();
> + } while (!time_after_eq(jiffies, timeout));
> +
> + if (time_after_eq(jiffies, timeout)) {
> + netdev_err(bp->dev, "wait for end of transfer timed out\n");
> + return -ETIMEDOUT;
> + }
>
> return 0;
> }
>
^ permalink raw reply
* Re: [RFC PATCH 3/5] net: macb: Add pm runtime support
From: Claudiu Beznea @ 2018-05-03 10:09 UTC (permalink / raw)
To: harinikatakamlinux, nicolas.ferre, davem
Cc: netdev, linux-kernel, harinik, michals, appanad,
Shubhrajyoti Datta
In-Reply-To: <1521726700-22634-4-git-send-email-harinikatakamlinux@gmail.com>
On 22.03.2018 15:51, harinikatakamlinux@gmail.com wrote:
> From: Harini Katakam <harinik@xilinx.com>
>
> Add runtime pm functions and move clock handling there.
> Enable clocks in mdio read/write functions.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> Signed-off-by: Harini Katakam <harinik@xilinx.com>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 105 ++++++++++++++++++++++++++-----
> 1 file changed, 90 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index ae61927..ce75088 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -35,6 +35,7 @@
> #include <linux/ip.h>
> #include <linux/udp.h>
> #include <linux/tcp.h>
> +#include <linux/pm_runtime.h>
> #include "macb.h"
>
> #define MACB_RX_BUFFER_SIZE 128
> @@ -77,6 +78,7 @@
> * 1 frame time (10 Mbits/s, full-duplex, ignoring collisions)
> */
> #define MACB_HALT_TIMEOUT 1230
> +#define MACB_PM_TIMEOUT 100 /* ms */
>
> /* DMA buffer descriptor might be different size
> * depends on hardware configuration:
> @@ -321,8 +323,13 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
> {
> struct macb *bp = bus->priv;
> int value;
> + int err;
> ulong timeout;
>
> + err = pm_runtime_get_sync(&bp->pdev->dev);
> + if (err < 0)
You have to call pm_runtime_put_noidle() or something similar to decrement the
dev->power.usage_count.
> + return err;
> +
> timeout = jiffies + msecs_to_jiffies(1000);
> /* wait for end of transfer */
> do {
> @@ -334,6 +341,8 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
>
> if (time_after_eq(jiffies, timeout)) {
> netdev_err(bp->dev, "wait for end of transfer timed out\n");
For this:
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);> return -ETIMEDOUT;
> }
>
> @@ -354,11 +363,15 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum)
>
> if (time_after_eq(jiffies, timeout)) {
> netdev_err(bp->dev, "wait for end of transfer timed out\n");
And this:
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);
> return -ETIMEDOUT;
I would use a "goto" instruction, e.g.:
value = -ETIMEDOUT;
goto out;
> }
>
> value = MACB_BFEXT(DATA, macb_readl(bp, MAN));
>
out:
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);
> return value;
> }
>
> @@ -366,8 +379,13 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
> u16 value)
> {
> struct macb *bp = bus->priv;
> + int err;
> ulong timeout;
>
> + err = pm_runtime_get_sync(&bp->pdev->dev);> + if (err < 0)
Ditto
> + return err;
> +
> timeout = jiffies + msecs_to_jiffies(1000);
> /* wait for end of transfer */
> do {
> @@ -379,6 +397,8 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
>
> if (time_after_eq(jiffies, timeout)) {
> netdev_err(bp->dev, "wait for end of transfer timed out\n");
Ditto
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);
> return -ETIMEDOUT;
> }
>
> @@ -400,9 +420,13 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
>
> if (time_after_eq(jiffies, timeout)) {
> netdev_err(bp->dev, "wait for end of transfer timed out\n");
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);
Ditto
> return -ETIMEDOUT;
> }
>
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);
> return 0;
> }
>
> @@ -2338,6 +2362,10 @@ static int macb_open(struct net_device *dev)
>
> netdev_dbg(bp->dev, "open\n");
>
> + err = pm_runtime_get_sync(&bp->pdev->dev);
> + if (err < 0)
Ditto
> + return err;
> +
Below, in macb_open() you have a return err; case:
err = macb_alloc_consistent(bp);
if (err) {
netdev_err(dev, "Unable to allocate DMA memory (error %d)\n",
err);
return err;
}
You have to undo pm_runtime_get_sync() with pm_runtime_put_sync() or something
similar to decrement dev->power.usage_count.
> /* carrier starts down */
> netif_carrier_off(dev);
>
> @@ -2397,6 +2425,8 @@ static int macb_close(struct net_device *dev)
> if (bp->ptp_info)
> bp->ptp_info->ptp_remove(dev);
>
> + pm_runtime_put(&bp->pdev->dev);
> +
> return 0;
> }
>
> @@ -3949,6 +3979,11 @@ static int macb_probe(struct platform_device *pdev)
> if (err)
> return err;
>
> + pm_runtime_set_autosuspend_delay(&pdev->dev, MACB_PM_TIMEOUT);
> + pm_runtime_use_autosuspend(&pdev->dev);
> + pm_runtime_get_noresume(&pdev->dev);
> + pm_runtime_set_active(&pdev->dev);
> + pm_runtime_enable(&pdev->dev);
> native_io = hw_is_native_io(mem);
>
> macb_probe_queues(mem, native_io, &queue_mask, &num_queues);
> @@ -4062,6 +4097,9 @@ static int macb_probe(struct platform_device *pdev)
> macb_is_gem(bp) ? "GEM" : "MACB", macb_readl(bp, MID),
> dev->base_addr, dev->irq, dev->dev_addr);
>
> + pm_runtime_mark_last_busy(&bp->pdev->dev);
> + pm_runtime_put_autosuspend(&bp->pdev->dev);
> +
> return 0;
>
> err_out_unregister_mdio:
> @@ -4081,6 +4119,9 @@ static int macb_probe(struct platform_device *pdev)
> clk_disable_unprepare(pclk);
> clk_disable_unprepare(rx_clk);
> clk_disable_unprepare(tsu_clk);
> + pm_runtime_disable(&pdev->dev);
> + pm_runtime_set_suspended(&pdev->dev);
> + pm_runtime_dont_use_autosuspend(&pdev->dev);
>
> return err;
> }
> @@ -4104,11 +4145,16 @@ static int macb_remove(struct platform_device *pdev)
> mdiobus_free(bp->mii_bus);
>
> unregister_netdev(dev);
> - clk_disable_unprepare(bp->tx_clk);
> - clk_disable_unprepare(bp->hclk);
> - clk_disable_unprepare(bp->pclk);
> - clk_disable_unprepare(bp->rx_clk);
> - clk_disable_unprepare(bp->tsu_clk);
> + pm_runtime_disable(&pdev->dev);
> + pm_runtime_dont_use_autosuspend(&pdev->dev);
> + if (!pm_runtime_suspended(&pdev->dev)) {
> + clk_disable_unprepare(bp->tx_clk);
> + clk_disable_unprepare(bp->hclk);
> + clk_disable_unprepare(bp->pclk);
> + clk_disable_unprepare(bp->rx_clk);
> + clk_disable_unprepare(bp->tsu_clk);
> + pm_runtime_set_suspended(&pdev->dev);
This is driver remove function. Shouldn't clocks be removed?
> + }> of_node_put(bp->phy_node);
> free_netdev(dev);
> }
> @@ -4129,13 +4175,9 @@ static int __maybe_unused macb_suspend(struct device *dev)
> macb_writel(bp, IER, MACB_BIT(WOL));
> macb_writel(bp, WOL, MACB_BIT(MAG));
> enable_irq_wake(bp->queues[0].irq);
> - } else {
> - clk_disable_unprepare(bp->tx_clk);
> - clk_disable_unprepare(bp->hclk);
> - clk_disable_unprepare(bp->pclk);
> - clk_disable_unprepare(bp->rx_clk);
> }
> - clk_disable_unprepare(bp->tsu_clk);
> +
> + pm_runtime_force_suspend(dev);
>
> return 0;
> }
> @@ -4146,11 +4188,43 @@ static int __maybe_unused macb_resume(struct device *dev)
> struct net_device *netdev = platform_get_drvdata(pdev);
> struct macb *bp = netdev_priv(netdev);
>
> + pm_runtime_force_resume(dev);
> +
> if (bp->wol & MACB_WOL_ENABLED) {
> macb_writel(bp, IDR, MACB_BIT(WOL));
> macb_writel(bp, WOL, 0);
> disable_irq_wake(bp->queues[0].irq);
> - } else {
> + }
> +
> + netif_device_attach(netdev);
> +
> + return 0;
> +}
> +
> +static int __maybe_unused macb_runtime_suspend(struct device *dev)
> +{
> + struct platform_device *pdev = to_platform_device(dev);
> + struct net_device *netdev = platform_get_drvdata(pdev);
> + struct macb *bp = netdev_priv(netdev);
> +
> + if (!(device_may_wakeup(&bp->dev->dev))) {
> + clk_disable_unprepare(bp->tx_clk);
> + clk_disable_unprepare(bp->hclk);
> + clk_disable_unprepare(bp->pclk);
> + clk_disable_unprepare(bp->rx_clk);
> + }
> + clk_disable_unprepare(bp->tsu_clk);
> +
> + return 0;
> +}
> +
> +static int __maybe_unused macb_runtime_resume(struct device *dev)
> +{
> + struct platform_device *pdev = to_platform_device(dev);
> + struct net_device *netdev = platform_get_drvdata(pdev);
> + struct macb *bp = netdev_priv(netdev);
> +
> + if (!(device_may_wakeup(&bp->dev->dev))) {
> clk_prepare_enable(bp->pclk);
> clk_prepare_enable(bp->hclk);
> clk_prepare_enable(bp->tx_clk);
> @@ -4158,12 +4232,13 @@ static int __maybe_unused macb_resume(struct device *dev)
> }
> clk_prepare_enable(bp->tsu_clk);
>
> - netif_device_attach(netdev);
> -
> return 0;
> }
>
> -static SIMPLE_DEV_PM_OPS(macb_pm_ops, macb_suspend, macb_resume);
> +static const struct dev_pm_ops macb_pm_ops = {
> + SET_SYSTEM_SLEEP_PM_OPS(macb_suspend, macb_resume)
> + SET_RUNTIME_PM_OPS(macb_runtime_suspend, macb_runtime_resume, NULL)
> +};
>
> static struct platform_driver macb_driver = {
> .probe = macb_probe,
>
^ permalink raw reply
* Re: [RFC PATCH 4/5] net: macb: Add support for suspend/resume with full power down
From: Claudiu Beznea @ 2018-05-03 10:09 UTC (permalink / raw)
To: harinikatakamlinux, nicolas.ferre, davem
Cc: netdev, linux-kernel, harinik, michals, appanad
In-Reply-To: <1521726700-22634-5-git-send-email-harinikatakamlinux@gmail.com>
On 22.03.2018 15:51, harinikatakamlinux@gmail.com wrote:
> From: Harini Katakam <harinik@xilinx.com>
>
> When macb device is suspended and system is powered down, the clocks
> are removed and hence macb should be closed gracefully and restored
> upon resume.
Is this a power saving mode which shut down the core?
This patch does the same by switching off the net device,
> suspending phy and performing necessary cleanup of interrupts and BDs.
> Upon resume, all these are reinitialized again.
>
> Reset of macb device is done only when GEM is not a wake device.
> Even when gem is a wake device, tx queues can be stopped and ptp device
> can be closed (tsu clock will be disabled in pm_runtime_suspend) as
> wake event detection has no dependency on this.
>
> Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
> Signed-off-by: Harini Katakam <harinik@xilinx.com>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 38 ++++++++++++++++++++++++++++++--
> 1 file changed, 36 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index ce75088..bca91bd 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4167,16 +4167,33 @@ static int __maybe_unused macb_suspend(struct device *dev)
> struct platform_device *pdev = to_platform_device(dev);
> struct net_device *netdev = platform_get_drvdata(pdev);
> struct macb *bp = netdev_priv(netdev);
> + struct macb_queue *queue = bp->queues;
> + unsigned long flags;
> + unsigned int q;
> +
> + if (!netif_running(netdev))
> + return 0;
>
> - netif_carrier_off(netdev);
> - netif_device_detach(netdev);
>
> if (bp->wol & MACB_WOL_ENABLED) {
> macb_writel(bp, IER, MACB_BIT(WOL));
> macb_writel(bp, WOL, MACB_BIT(MAG));
> enable_irq_wake(bp->queues[0].irq);
> + netif_device_detach(netdev);
> + } else {
> + netif_device_detach(netdev);
> + for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
> + napi_disable(&queue->napi);
> + phy_stop(netdev->phydev);
> + phy_suspend(netdev->phydev);
> + spin_lock_irqsave(&bp->lock, flags);
> + macb_reset_hw(bp);
> + spin_unlock_irqrestore(&bp->lock, flags);
Wouldn't be simple to just call macb_close() here?
> }
>
> + netif_carrier_off(netdev);
> + if (bp->ptp_info)
> + bp->ptp_info->ptp_remove(netdev);
> pm_runtime_force_suspend(dev);
>
> return 0;
> @@ -4187,6 +4204,11 @@ static int __maybe_unused macb_resume(struct device *dev)
> struct platform_device *pdev = to_platform_device(dev);
> struct net_device *netdev = platform_get_drvdata(pdev);
> struct macb *bp = netdev_priv(netdev);
> + struct macb_queue *queue = bp->queues;
> + unsigned int q;
> +
> + if (!netif_running(netdev))
> + return 0;
>
> pm_runtime_force_resume(dev);
>
> @@ -4194,9 +4216,21 @@ static int __maybe_unused macb_resume(struct device *dev)
> macb_writel(bp, IDR, MACB_BIT(WOL));
> macb_writel(bp, WOL, 0);
> disable_irq_wake(bp->queues[0].irq);
> + } else {
> + macb_writel(bp, NCR, MACB_BIT(MPE));
> + for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
> + napi_enable(&queue->napi);
> + netif_carrier_on(netdev);
> + phy_resume(netdev->phydev);
> + phy_start(netdev->phydev);
> }
>
> + bp->macbgem_ops.mog_init_rings(bp);
> + macb_init_hw(bp);
> + macb_set_rx_mode(netdev);
> netif_device_attach(netdev);
> + if (bp->ptp_info)
> + bp->ptp_info->ptp_init(netdev);
Wouln't be simpler to call macb_open() here?
>
> return 0;
> }
>
^ permalink raw reply
* [PATCH net-next mlxsw 0/3] selftests: forwarding: Updates to sysctl handling
From: Petr Machata @ 2018-05-03 10:36 UTC (permalink / raw)
To: netdev, linux-kselftest; +Cc: davem, shuah
Some selftests need to adjust sysctl settings. In order to be neutral to
the system that the test is run on, it is a good practice to change back
to the original setting after the test ends. That involves some
boilerplate that can be abstracted away.
In patch #1, introduce two functions, sysctl_set() and sysctl_restore().
The former stores the current value of a given setting, and sets a new
value. The latter restores the setting to the previously-stored value.
In patch #2, use these wrappers in a number of tests.
Additionally in patch #3, fix a problem in mirror_gre_nh.sh, which
neglected to set a sysctl that's crucial for the test to work.
Petr Machata (3):
selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()
selftests: forwarding: Use sysctl_set(), sysctl_restore()
selftests: forwarding: mirror_gre_nh: Unset RP filter
tools/testing/selftests/net/forwarding/lib.sh | 28 ++++++++++++++++------
.../selftests/net/forwarding/mirror_gre_changes.sh | 7 ++----
.../selftests/net/forwarding/mirror_gre_nh.sh | 6 +++++
.../selftests/net/forwarding/router_multipath.sh | 12 ++++------
4 files changed, 33 insertions(+), 20 deletions(-)
--
2.4.11
^ permalink raw reply
* [PATCH net-next mlxsw 1/3] selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()
From: Petr Machata @ 2018-05-03 10:36 UTC (permalink / raw)
To: netdev, linux-kselftest; +Cc: davem, shuah
In-Reply-To: <cover.1525343276.git.petrm@mellanox.com>
Add two helper functions: sysctl_set() to change the value of a given
sysctl setting, and sysctl_restore() to change it back to what it was.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 7fe6d27..426b294 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -401,6 +401,23 @@ bridge_ageing_time_get()
echo $((ageing_time / 100))
}
+declare -A SYSCTL_ORIG
+sysctl_set()
+{
+ local key=$1; shift
+ local value=$1; shift
+
+ SYSCTL_ORIG[$key]=$(sysctl -n $key)
+ sysctl -qw $key=$value
+}
+
+sysctl_restore()
+{
+ local key=$1; shift
+
+ sysctl -qw $key=${SYSCTL_ORIG["$key"]}
+}
+
forwarding_enable()
{
ipv4_fwd=$(sysctl -n net.ipv4.conf.all.forwarding)
--
2.4.11
^ permalink raw reply related
* [PATCH net-next mlxsw 2/3] selftests: forwarding: Use sysctl_set(), sysctl_restore()
From: Petr Machata @ 2018-05-03 10:37 UTC (permalink / raw)
To: netdev, linux-kselftest; +Cc: davem, shuah
In-Reply-To: <cover.1525343276.git.petrm@mellanox.com>
Instead of hand-managing the sysctl set and restore, use the wrappers
sysctl_set() and sysctl_restore() to do the bookkeeping automatically.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 11 ++++-------
tools/testing/selftests/net/forwarding/mirror_gre_changes.sh | 7 ++-----
tools/testing/selftests/net/forwarding/router_multipath.sh | 12 ++++--------
3 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 426b294..a7a6750 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -420,17 +420,14 @@ sysctl_restore()
forwarding_enable()
{
- ipv4_fwd=$(sysctl -n net.ipv4.conf.all.forwarding)
- ipv6_fwd=$(sysctl -n net.ipv6.conf.all.forwarding)
-
- sysctl -q -w net.ipv4.conf.all.forwarding=1
- sysctl -q -w net.ipv6.conf.all.forwarding=1
+ sysctl_set net.ipv4.conf.all.forwarding 1
+ sysctl_set net.ipv6.conf.all.forwarding 1
}
forwarding_restore()
{
- sysctl -q -w net.ipv6.conf.all.forwarding=$ipv6_fwd
- sysctl -q -w net.ipv4.conf.all.forwarding=$ipv4_fwd
+ sysctl_restore net.ipv6.conf.all.forwarding
+ sysctl_restore net.ipv4.conf.all.forwarding
}
tc_offload_check()
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
index fdb612f..50ab346 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh
@@ -36,9 +36,7 @@ setup_prepare()
# This test downs $swp3, which deletes the configured IPv6 address
# unless this sysctl is set.
- local key=net.ipv6.conf.$swp3.keep_addr_on_down
- SWP3_KEEP_ADDR_ON_DOWN=$(sysctl -n $key)
- sysctl -qw $key=1
+ sysctl_set net.ipv6.conf.$swp3.keep_addr_on_down 1
ip address add dev $swp3 192.0.2.129/28
ip address add dev $h3 192.0.2.130/28
@@ -57,8 +55,7 @@ cleanup()
ip address del dev $h3 192.0.2.130/28
ip address del dev $swp3 192.0.2.129/28
- local key=net.ipv6.conf.$swp3.keep_addr_on_down
- sysctl -qw $key=$SWP3_KEEP_ADDR_ON_DOWN
+ sysctl_restore net.ipv6.conf.$swp3.keep_addr_on_down
mirror_gre_topo_destroy
vrf_cleanup
diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh
index 6c43762..8b6d0fb 100755
--- a/tools/testing/selftests/net/forwarding/router_multipath.sh
+++ b/tools/testing/selftests/net/forwarding/router_multipath.sh
@@ -205,13 +205,11 @@ multipath4_test()
local weight_rp13=$3
local t0_rp12 t0_rp13 t1_rp12 t1_rp13
local packets_rp12 packets_rp13
- local hash_policy
# Transmit multiple flows from h1 to h2 and make sure they are
# distributed between both multipath links (rp12 and rp13)
# according to the configured weights.
- hash_policy=$(sysctl -n net.ipv4.fib_multipath_hash_policy)
- sysctl -q -w net.ipv4.fib_multipath_hash_policy=1
+ sysctl_set net.ipv4.fib_multipath_hash_policy 1
ip route replace 198.51.100.0/24 vrf vrf-r1 \
nexthop via 169.254.2.22 dev $rp12 weight $weight_rp12 \
nexthop via 169.254.3.23 dev $rp13 weight $weight_rp13
@@ -233,7 +231,7 @@ multipath4_test()
ip route replace 198.51.100.0/24 vrf vrf-r1 \
nexthop via 169.254.2.22 dev $rp12 \
nexthop via 169.254.3.23 dev $rp13
- sysctl -q -w net.ipv4.fib_multipath_hash_policy=$hash_policy
+ sysctl_restore net.ipv4.fib_multipath_hash_policy
}
multipath6_l4_test()
@@ -243,13 +241,11 @@ multipath6_l4_test()
local weight_rp13=$3
local t0_rp12 t0_rp13 t1_rp12 t1_rp13
local packets_rp12 packets_rp13
- local hash_policy
# Transmit multiple flows from h1 to h2 and make sure they are
# distributed between both multipath links (rp12 and rp13)
# according to the configured weights.
- hash_policy=$(sysctl -n net.ipv6.fib_multipath_hash_policy)
- sysctl -q -w net.ipv6.fib_multipath_hash_policy=1
+ sysctl_set net.ipv6.fib_multipath_hash_policy 1
ip route replace 2001:db8:2::/64 vrf vrf-r1 \
nexthop via fe80:2::22 dev $rp12 weight $weight_rp12 \
@@ -272,7 +268,7 @@ multipath6_l4_test()
nexthop via fe80:2::22 dev $rp12 \
nexthop via fe80:3::23 dev $rp13
- sysctl -q -w net.ipv6.fib_multipath_hash_policy=$hash_policy
+ sysctl_restore net.ipv6.fib_multipath_hash_policy
}
multipath6_test()
--
2.4.11
^ permalink raw reply related
* [PATCH net-next mlxsw 3/3] selftests: forwarding: mirror_gre_nh: Unset RP filter
From: Petr Machata @ 2018-05-03 10:37 UTC (permalink / raw)
To: netdev, linux-kselftest; +Cc: davem, shuah
In-Reply-To: <cover.1525343276.git.petrm@mellanox.com>
The test fails to work if reverse-path filtering is in effect on the
mirrored-to host interface, or for all interfaces.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
---
tools/testing/selftests/net/forwarding/mirror_gre_nh.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
index a0d1ad4..8fa681e 100755
--- a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
+++ b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh
@@ -29,6 +29,9 @@ setup_prepare()
swp3=${NETIFS[p5]}
h3=${NETIFS[p6]}
+ sysctl_set net.ipv4.conf.all.rp_filter 0
+ sysctl_set net.ipv4.conf.$h3.rp_filter 0
+
vrf_prepare
mirror_gre_topo_create
@@ -60,6 +63,9 @@ cleanup()
mirror_gre_topo_destroy
vrf_cleanup
+
+ sysctl_restore net.ipv4.conf.$h3.rp_filter
+ sysctl_restore net.ipv4.conf.all.rp_filter
}
test_gretap()
--
2.4.11
^ permalink raw reply related
* [PATCH net-next] net: bridge: avoid duplicate notification on up/down/change netdev events
From: Nikolay Aleksandrov @ 2018-05-03 10:47 UTC (permalink / raw)
To: netdev; +Cc: roopa, davem, stephen, bridge, Nikolay Aleksandrov
While handling netdevice events, br_device_event() sometimes uses
br_stp_(disable|enable)_port which unconditionally send a notification,
but then a second notification for the same event is sent at the end of
the br_device_event() function. To avoid sending duplicate notifications
in such cases, check if one has already been sent (i.e.
br_stp_enable/disable_port have been called).
The patch is based on a change by Satish Ashok.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
We've been running with a similar patch for over an year, it's been
thoroughly tested. Sending for net-next since it's an improvement and
not really a bug fix.
net/bridge/br.c | 12 ++++++++----
net/bridge/br_if.c | 11 ++++++++---
net/bridge/br_private.h | 2 +-
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/net/bridge/br.c b/net/bridge/br.c
index 671d13c10f6f..2ca035054664 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -34,6 +34,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
struct net_device *dev = netdev_notifier_info_to_dev(ptr);
struct net_bridge_port *p;
struct net_bridge *br;
+ bool notified = false;
bool changed_addr;
int err;
@@ -67,7 +68,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
break;
case NETDEV_CHANGE:
- br_port_carrier_check(p);
+ br_port_carrier_check(p, ¬ified);
break;
case NETDEV_FEAT_CHANGE:
@@ -76,8 +77,10 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
case NETDEV_DOWN:
spin_lock_bh(&br->lock);
- if (br->dev->flags & IFF_UP)
+ if (br->dev->flags & IFF_UP) {
br_stp_disable_port(p);
+ notified = true;
+ }
spin_unlock_bh(&br->lock);
break;
@@ -85,6 +88,7 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
if (netif_running(br->dev) && netif_oper_up(dev)) {
spin_lock_bh(&br->lock);
br_stp_enable_port(p);
+ notified = true;
spin_unlock_bh(&br->lock);
}
break;
@@ -110,8 +114,8 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
}
/* Events that may cause spanning tree to refresh */
- if (event == NETDEV_CHANGEADDR || event == NETDEV_UP ||
- event == NETDEV_CHANGE || event == NETDEV_DOWN)
+ if (!notified && (event == NETDEV_CHANGEADDR || event == NETDEV_UP ||
+ event == NETDEV_CHANGE || event == NETDEV_DOWN))
br_ifinfo_notify(RTM_NEWLINK, NULL, p);
return NOTIFY_DONE;
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 82c1a6f430b3..e3a8ea1bcbe2 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -64,7 +64,7 @@ static int port_cost(struct net_device *dev)
/* Check for port carrier transitions. */
-void br_port_carrier_check(struct net_bridge_port *p)
+void br_port_carrier_check(struct net_bridge_port *p, bool *notified)
{
struct net_device *dev = p->dev;
struct net_bridge *br = p->br;
@@ -73,16 +73,21 @@ void br_port_carrier_check(struct net_bridge_port *p)
netif_running(dev) && netif_oper_up(dev))
p->path_cost = port_cost(dev);
+ *notified = false;
if (!netif_running(br->dev))
return;
spin_lock_bh(&br->lock);
if (netif_running(dev) && netif_oper_up(dev)) {
- if (p->state == BR_STATE_DISABLED)
+ if (p->state == BR_STATE_DISABLED) {
br_stp_enable_port(p);
+ *notified = true;
+ }
} else {
- if (p->state != BR_STATE_DISABLED)
+ if (p->state != BR_STATE_DISABLED) {
br_stp_disable_port(p);
+ *notified = true;
+ }
}
spin_unlock_bh(&br->lock);
}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 1a5093115534..0ddeeea2c6a7 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -573,7 +573,7 @@ void br_flood(struct net_bridge *br, struct sk_buff *skb,
enum br_pkt_type pkt_type, bool local_rcv, bool local_orig);
/* br_if.c */
-void br_port_carrier_check(struct net_bridge_port *p);
+void br_port_carrier_check(struct net_bridge_port *p, bool *notified);
int br_add_bridge(struct net *net, const char *name);
int br_del_bridge(struct net *net, const char *name);
int br_add_if(struct net_bridge *br, struct net_device *dev,
--
2.11.0
^ permalink raw reply related
* Re: [PATCH V2] net/netlink: optimize seq_puts and seq_printf in af_netlink.c
From: YU Bo @ 2018-05-03 10:57 UTC (permalink / raw)
To: Julia Lawall; +Cc: davem, xiyou.wangcong, yuzibode, netdev, kernel-janitors
In-Reply-To: <alpine.DEB.2.20.1805031142420.3385@hadrien>
Hello,
On Thu, May 03, 2018 at 11:44:33AM +0200, Julia Lawall wrote:
>
>
>On Thu, 3 May 2018, YU Bo wrote:
>
>> Before the patch, the command `cat /proc/net/netlink` will output like:
>>
>> https://clbin.com/BojZv
>>
>> After the patch:
>>
>> https://clbin.com/lnu4L
>>
>> The optimization will make convenience for using `cat /proc/net/netlink`
>> But,The checkpatch will give a warning:
>>
>> WARNING: quoted string split across lines
>
>The interest of the checkpatch warning is that someone may want to grep
>for something that has actually been split over two lines. If this is not
>an issue in your case and if there are good reasons for splitting the
>string, then you can ignore checkpatch.
Yes, the warning will be generated in original af_netlink.c and i dom't
think to split it is better.
Thank you!
>
>julia
>
>>
>> Signed-off-by: Bo YU <tsu.yubo@gmail.com>
>> ---
>> Changes in v2:
>> Do not break the indentation of the code line
>> ---
>> net/netlink/af_netlink.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
>> index 55342c4d5cec..2e2dd88fc79f 100644
>> --- a/net/netlink/af_netlink.c
>> +++ b/net/netlink/af_netlink.c
>> @@ -2606,13 +2606,13 @@ static int netlink_seq_show(struct seq_file *seq, void
>> *v)
>> {
>> if (v == SEQ_START_TOKEN) {
>> seq_puts(seq,
>> - "sk Eth Pid Groups "
>> - "Rmem Wmem Dump Locks Drops
>> Inode\n");
>> + "sk Eth Pid Groups "
>> + "Rmem Wmem Dump Locks Drops Inode\n");
>> } else {
>> struct sock *s = v;
>> struct netlink_sock *nlk = nlk_sk(s);
>>
>> - seq_printf(seq, "%pK %-3d %-6u %08x %-8d %-8d %d %-8d %-8d
>> %-8lu\n",
>> + seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8d
>> %-8lu\n",
>> s,
>> s->sk_protocol,
>> nlk->portid,
>> --
>> 2.11.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
^ permalink raw reply
* Re: [RFC PATCH 1/5] net: macb: Check MDIO state before read/write and use timeouts
From: Harini Katakam @ 2018-05-03 10:58 UTC (permalink / raw)
To: Claudiu Beznea
Cc: Nicolas Ferre, David Miller, netdev, linux-kernel, michals,
appanad, Shubhrajyoti Datta
In-Reply-To: <81b5b276-e59c-79d8-1616-79ff0e9c5f17@microchip.com>
Hi Claudiu,
On Thu, May 3, 2018 at 3:38 PM, Claudiu Beznea
<Claudiu.Beznea@microchip.com> wrote:
>
>
> On 22.03.2018 15:51, harinikatakamlinux@gmail.com wrote:
>> From: Harini Katakam <harinik@xilinx.com>
>>
<snip>
>> + ulong timeout;
>> +
>> + timeout = jiffies + msecs_to_jiffies(1000);
>> + /* wait for end of transfer */
>> + do {
>> + if (MACB_BFEXT(IDLE, macb_readl(bp, NSR)))
>> + break;
>> +
>> + cpu_relax();
>> + } while (!time_after_eq(jiffies, timeout));
>> +
>> + if (time_after_eq(jiffies, timeout)) {
>> + netdev_err(bp->dev, "wait for end of transfer timed out\n");
>> + return -ETIMEDOUT;
>> + }
>
> Wouldn't be cleaner to keep it in this way:
>
> while (!MACB_BFEXT(IDLE, macb_readl(bp, NSR))) {
> if (time_after_eq(jiffies, timeout) {
> netdev_err(bp->dev, "wait for end of transfer timed out\n");
> return -ETIMEDOUT;
> }
> cpu_relax();
> }
>
Thanks for the review.
Sure, will update in next version.
Regards,
Harini
^ permalink raw reply
* Re: [PATCH net] tcp: restore autocorking
From: Tariq Toukan @ 2018-05-03 11:06 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Tal Gilboa
Cc: netdev, Michael Wenig, Eric Dumazet
In-Reply-To: <20180503032513.210324-1-edumazet@google.com>
On 03/05/2018 6:25 AM, Eric Dumazet wrote:
> When adding rb-tree for TCP retransmit queue, we inadvertently broke
> TCP autocorking.
>
> tcp_should_autocork() should really check if the rtx queue is not empty.
>
Hi Eric,
We are glad to see that the issue that Tal investigated and reported [1]
is now addressed.
Thanks for doing that!
Tal, let’s perf test to see the effect of this fix.
Best,
Tariq
[1] https://patchwork.ozlabs.org/cover/822218/
^ permalink raw reply
* Re: [RFC PATCH 3/5] net: macb: Add pm runtime support
From: Harini Katakam @ 2018-05-03 11:13 UTC (permalink / raw)
To: Claudiu Beznea
Cc: Nicolas Ferre, David Miller, netdev, linux-kernel, michals,
appanad, Shubhrajyoti Datta
In-Reply-To: <48b8ea24-52be-c314-f674-1a6cae4d95f4@microchip.com>
Hi Claudiu,
On Thu, May 3, 2018 at 3:39 PM, Claudiu Beznea
<Claudiu.Beznea@microchip.com> wrote:
>
>
> On 22.03.2018 15:51, harinikatakamlinux@gmail.com wrote:
>> From: Harini Katakam <harinik@xilinx.com>
<snip>
> I would use a "goto" instruction, e.g.:
> value = -ETIMEDOUT;
> goto out;
>
Will do
>
> Below, in macb_open() you have a return err; case:
> err = macb_alloc_consistent(bp);
> if (err) {
> netdev_err(dev, "Unable to allocate DMA memory (error %d)\n",
> err);
> return err;
> }
>
> You have to undo pm_runtime_get_sync() with pm_runtime_put_sync() or something
> similar to decrement dev->power.usage_count.
Will do
<snip>
>> @@ -4104,11 +4145,16 @@ static int macb_remove(struct platform_device *pdev)
>> mdiobus_free(bp->mii_bus);
>>
>> unregister_netdev(dev);
>> - clk_disable_unprepare(bp->tx_clk);
>> - clk_disable_unprepare(bp->hclk);
>> - clk_disable_unprepare(bp->pclk);
>> - clk_disable_unprepare(bp->rx_clk);
>> - clk_disable_unprepare(bp->tsu_clk);
>> + pm_runtime_disable(&pdev->dev);
>> + pm_runtime_dont_use_autosuspend(&pdev->dev);
>> + if (!pm_runtime_suspended(&pdev->dev)) {
>> + clk_disable_unprepare(bp->tx_clk);
>> + clk_disable_unprepare(bp->hclk);
>> + clk_disable_unprepare(bp->pclk);
>> + clk_disable_unprepare(bp->rx_clk);
>> + clk_disable_unprepare(bp->tsu_clk);
>> + pm_runtime_set_suspended(&pdev->dev);
>
> This is driver remove function. Shouldn't clocks be removed?
clk_disable_unprepare IS being done here.
The check for !pm_runtime_suspended is just to make sure the
clocks are not already removed (in runtime_suspend).
Regards,
Harini
^ permalink raw reply
* Re: Silently dropped UDP packets on kernel 4.14
From: Kristian Evensen @ 2018-05-03 11:19 UTC (permalink / raw)
To: Michal Kubecek
Cc: Florian Westphal, Netfilter Development Mailing list,
Network Development
In-Reply-To: <20180503094241.mfos3scewpct3dnu@unicorn.suse.cz>
Hi Michal,
Thanks for providing a nice summary of your experience when dealing
with this problem. Always nice to know that I am not alone :)
On Thu, May 3, 2018 at 11:42 AM, Michal Kubecek <mkubecek@suse.cz> wrote:
> One of the ideas I had was this:
>
> - keep also unconfirmed conntracks in some data structure
> - check new packets also against unconfirmed conntracks
> - if it matches an unconfirmed conntrack, defer its processing
> until that conntrack is either inserted or discarded
I was thinking about something along the same lines and came to the
same conclusion, it is a lot of hassle and work for a very special
case. I think that replacing the conntrack entry is a good compromise,
it improves on the current situation, and allows for the creation of
"perfect" solutions in user-space. For example, a user can keep track
of seen UDP flows, and then only release new packets belonging to the
same flow when the conntrack entry is created.
BR,
Kristian
^ permalink raw reply
* Re: [RFC PATCH 4/5] net: macb: Add support for suspend/resume with full power down
From: Harini Katakam @ 2018-05-03 11:20 UTC (permalink / raw)
To: Claudiu Beznea
Cc: Nicolas Ferre, David Miller, netdev, linux-kernel, michals,
appanad
In-Reply-To: <35d980af-b9d5-495e-88af-c4fc911b8429@microchip.com>
Hi Claudiu,
On Thu, May 3, 2018 at 3:39 PM, Claudiu Beznea
<Claudiu.Beznea@microchip.com> wrote:
>
>
> On 22.03.2018 15:51, harinikatakamlinux@gmail.com wrote:
>> From: Harini Katakam <harinik@xilinx.com>
>>
>> When macb device is suspended and system is powered down, the clocks
>> are removed and hence macb should be closed gracefully and restored
>> upon resume.
>
> Is this a power saving mode which shut down the core?
The Ethernet IP is suspended and a majority of the SoC is shut down, yes.
<snip>
>> + netif_device_detach(netdev);
>> + } else {
>> + netif_device_detach(netdev);
>> + for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
>> + napi_disable(&queue->napi);
>> + phy_stop(netdev->phydev);
>> + phy_suspend(netdev->phydev);
>> + spin_lock_irqsave(&bp->lock, flags);
>> + macb_reset_hw(bp);
>> + spin_unlock_irqrestore(&bp->lock, flags);
>
> Wouldn't be simple to just call macb_close() here?
<snip>
>
> Wouln't be simpler to call macb_open() here?
No, I think that would be excessive for suspend. This does just
enough to put the IP into suspend and cut off clocks.
For ex., the RX and TX buffers are not freed and allocated again
in this cycle, just the buffer descriptors.
Regards,
Harini
^ permalink raw reply
* Re: [PATCH] sctp: fix a potential missing-check bug
From: Neil Horman @ 2018-05-03 11:23 UTC (permalink / raw)
To: Wenwen Wang
Cc: Marcelo Ricardo Leitner, Kangjie Lu, Vlad Yasevich,
David S. Miller, open list:SCTP PROTOCOL,
open list:NETWORKING [GENERAL], open list
In-Reply-To: <CAAa=b7d_dHFUudPdJr3YuDaYRzNvAgHd0Lcubw3Ks94O-2kb3w@mail.gmail.com>
On Wed, May 02, 2018 at 08:07:17PM -0500, Wenwen Wang wrote:
> Hi Marcelo,
>
> I guess I worked on an old version of the kernel. I will re-submit the
> patch. Sorry :(
>
You don't have to resubmit the patch, this isn't broken. As marcelo points out,
a value of zero in this socket option is special, meaning set the fragmentation
to whatever the pmtu is, which will always rest between the min and max segment
lengths.
Neil
> Wenwen
>
> On Wed, May 2, 2018 at 6:23 PM, Marcelo Ricardo Leitner
> <marcelo.leitner@gmail.com> wrote:
> > Hi Wenwen,
> >
> > On Wed, May 02, 2018 at 05:12:45PM -0500, Wenwen Wang wrote:
> >> In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len
> >> and max_len to check whether it is in the appropriate range. If it is not,
> >> an error code -EINVAL will be returned. This is enforced by a security
> >> check. But, this check is only executed when 'val' is not 0. In fact, if
> >
> > Which makes sense, no? Especially if considering that 0 should be an
> > allowed value as it turns off the user limit.
> >
> >> 'val' is 0, it will be assigned with a new value (if the return value of
> >> the function sctp_id2assoc() is not 0) in the following execution. However,
> >> this new value of 'val' is not checked before it is used to assigned to
> >
> > Which 'new value'? val is not set to something new during the
> > function. It always contains the user supplied value.
> >
> >> asoc->user_frag. That means it is possible that the new value of 'val'
> >> could be out of the expected range. This can cause security issues
> >> such as buffer overflows, e.g., the new value of 'val' is used as an index
> >> to access a buffer.
> >>
> >> This patch inserts a check for the new value of 'val' to see if it is in
> >> the expected range. If it is not, an error code -EINVAL will be returned.
> >>
> >> Signed-off-by: Wenwen Wang <wang6495@umn.edu>
> >> ---
> >> net/sctp/socket.c | 21 ++++++++++-----------
> >> 1 file changed, 10 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> >> index 80835ac..2beb601 100644
> >> --- a/net/sctp/socket.c
> >> +++ b/net/sctp/socket.c
> >> @@ -3212,6 +3212,7 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
> >> struct sctp_af *af = sp->pf->af;
> >> struct sctp_assoc_value params;
> >> struct sctp_association *asoc;
> >> + int min_len, max_len;
> >> int val;
> >>
> >> if (optlen == sizeof(int)) {
> >> @@ -3231,19 +3232,15 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
> >> return -EINVAL;
> >> }
> >>
> >> - if (val) {
> >> - int min_len, max_len;
> >> + min_len = SCTP_DEFAULT_MINSEGMENT - af->net_header_len;
> >> + min_len -= af->ip_options_len(sk);
> >> + min_len -= sizeof(struct sctphdr) +
> >> + sizeof(struct sctp_data_chunk);
> >
> > On which tree did you base your patch on? Your patch lacks a tag so it
> > defaults to net-next, and I reworked this section on current net-next
> > and these MTU calculcations are now handled by sctp_mtu_payload().
> >
> > But even for net tree, I don't understand which issue you're fixing
> > here. Actually it seems to me that both codes seems to do the same
> > thing.
> >
> >>
> >> - min_len = SCTP_DEFAULT_MINSEGMENT - af->net_header_len;
> >> - min_len -= af->ip_options_len(sk);
> >> - min_len -= sizeof(struct sctphdr) +
> >> - sizeof(struct sctp_data_chunk);
> >> + max_len = SCTP_MAX_CHUNK_LEN - sizeof(struct sctp_data_chunk);
> >>
> >> - max_len = SCTP_MAX_CHUNK_LEN - sizeof(struct sctp_data_chunk);
> >> -
> >> - if (val < min_len || val > max_len)
> >> - return -EINVAL;
> >> - }
> >> + if (val && (val < min_len || val > max_len))
> >> + return -EINVAL;
> >>
> >> asoc = sctp_id2assoc(sk, params.assoc_id);
> >> if (asoc) {
> >> @@ -3253,6 +3250,8 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
> >> val -= sizeof(struct sctphdr) +
> >> sctp_datachk_len(&asoc->stream);
> >> }
> >> + if (val < min_len || val > max_len)
> >> + return -EINVAL;
> >> asoc->user_frag = val;
> >> asoc->frag_point = sctp_frag_point(asoc, asoc->pathmtu);
> >> } else {
> >> --
> >> 2.7.4
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>
>
^ permalink raw reply
* [PATCH net-next 0/4] mlxsw: Introduce support for CQEv1/2
From: Ido Schimmel @ 2018-05-03 11:59 UTC (permalink / raw)
To: netdev; +Cc: davem, jiri, mlxsw, Ido Schimmel
Jiri says:
Current SwitchX2 and Spectrum FWs support CQEv0 and that is what we
implement in mlxsw. Spectrum FW also supports CQE v1 and v2.
However, Spectrum-2 won't support CQEv0. Prepare for it and setup the
CQE versions to use according to what is queried from FW.
Jiri Pirko (4):
mlxsw: resources: Add CQE versions resources
mlxsw: pci: Introduce helpers to work with multiple CQE versions
mlxsw: pci: Allow to use CQEs of version 1 and version 2
mlxsw: pci: Check number of CQEs for CQE version 2
drivers/net/ethernet/mellanox/mlxsw/cmd.h | 31 ++++-
drivers/net/ethernet/mellanox/mlxsw/pci.c | 148 ++++++++++++++++++------
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 74 ++++++++++--
drivers/net/ethernet/mellanox/mlxsw/resources.h | 6 +
4 files changed, 208 insertions(+), 51 deletions(-)
--
2.14.3
^ 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