* Re: [PATCH net] udp: restore UDPlite many-cast delivery
From: David Miller @ 2016-11-16 3:14 UTC (permalink / raw)
To: pablo; +Cc: netdev, edumazet, drheld
In-Reply-To: <1479163230-8734-1-git-send-email-pablo@netfilter.org>
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon, 14 Nov 2016 23:40:30 +0100
> Honor udptable parameter that is passed to __udp*_lib_mcast_deliver(),
> otherwise udplite broadcast/multicast use the wrong table and it breaks.
>
> Fixes: 2dc41cff7545 ("udp: Use hash2 for long hash1 chains in __udp*_lib_mcast_deliver.")
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Applied and queued up for -stable, thanks Pablo.
^ permalink raw reply
* RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup
From: YUAN Linyu @ 2016-11-16 3:13 UTC (permalink / raw)
To: David Miller, cugyly@163.com; +Cc: netdev@vger.kernel.org
In-Reply-To: <20161115.220108.1225196299725031215.davem@davemloft.net>
hi david,
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
> On Behalf Of David Miller
> Sent: Wednesday, November 16, 2016 11:01 AM
> To: cugyly@163.com
> Cc: netdev@vger.kernel.org; YUAN Linyu
> Subject: Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup
>
> From: yuan linyu <cugyly@163.com>
> Date: Tue, 15 Nov 2016 20:44:59 +0800
>
> > @@ -1063,10 +1063,7 @@ int devinet_ioctl(struct net *net, unsigned int
> cmd, void __user *arg)
> > if (!ifa)
> > break;
> > INIT_HLIST_NODE(&ifa->hash);
> > - if (colon)
> > - memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
> > - else
> > - memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
> > + memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
>
> This is an incorrect and untested change.
>
> If there is a colon character in ifr.ifr_name, earlier in this function
> we will:
>
> 1) First replace that colon with a NULL character.
>
> 2) Perform __dev_get_by_name() on the result.
>
> 3) Put the ":" colon character back into ifr.ifr_name
>
> So the two strings ifr.ifr_name and dev->name can in fact be different
> here. Therefore the code has to be left as it is.
Here we assign value to ifa->ifa_label.
orginal code means when reqest name have colon, then label name will have colon.
If request name have no colon, label name will same as dev-name, it's also have no colon.
So assign label to request name will do same thing as original code.
thanks
^ permalink raw reply
* Re: [PATCH 0/2] amd-xgbe: AMD XGBE driver updates 2016-11-14
From: David Miller @ 2016-11-16 3:13 UTC (permalink / raw)
To: thomas.lendacky; +Cc: netdev, julia.lawall, christophe.jaillet
In-Reply-To: <20161114222827.25160.24791.stgit@tlendack-t1.amdoffice.net>
From: Tom Lendacky <thomas.lendacky@amd.com>
Date: Mon, 14 Nov 2016 16:28:27 -0600
> This patch series addresses some minor issues found in the recently
> accepted patch series for the AMD XGBE driver.
>
> The following fixes are included in this driver update series:
>
> - Fix how a mask is applied to a Clause 37 register value
> - Fix some coccinelle identified warnings
>
> This patch series is based on net-next.
Series applied.
^ permalink raw reply
* Re: [PATCH] net/phy/vitesse: Configure RGMII skew on VSC8601, if needed
From: David Miller @ 2016-11-16 3:12 UTC (permalink / raw)
To: alex.g; +Cc: f.fainelli, gokhan, netdev, linux-kernel
In-Reply-To: <c9c60bc8-d93f-a60c-7f25-4cd508507e65@adaptrum.com>
From: Alex <alex.g@adaptrum.com>
Date: Mon, 14 Nov 2016 13:54:57 -0800
>
>
> On 11/14/2016 01:25 PM, Florian Fainelli wrote:
>> On 11/14/2016 01:18 PM, David Miller wrote:
>>> From: Alexandru Gagniuc <alex.g@adaptrum.com>
>>> Date: Sat, 12 Nov 2016 15:32:13 -0800
>>>
>>>> + if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
>>>> + ret = vsc8601_add_skew(phydev);
>>>
>>> I think you should use phy_interface_is_rgmii() here.
>>>
>>
>> This would include all RGMII modes, here I think the intent is to
>> check
>> for PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII_TXID (or
>> RXID),
>
> That is correct.
>
>> Alexandru, what direction does the skew settings apply to?
>
> It applies a skew in both TX and RX directions.
Please repost your patch, making the intent clear either in the
commit message or a code comment.
Thanks.
^ permalink raw reply
* Re: [PATCH 0/3 v5] Fixes for running a big-endian kernel on Cubieboard2
From: David Miller @ 2016-11-16 3:06 UTC (permalink / raw)
To: michael.weiser; +Cc: netdev
In-Reply-To: <20161114175807.4747-1-michael.weiser@gmx.de>
From: Michael Weiser <michael.weiser@gmx.de>
Date: Mon, 14 Nov 2016 18:58:04 +0100
> the following patches are what remains to be fixed in order to allow running a
> big-endian kernel on the Cubieboard2.
Series applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH next] dctcp: update cwnd on congestion event
From: David Miller @ 2016-11-16 3:02 UTC (permalink / raw)
To: fw; +Cc: netdev, brakmo, agshew, glenn.judd, daniel
In-Reply-To: <1479138121-32294-1-git-send-email-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Mon, 14 Nov 2016 16:42:01 +0100
> draft-ietf-tcpm-dctcp-02 says:
>
> ... when the sender receives an indication of congestion
> (ECE), the sender SHOULD update cwnd as follows:
>
> cwnd = cwnd * (1 - DCTCP.Alpha / 2)
>
> So, lets do this and reduce cwnd more smoothly (and faster), as per
> current congestion estimate.
>
> Cc: Lawrence Brakmo <brakmo@fb.com>
> Cc: Andrew Shewmaker <agshew@gmail.com>
> Cc: Glenn Judd <glenn.judd@morganstanley.com>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Applied.
^ permalink raw reply
* Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup
From: David Miller @ 2016-11-16 3:01 UTC (permalink / raw)
To: cugyly; +Cc: netdev, Linyu.Yuan
In-Reply-To: <1479213899-5952-1-git-send-email-cugyly@163.com>
From: yuan linyu <cugyly@163.com>
Date: Tue, 15 Nov 2016 20:44:59 +0800
> @@ -1063,10 +1063,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
> if (!ifa)
> break;
> INIT_HLIST_NODE(&ifa->hash);
> - if (colon)
> - memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
> - else
> - memcpy(ifa->ifa_label, dev->name, IFNAMSIZ);
> + memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ);
This is an incorrect and untested change.
If there is a colon character in ifr.ifr_name, earlier in this function
we will:
1) First replace that colon with a NULL character.
2) Perform __dev_get_by_name() on the result.
3) Put the ":" colon character back into ifr.ifr_name
So the two strings ifr.ifr_name and dev->name can in fact be different
here. Therefore the code has to be left as it is.
^ permalink raw reply
* Re: [PATCH net-next] net: bcm63xx_enet: Fix build failure with phy_ethtool_nway_reset
From: David Miller @ 2016-11-16 2:56 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
In-Reply-To: <20161116022109.26935-1-f.fainelli@gmail.com>
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 15 Nov 2016 18:21:09 -0800
> Introduced a typo making the driver no longer build, *sigh*.
>
> Fixes: 42469bf5d9bb ("net: bcm63xx_enet: Utilize phy_ethtool_nway_reset")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Applied.
^ permalink raw reply
* [PATCH net-next] net: bcm63xx_enet: Fix build failure with phy_ethtool_nway_reset
From: Florian Fainelli @ 2016-11-16 2:21 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
Introduced a typo making the driver no longer build, *sigh*.
Fixes: 42469bf5d9bb ("net: bcm63xx_enet: Utilize phy_ethtool_nway_reset")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index a43ab90c051e..3b14d5144228 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1435,7 +1435,7 @@ static int bcm_enet_nway_reset(struct net_device *dev)
priv = netdev_priv(dev);
if (priv->has_phy)
- return phy_ethtool_nway_reset(dev),
+ return phy_ethtool_nway_reset(dev);
return -EOPNOTSUPP;
}
--
2.9.3
^ permalink raw reply related
* Re: [PATCH] icmp: Restore resistence to abnormal messages
From: Florian Westphal @ 2016-11-16 1:14 UTC (permalink / raw)
To: Vicente Jiménez
Cc: Florian Westphal, David Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, netdev, linux-kernel
In-Reply-To: <CAO1wt+aZjRE_KTY0iRNJryeHvehrK6kuGMn6wOOeFuT1ncpPxA@mail.gmail.com>
Vicente Jiménez <googuy@gmail.com> wrote:
> I agree that both patches try to solve the same problem in a very similar way.
> Florian Westphal's patch do two more things:
> 1- add warning with pr_warn_ratelimited. I like this idea. I also
> though about adding some message but I have no kernel experience and I
> preferred to have just a working solution.
I added this only to show whats happening.
I don't like such printks because end users can't do anything about it.
> 2- Check if the packet size is lower than (536 + 8). I think this is
> not necessary because low values (even the zero case) is already
> handled by the protocol. Also I don't understand why you choose this
> value, it seems to be related to TCP MSS and the compared value is IP
> packet size.
Right, no need for this check.
> Finally, both patches decrement current packet by a value: Mine by 2
> and Florian's by 8 bytes. Both arbitrary values. Personally I prefer
> to go by small steps. If the small step fails, it just iterate again
> and with 4 iterations, my patch also decrement the original value by 8
> bytes (4x2).
> Basically they are the same but my patch take smaller steps and miss
> the warning message.
IIRC I chose 8 because connection recovered faster in my case.
I have not experienced this issue again (I dropped the patch from
my kernel at some point and the connection stalls did not reappear so
this got fixed elsewhere).
I'd just apply your patch, possibly with an additional comment that
says that we're grasping at straws because some middlebox is evidently
feeding bogus pmtu information.
^ permalink raw reply
* [PATCH resend] ethtool: add register dump support for fjes driver
From: Taku Izumi @ 2016-11-16 0:55 UTC (permalink / raw)
To: linville, netdev; +Cc: Taku Izumi
This patch adds the register dump format for FUJITSU Extended
Network device like the following:
# ethtool -d es0
0x0000: OWNER_EPID (Owner EPID) 0x00000001
0x0004: MAX_EP (Maximum EP) 0x00000008
0x0010: DCTL (Device Control) 0x00000000
0x0020: CR (Command request) 0x80000002
0x0024: CS (Command status) 0x80000002
0x0028: SHSTSAL (Share status address Low) 0xE8215304
0x002C: SHSTSAH (Share status address High) 0x00000007
0x0034: REQBL (Request Buffer length) 0x00008028
0x0038: REQBAL (Request Buffer Address Low) 0xEB0A0000
0x003C: REQBAH (Request Buffer Address High) 0x00000007
0x0044: RESPBL (Response Buffer Length) 0x00000018
0x0048: RESPBAL (Response Buffer Address Low) 0xE41E1220
0x004C: RESPBAH (Response Buffer Address High) 0x00000007
0x0080: IS (Interrupt status) 0x00000000
0x0084: IMS (Interrupt mask set) 0x7FE00000
0x0088: IMC (Interrupt mask clear) 0x001F0000
0x008C: IG (Interrupt generator) 0x00010000
0x0090: ICTL (Interrupt control) 0x00000000
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
Makefile.am | 2 +-
ethtool.c | 1 +
fjes.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
internal.h | 2 ++
4 files changed, 93 insertions(+), 1 deletion(-)
create mode 100644 fjes.c
diff --git a/Makefile.am b/Makefile.am
index de2db2e..edbda57 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ ethtool_SOURCES += \
pcnet32.c realtek.c tg3.c marvell.c vioc.c \
smsc911x.c at76c50x-usb.c sfc.c stmmac.c \
sff-common.c sff-common.h sfpid.c sfpdiag.c \
- ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h
+ ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h fjes.c
endif
TESTS = test-cmdline test-features
diff --git a/ethtool.c b/ethtool.c
index 49ac94e..75299c6 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -1136,6 +1136,7 @@ static const struct {
{ "et131x", et131x_dump_regs },
{ "altera_tse", altera_tse_dump_regs },
{ "vmxnet3", vmxnet3_dump_regs },
+ { "fjes", fjes_dump_regs },
#endif
};
diff --git a/fjes.c b/fjes.c
new file mode 100644
index 0000000..52f7c28
--- /dev/null
+++ b/fjes.c
@@ -0,0 +1,89 @@
+/* Copyright (c) 2016 FUJITSU LIMITED */
+#include <stdio.h>
+#include "internal.h"
+
+int fjes_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
+{
+ u32 *regs_buff = (u32 *)regs->data;
+
+ if (regs->version != 1)
+ return -1;
+
+ /* Information registers */
+ fprintf(stdout,
+ "0x0000: OWNER_EPID (Owner EPID) 0x%08X\n",
+ regs_buff[0]);
+
+ fprintf(stdout,
+ "0x0004: MAX_EP (Maximum EP) 0x%08X\n",
+ regs_buff[1]);
+
+ /* Device Control registers */
+ fprintf(stdout,
+ "0x0010: DCTL (Device Control) 0x%08X\n",
+ regs_buff[4]);
+
+ /* Command Control registers */
+ fprintf(stdout,
+ "0x0020: CR (Command request) 0x%08X\n",
+ regs_buff[8]);
+
+ fprintf(stdout,
+ "0x0024: CS (Command status) 0x%08X\n",
+ regs_buff[9]);
+
+ fprintf(stdout,
+ "0x0028: SHSTSAL (Share status address Low) 0x%08X\n",
+ regs_buff[10]);
+
+ fprintf(stdout,
+ "0x002C: SHSTSAH (Share status address High) 0x%08X\n",
+ regs_buff[11]);
+
+ fprintf(stdout,
+ "0x0034: REQBL (Request Buffer length) 0x%08X\n",
+ regs_buff[13]);
+
+ fprintf(stdout,
+ "0x0038: REQBAL (Request Buffer Address Low) 0x%08X\n",
+ regs_buff[14]);
+
+ fprintf(stdout,
+ "0x003C: REQBAH (Request Buffer Address High) 0x%08X\n",
+ regs_buff[15]);
+
+ fprintf(stdout,
+ "0x0044: RESPBL (Response Buffer Length) 0x%08X\n",
+ regs_buff[17]);
+
+ fprintf(stdout,
+ "0x0048: RESPBAL (Response Buffer Address Low) 0x%08X\n",
+ regs_buff[18]);
+
+ fprintf(stdout,
+ "0x004C: RESPBAH (Response Buffer Address High) 0x%08X\n",
+ regs_buff[19]);
+
+ /* Interrupt Control registers */
+ fprintf(stdout,
+ "0x0080: IS (Interrupt status) 0x%08X\n",
+ regs_buff[32]);
+
+ fprintf(stdout,
+ "0x0084: IMS (Interrupt mask set) 0x%08X\n",
+ regs_buff[33]);
+
+ fprintf(stdout,
+ "0x0088: IMC (Interrupt mask clear) 0x%08X\n",
+ regs_buff[34]);
+
+ fprintf(stdout,
+ "0x008C: IG (Interrupt generator) 0x%08X\n",
+ regs_buff[35]);
+
+ fprintf(stdout,
+ "0x0090: ICTL (Interrupt control) 0x%08X\n",
+ regs_buff[36]);
+
+ return 0;
+}
diff --git a/internal.h b/internal.h
index 3c08b74..4e658ea 100644
--- a/internal.h
+++ b/internal.h
@@ -348,4 +348,6 @@ void sff8472_show_all(const __u8 *id);
/* QSFP Optics diagnostics */
void sff8636_show_all(const __u8 *id, __u32 eeprom_len);
+/* FUJITSU Extended Socket network device */
+int fjes_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
#endif /* ETHTOOL_INTERNAL_H__ */
--
1.9.1
^ permalink raw reply related
* Re: [PATCH] r8169: Module parameter for opt-in of ASPM
From: Kast Bernd @ 2016-11-16 0:59 UTC (permalink / raw)
To: David Miller; +Cc: nic_swsd, netdev, linux-kernel
In-Reply-To: <20161112.210224.1889131711533608896.davem@davemloft.net>
On Sat, Nov 12, 2016 at 09:02:24PM -0500, David Miller wrote:
> From: Kast Bernd <kastbernd@gmx.de>
> Date: Fri, 4 Nov 2016 00:33:06 +0100
>
> > This patch adds a module parameter in order to activate ASPM. By that
> > the CPU can enter deep sleep modes (PC6) and power consumption can be
> > reduced (for example from 13W to 8W on my notebook with a Haswell CPU).
> > Basically, it reapplies d64ec841517a25f6d468bde9f67e5b4cffdc67c7, which
> > was reverted due to delayed link status detection and increased boot
> > times on some systems. These bugs are avoided by two actions:
> > 1) ASPM is turned off by default to avoid any problems with the
> > default configuration.
> > 2) Flags for ASPM and clock request are set after ephy_init,
> > which wasn't respected on the previous patch. Thus ASPM with
> > this patch could work even with previously failing systems.
>
> This feels like grasping at straws.
>
> If you feel you've corrected a flaw in the previous ASPM
> support, then let's reinstate it unconditionally without
> some module parameter.
>
> We'll never find out if you actually did fix ASPM support
> sufficiently if it's off by default.
>
> Only experts like you will ever enable the option. It's
> usage will be minimal, and therefore the benefits will not
> be sufficient to justify these changes in the first place.
The correction of that flaw is rather a side effect of reapplying the
old patch. Perhaps it will allow enabling ASPM on some additional
systems, but for sure it won't solve all ASPM related problems.
I know that the module parameters are frowned upon, as Francois Romieu
stated. Nevertheless, nobody commented on his suggestion to overcome
the problem of disabled ASPM (1).
I would really love to see ASPM enabled by default. However, it seems
to be quite unlikely, as it has the potential to trigger bugs and
freezes on some systems. I can understand, that the main focus of the
kernel is stability. Nonetheless, I also mind power consumption.
That's why I used this kernel parameter to provide a simple solution,
which can significantly reduce power consumption and heat production
without affecting stability. If we can achieve that without a kernel
parameter it's perfectly fine for me. From my point of view, there are
only two other solutions:
-a white list, like proposed by Francois Romieu, that enables ASPM on
systems, that are known to work stable
-a black list, that disables ASPM on buggy systems
While the first solution results in lots of work to keep that list up
to date, the second one will lead to unstable systems.
I don't know how many systems are out there, that suffer from problems
that are really caused by ASPM and not by some other bug,as even the
commit (2), that disabled ASPM in general for r8169, cites a bug
report, that doensn't seem to be related to ASPM at all (3).
However, others state, that disabling ASPM solved their problems (4).
Finding the flaws that caused these bugs or listing these systems is
beyond my possibilities. Thus the kernel paramter, although it is not
perfect, seemed to be the best compromise to me.
(1) http://lkml.iu.edu/hypermail/linux/kernel/1605.1/04992.html
(2) 4521e1a94279ce610d3f9b7945c17d581f804242
(3) https://bugzilla.redhat.com/show_bug.cgi?id=642861#c9
(4) https://bugzilla.redhat.com/show_bug.cgi?id=538920
^ permalink raw reply
* [PATCH net-next 5/6] net: dsa: mv88e6xxx: Fix cleanup on error for g1 interrupt setup
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
In-Reply-To: <1479257816-7496-1-git-send-email-andrew@lunn.ch>
On error, remask the interrupts, release all maps, and remove the
domain. This cannot be done using the mv88e6xxx_g1_irq_free() because
some of these actions are not idempotent.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 8fcef7e0d3ba..614b2f68d401 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -431,8 +431,8 @@ static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)
static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
{
- int err, irq;
- u16 reg;
+ int err, irq, virq;
+ u16 reg, mask;
chip->g1_irq.nirqs = chip->info->g1_irqs;
chip->g1_irq.domain = irq_domain_add_simple(
@@ -447,32 +447,41 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
chip->g1_irq.chip = mv88e6xxx_g1_irq_chip;
chip->g1_irq.masked = ~0;
- err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, ®);
+ err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &mask);
if (err)
- goto out;
+ goto out_mapping;
- reg &= ~GENMASK(chip->g1_irq.nirqs, 0);
+ mask &= ~GENMASK(chip->g1_irq.nirqs, 0);
- err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, reg);
+ err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, mask);
if (err)
- goto out;
+ goto out_disable;
/* Reading the interrupt status clears (most of) them */
err = mv88e6xxx_g1_read(chip, GLOBAL_STATUS, ®);
if (err)
- goto out;
+ goto out_disable;
err = request_threaded_irq(chip->irq, NULL,
mv88e6xxx_g1_irq_thread_fn,
IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
dev_name(chip->dev), chip);
if (err)
- goto out;
+ goto out_disable;
return 0;
-out:
- mv88e6xxx_g1_irq_free(chip);
+out_disable:
+ mask |= GENMASK(chip->g1_irq.nirqs, 0);
+ mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, mask);
+
+out_mapping:
+ for (irq = 0; irq < 16; irq++) {
+ virq = irq_find_mapping(chip->g1_irq.domain, irq);
+ irq_dispose_mapping(virq);
+ }
+
+ irq_domain_remove(chip->g1_irq.domain);
return err;
}
--
2.10.2
^ permalink raw reply related
* [PATCH net-next 4/6] net: dsa: mv88e6xxx: Fix releasing for the global2 interrupts
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
In-Reply-To: <1479257816-7496-1-git-send-email-andrew@lunn.ch>
It is not possible to use devm_request_threaded_irq() because we have
two stacked interrupt controllers in one device. The lower interrupt
controller cannot be removed until the upper is fully removed. This
happens too late with the devm API, resulting in error messages about
removing a domain while there is still an active interrupt. Swap to
using request_threaded_irq() and manage the release of the interrupt
manually.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/global2.c | 25 +++++++++++++++++--------
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 +
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/global2.c b/drivers/net/dsa/mv88e6xxx/global2.c
index 1a0b13521d13..703d68e92f76 100644
--- a/drivers/net/dsa/mv88e6xxx/global2.c
+++ b/drivers/net/dsa/mv88e6xxx/global2.c
@@ -507,6 +507,9 @@ void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip)
{
int irq, virq;
+ free_irq(chip->device_irq, chip);
+ irq_dispose_mapping(chip->device_irq);
+
for (irq = 0; irq < 16; irq++) {
virq = irq_find_mapping(chip->g2_irq.domain, irq);
irq_dispose_mapping(virq);
@@ -518,7 +521,7 @@ void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip)
int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
{
int device_irq;
- int err, irq;
+ int err, irq, virq;
if (!chip->dev->of_node)
return -EINVAL;
@@ -534,22 +537,28 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
chip->g2_irq.chip = mv88e6xxx_g2_irq_chip;
chip->g2_irq.masked = ~0;
- device_irq = irq_find_mapping(chip->g1_irq.domain,
- GLOBAL_STATUS_IRQ_DEVICE);
- if (device_irq < 0) {
+ chip->device_irq = irq_find_mapping(chip->g1_irq.domain,
+ GLOBAL_STATUS_IRQ_DEVICE);
+ if (chip->device_irq < 0) {
err = device_irq;
goto out;
}
- err = devm_request_threaded_irq(chip->dev, device_irq, NULL,
- mv88e6xxx_g2_irq_thread_fn,
- IRQF_ONESHOT, "mv88e6xxx-g1", chip);
+ err = request_threaded_irq(chip->device_irq, NULL,
+ mv88e6xxx_g2_irq_thread_fn,
+ IRQF_ONESHOT, "mv88e6xxx-g1", chip);
if (err)
goto out;
return 0;
+
out:
- mv88e6xxx_g2_irq_free(chip);
+ for (irq = 0; irq < 16; irq++) {
+ virq = irq_find_mapping(chip->g2_irq.domain, irq);
+ irq_dispose_mapping(virq);
+ }
+
+ irq_domain_remove(chip->g2_irq.domain);
return err;
}
diff --git a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
index 929613021eff..a3869504f881 100644
--- a/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
+++ b/drivers/net/dsa/mv88e6xxx/mv88e6xxx.h
@@ -714,6 +714,7 @@ struct mv88e6xxx_chip {
struct mv88e6xxx_irq g1_irq;
struct mv88e6xxx_irq g2_irq;
int irq;
+ int device_irq;
};
struct mv88e6xxx_bus_ops {
--
2.10.2
^ permalink raw reply related
* [PATCH net-next 6/6] net: dsa: mv88e6xxx: Hold the mutex while freeing g1 interrupts
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
In-Reply-To: <1479257816-7496-1-git-send-email-andrew@lunn.ch>
Freeing interrupts requires switch register access to mask the
interrupts. Hence we must hold the register mutex.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 614b2f68d401..e30d0eaf2b5f 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3916,8 +3916,11 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT) && chip->irq > 0)
mv88e6xxx_g2_irq_free(chip);
out_g1_irq:
- if (chip->irq > 0)
+ if (chip->irq > 0) {
+ mutex_lock(&chip->reg_lock);
mv88e6xxx_g1_irq_free(chip);
+ mutex_unlock(&chip->reg_lock);
+ }
out:
return err;
}
--
2.10.2
^ permalink raw reply related
* [PATCH net-next 3/6] net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
In-Reply-To: <1479257816-7496-1-git-send-email-andrew@lunn.ch>
Fix the g1 interrupt free code such that is masks any further
interrupts, and then releases the interrupt.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index b843052d32bd..8fcef7e0d3ba 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -413,6 +413,13 @@ static const struct irq_domain_ops mv88e6xxx_g1_irq_domain_ops = {
static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)
{
int irq, virq;
+ u16 mask;
+
+ mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &mask);
+ mask |= GENMASK(chip->g1_irq.nirqs, 0);
+ mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, mask);
+
+ free_irq(chip->irq, chip);
for (irq = 0; irq < 16; irq++) {
virq = irq_find_mapping(chip->g1_irq.domain, irq);
--
2.10.2
^ permalink raw reply related
* [PATCH net-next 1/6] net: dsa: mv88e6xxx: Fix typos when removing g1 interrupts
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
In-Reply-To: <1479257816-7496-1-git-send-email-andrew@lunn.ch>
Simple typos, s/g2/g1/
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index d6d9d66b81ce..6aa81d2d8f63 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -415,11 +415,11 @@ static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip)
int irq, virq;
for (irq = 0; irq < 16; irq++) {
- virq = irq_find_mapping(chip->g2_irq.domain, irq);
+ virq = irq_find_mapping(chip->g1_irq.domain, irq);
irq_dispose_mapping(virq);
}
- irq_domain_remove(chip->g2_irq.domain);
+ irq_domain_remove(chip->g1_irq.domain);
}
static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip)
--
2.10.2
^ permalink raw reply related
* [PATCH net-next 0/6] Fixes for the MV88e6xxx interrupt code
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
The interrupt code was never tested with a board who's probing
resulted in an -EPROBE_DEFFERED. So the clean up paths never got
tested. I now do have -EPROBE_DEFFERED, and things break badly during
cleanup. These are the fixes.
This is fixing code in net-next.
Andrew Lunn (6):
net: dsa: mv88e6xxx: Fix typos when removing g1 interrupts
net: dsa: mv88e6xxx: Fix unconditional irq freeing
net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt
net: dsa: mv88e6xxx: Fix releasing for the global2 interrupts
net: dsa: mv88e6xxx: Fix cleanup on error for g1 interrupt setup
net: dsa: mv88e6xxx: Hold the mutex while freeing g1 interrupts
drivers/net/dsa/mv88e6xxx/chip.c | 58 ++++++++++++++++++++++++-----------
drivers/net/dsa/mv88e6xxx/global2.c | 25 ++++++++++-----
drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 +
3 files changed, 58 insertions(+), 26 deletions(-)
--
2.10.2
^ permalink raw reply
* [PATCH net-next 2/6] net: dsa: mv88e6xxx: Fix unconditional irq freeing
From: Andrew Lunn @ 2016-11-16 0:56 UTC (permalink / raw)
To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn
In-Reply-To: <1479257816-7496-1-git-send-email-andrew@lunn.ch>
Trying to remove an IRQ domain that was not created results in an
Opps. Add the necessary checks that the irqs were created before
freeing them.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 6aa81d2d8f63..b843052d32bd 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3897,10 +3897,11 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)
out_mdio:
mv88e6xxx_mdio_unregister(chip);
out_g2_irq:
- if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT))
+ if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT) && chip->irq > 0)
mv88e6xxx_g2_irq_free(chip);
out_g1_irq:
- mv88e6xxx_g1_irq_free(chip);
+ if (chip->irq > 0)
+ mv88e6xxx_g1_irq_free(chip);
out:
return err;
}
@@ -3914,9 +3915,11 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)
mv88e6xxx_unregister_switch(chip);
mv88e6xxx_mdio_unregister(chip);
- if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT))
- mv88e6xxx_g2_irq_free(chip);
- mv88e6xxx_g1_irq_free(chip);
+ if (chip->irq > 0) {
+ if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_INT))
+ mv88e6xxx_g2_irq_free(chip);
+ mv88e6xxx_g1_irq_free(chip);
+ }
}
static const struct of_device_id mv88e6xxx_of_match[] = {
--
2.10.2
^ permalink raw reply related
* Re: [PATCHv2 (net.git) 0/3] stmmac: fix PTP support
From: David Miller @ 2016-11-16 0:56 UTC (permalink / raw)
To: peppe.cavallaro
Cc: netdev, alexandre.torgue, rayagond, richardcochran, linux-kernel,
seraphin.bonnaffe
In-Reply-To: <1479112050-14042-1-git-send-email-peppe.cavallaro@st.com>
From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Date: Mon, 14 Nov 2016 09:27:27 +0100
> This subset of patches aim to fix the PTP support
> for the stmmac and especially for 4.x chip series.
> While setting PTP on an ST box with 4.00a Ethernet
> core, the kernel panics due to a broken settings
> of the descriptors. The patches review the
> register configuration, the algo used for configuring
> the protocol, the way to get the timestamp inside
> the RX/TX descriptors and, in the end, the statistics
> displayed by ethtool.
>
> V2: RESEND all the patches adding the Acked-by.
Series applied, thanks.
^ permalink raw reply
* Re: linux-next: build warning after merge of the net-next tree
From: Martin KaFai Lau @ 2016-11-16 0:56 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David Miller, Networking, linux-next, linux-kernel
In-Reply-To: <20161116113647.04900939@canb.auug.org.au>
On Wed, Nov 16, 2016 at 11:36:47AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the net-next tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> kernel/bpf/bpf_lru_list.c: In function '__bpf_lru_list_rotate_inactive.isra.3':
> kernel/bpf/bpf_lru_list.c:201:28: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized]
> l->next_inactive_rotation = next;
> ^
>
> Introduced by commit
>
> 3a08c2fd7634 ("bpf: LRU List")
>
> I can't tell if this is a false positive or not.
A false positive.
A patch has been posted: https://patchwork.ozlabs.org/patch/695202/
Thanks for the report.
--Martin
^ permalink raw reply
* Re: [PATCHv3 net] igmp: do not remove igmp souce list info when set link down
From: David Miller @ 2016-11-16 0:51 UTC (permalink / raw)
To: liuhangbin; +Cc: netdev, hannes, daniel
In-Reply-To: <1479111388-25383-1-git-send-email-liuhangbin@gmail.com>
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Mon, 14 Nov 2016 16:16:28 +0800
> In commit 24cf3af3fed5 ("igmp: call ip_mc_clear_src..."), we forgot to remove
> igmpv3_clear_delrec() in ip_mc_down(), which also called ip_mc_clear_src().
> This make us clear all IGMPv3 source filter info after NETDEV_DOWN.
> Move igmpv3_clear_delrec() to ip_mc_destroy_dev() and then no need
> ip_mc_clear_src() in ip_mc_destroy_dev().
>
> On the other hand, we should restore back instead of free all source filter
> info in igmpv3_del_delrec(). Or we will not able to restore IGMPv3 source
> filter info after NETDEV_UP and NETDEV_POST_TYPE_CHANGE.
>
> Fixes: 24cf3af3fed5 ("igmp: call ip_mc_clear_src() only when ...")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH v4 6/6] posix-timers: make it configurable
From: John Stultz @ 2016-11-16 0:48 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Michal Marek, Richard Cochran, Paul Bolle, Thomas Gleixner,
Josh Triplett, Edward Cree, netdev, linux-kbuild, lkml
In-Reply-To: <1478841010-28605-7-git-send-email-nicolas.pitre@linaro.org>
On Thu, Nov 10, 2016 at 9:10 PM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> Some embedded systems have no use for them. This removes about
> 25KB from the kernel binary size when configured out.
>
> Corresponding syscalls are routed to a stub logging the attempt to
> use those syscalls which should be enough of a clue if they were
> disabled without proper consideration. They are: timer_create,
> timer_gettime: timer_getoverrun, timer_settime, timer_delete,
> clock_adjtime, setitimer, getitimer, alarm.
>
> The clock_settime, clock_gettime, clock_getres and clock_nanosleep
> syscalls are replaced by simple wrappers compatible with CLOCK_REALTIME,
> CLOCK_MONOTONIC and CLOCK_BOOTTIME only which should cover the vast
> majority of use cases with very little code.
>
> Signed-off-by: Nicolas Pitre <nico@linaro.org>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> Acked-by: Richard Cochran <richardcochran@gmail.com>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Ok.. ran the series through the kselftest/timers series and the results look ok.
Acked-by: John Stultz <john.stultz@linaro.org>
thanks
-john
^ permalink raw reply
* [PATCH net-next] debugfs: improve formatting of debugfs_real_fops()
From: Jakub Kicinski @ 2016-11-16 0:47 UTC (permalink / raw)
To: netdev; +Cc: Jakub Kicinski
In-Reply-To: <1478798629-22318-1-git-send-email-jakub.kicinski@netronome.com>
Type of debugfs_real_fops() is longer than parameters and
the name, so there is no way to break the declaration nicely.
We have to go over 80 characters.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Sorry, I forgot to include the target tree in the tag, resending.
This is fixup for a patch which is sitting in net-next.
include/linux/debugfs.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index bf1907d96097..374c6c67e6c0 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -52,8 +52,7 @@ struct debugfs_regset32 {
* Must only be called under the protection established by
* debugfs_use_file_start().
*/
-static inline const struct file_operations *
-debugfs_real_fops(const struct file *filp)
+static inline const struct file_operations *debugfs_real_fops(const struct file *filp)
__must_hold(&debugfs_srcu)
{
/*
--
1.9.1
^ permalink raw reply related
* Re: [PATCH net] ipv6 addrconf: Implemented enhanced DAD (RFC7527)
From: Erik Nordmark @ 2016-11-16 0:44 UTC (permalink / raw)
To: Hannes Frederic Sowa, netdev
In-Reply-To: <1ba995e1-2af9-ce9b-7038-e8463dd2a0a8@stressinduktion.org>
On 11/16/16 1:00 AM, Hannes Frederic Sowa wrote:
> On 15.11.2016 08:57, Erik Nordmark wrote:
>> Implemented RFC7527 Enhanced DAD.
>> IPv6 duplicate address detection can fail if there is some temporary
>> loopback of Ethernet frames. RFC7527 solves this by including a random
>> nonce in the NS messages used for DAD, and if an NS is received with the
>> same nonce it is assumed to be a looped back DAD probe and is ignored.
>> RFC7527 is disabled by default. Can be enabled by setting either one of
>> conf/{all,interface}/ipv6_rfc7527 to non-zero.
>>
>> Signed-off-by: Erik Nordmark <nordmark@arista.com>
>>
>> Index: linux-stable/Documentation/networking/ip-sysctl.txt
>> ===================================================================
>> --- linux-stable.orig/Documentation/networking/ip-sysctl.txt
>> +++ linux-stable/Documentation/networking/ip-sysctl.txt
>> @@ -1713,6 +1713,15 @@ drop_unsolicited_na - BOOLEAN
>>
>> By default this is turned off.
>>
>> +ipv6_rfc7527 - BOOLEAN
> Could you rename the sysctl to enhanced_dad. As it will anyway show up
> in the ipv6/ directory hierarchy you don't need to prefix it with 'ipv6_'
Thanks for your careful review and in particular finding that
uninitialized variable.
Yes, I'll rename the sysctl and all the other things to enhanced_dad.
>> DEVCONF_MAX
>> };
>>
>> Index: linux-stable/net/ipv6/addrconf.c
>> ===================================================================
>> --- linux-stable.orig/net/ipv6/addrconf.c
>> +++ linux-stable/net/ipv6/addrconf.c
>> @@ -217,6 +217,7 @@ static struct ipv6_devconf ipv6_devconf
>> .use_oif_addrs_only = 0,
>> .ignore_routes_with_linkdown = 0,
>> .keep_addr_on_down = 0,
>> + .ipv6_rfc7527 = 0,
> What is your reason to not enable this by default? I haven't fully
> studied the RFC, but it seems to be backwards compatible.
The concern is that while RFC4861 says that all unknown options must be
silently ignored, RFC7527 isn't widely implemented yet. Hence if there
is some broken implementation of RFC4861 it would fail to interoperate
with Linux if we set this by default.
Perhaps I'm being too conservative?
In any case such broken implementations would need to be fixed to ignore
unknown options.
>
>> };
>>
>> static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
>> @@ -262,6 +263,7 @@ static struct ipv6_devconf ipv6_devconf_
>> .use_oif_addrs_only = 0,
>> .ignore_routes_with_linkdown = 0,
>> .keep_addr_on_down = 0,
>> + .ipv6_rfc7527 = 0,
>> };
>>
>> /* Check if a valid qdisc is available */
>> @@ -3722,12 +3724,18 @@ static void addrconf_dad_kick(struct ine
>> {
>> unsigned long rand_num;
>> struct inet6_dev *idev = ifp->idev;
>> + u64 nonce;
>>
>> if (ifp->flags & IFA_F_OPTIMISTIC)
>> rand_num = 0;
>> else
>> rand_num = prandom_u32() % (idev->cnf.rtr_solicit_delay ? : 1);
>>
>> + nonce = 0;
>> + if (ifp->idev->cnf.ipv6_rfc7527 ||
>> + dev_net((ifp->idev)->dev)->ipv6.devconf_all->ipv6_rfc7527)
> idev should already be in scope, so you can simplify this conditional.
Yes; I'll fix.
>
>
>> + get_random_bytes(&nonce, 6);
> Maybe:
>
> do
> get_random_bytes(&nonce, 6);
> while (!nonce);
Is that because get_random_bytes() will not fill in anything if there is
insufficient entropy available?
>> @@ -745,6 +756,7 @@ static void ndisc_recv_ns(struct sk_buff
>> int dad = ipv6_addr_any(saddr);
>> bool inc;
>> int is_router = -1;
>> + u64 nonce;
>>
>> if (skb->len < sizeof(struct nd_msg)) {
>> ND_PRINTK(2, warn, "NS: packet too short\n");
>> @@ -789,6 +801,8 @@ static void ndisc_recv_ns(struct sk_buff
>> return;
>> }
>> }
>> + if (ndopts.nd_opts_nonce)
>> + memcpy(&nonce, (u8 *)(ndopts.nd_opts_nonce + 1), 6);
> You only initialize 6 bytes of the nonce, with the other 2 being not
> initialized.
Mea culpa. Will fix.
>
>> inc = ipv6_addr_is_multicast(daddr);
>>
>> @@ -797,6 +811,16 @@ static void ndisc_recv_ns(struct sk_buff
>> have_ifp:
>> if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
>> if (dad) {
>> + if (nonce != 0 && ifp->dad_nonce == nonce) {
>> + /* Matching nonce if looped back */
>> + if (net_ratelimit())
>> + ND_PRINTK(2, notice,
>> + "%s: IPv6 DAD loopback for address %pI6c
>> nonce %llu ignored\n",
>> + ifp->idev->dev->name,
>> + &ifp->addr,
>> + nonce);
> If we print the nonce for debugging reasons, we should keep it in
> correct endianess on the wire vs. in the debug output.
How about printing it as colon-separated hex bytes since that is more
clear than decimal?
Would follow the network byte order in the packet.
Thanks again for the review,
Erik
^ 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