* Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats
From: Roopa Prabhu @ 2016-04-19 20:40 UTC (permalink / raw)
To: Paul Moore
Cc: nicolas.dichtel, netdev, jhs, davem, tgraf, Stephen Smalley,
Eric Paris
In-Reply-To: <CAHC9VhRjjWk9drwY5Db2Zwu1CHw+dxtkMKR6Ovw3pzuHBvieVQ@mail.gmail.com>
On 4/19/16, 12:55 PM, Paul Moore wrote:
> On Tue, Apr 19, 2016 at 4:26 AM, Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>> + selinux maintainers
>>
>> Le 18/04/2016 23:10, Roopa Prabhu a écrit :
>> [snip]
>>> diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c
>>> index 8495b93..1714633 100644
>>> --- a/security/selinux/nlmsgtab.c
>>> +++ b/security/selinux/nlmsgtab.c
>>> @@ -76,6 +76,8 @@ static struct nlmsg_perm nlmsg_route_perms[] =
>>> { RTM_NEWNSID, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
>>> { RTM_DELNSID, NETLINK_ROUTE_SOCKET__NLMSG_READ },
>>> { RTM_GETNSID, NETLINK_ROUTE_SOCKET__NLMSG_READ },
>>> + { RTM_NEWSTATS, NETLINK_ROUTE_SOCKET__NLMSG_WRITE },
>> I would say it's NETLINK_ROUTE_SOCKET__NLMSG_READ, not WRITE. This command
>> is only sent by the kernel, not by the userland.
> From what I could tell from the patch description, it looks like
> RTM_NEWSTATS only dumps stats to userspace and doesn't alter the state
> of the kernel, is that correct? If so, then yes, NLMSG__READ is the
> right SELinux permission. However, if RTM_NEWSTATS does alter the
> state/configuration of the kernel then we should use NLMSG__WRITE.
>
okay, will change it to READ in the next version,
thanks.
^ permalink raw reply
* Re: [PATCH 1/3] e1000e: e1000e_cyclecounter_read(): incvalue is 32 bits, not 64
From: Jeff Kirsher @ 2016-04-19 20:57 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: David S. Miller, netdev
In-Reply-To: <1461069286-31946-1-git-send-email-dvlasenk@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]
On Tue, 2016-04-19 at 14:34 +0200, Denys Vlasenko wrote:
> "incvalue" variable holds a result of "er32(TIMINCA) &
> E1000_TIMINCA_INCVALUE_MASK"
> and used in "do_div(temp, incvalue)" as a divisor.
>
> Thus, "u64 incvalue" declaration is probably a mistake.
> Even though it seems to be a harmless one, let's fix it.
>
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> CC: Jesse Brandeburg <jesse.brandeburg@intel.com>
> CC: Shannon Nelson <shannon.nelson@intel.com>
> CC: Carolyn Wyborny <carolyn.wyborny@intel.com>
> CC: Don Skidmore <donald.c.skidmore@intel.com>
> CC: Bruce Allan <bruce.w.allan@intel.com>
> CC: John Ronciak <john.ronciak@intel.com>
> CC: Mitch Williams <mitch.a.williams@intel.com>
> CC: David S. Miller <davem@davemloft.net>
> CC: LKML <linux-kernel@vger.kernel.org>
> CC: netdev@vger.kernel.org
> ---
> drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
First of all, trimmed down the recipient list since almost all of the
reviewers you added have nothing to do with e1000e.
Any chance you can send this to the "correct" list intel-wired-
lan@lists.osuosl.org? Kind of amazing that your shotgun blast approach
in emailing out the patch series managed to miss sending it to the one
email list that handles Intel Wired LAN kernel patches.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH v2 1/1] drivers: net: cpsw: Prevent NUll pointer dereference with two PHYs
From: David Miller @ 2016-04-19 22:43 UTC (permalink / raw)
To: grygorii.strashko
Cc: drivshin.allworx, andrew.goodbody, netdev, linux-kernel,
linux-omap, mugunthanvnm, tony
In-Reply-To: <57167C79.20205@ti.com>
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Tue, 19 Apr 2016 21:44:09 +0300
> May be you can send revert + your patch 1 (only fix for this issue).
>
> Dave, Does that sound good to you?
Sure.
^ permalink raw reply
* Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats
From: David Miller @ 2016-04-19 22:49 UTC (permalink / raw)
To: roopa; +Cc: eric.dumazet, netdev, jhs, tgraf, nicolas.dichtel
In-Reply-To: <5716815C.6080601@cumulusnetworks.com>
From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Tue, 19 Apr 2016 12:05:00 -0700
> ok, will do. one thing though, for GETSTATS, if I need a pad
> attribute like IFLA_PAD, I will need to add a new stats attribute
> IFLA_STATS_PAD and burn a bit for it in filter_mask too. In which
> case, I am wondering if we should live with the copy. I will take
> any suggestions here.
I don't think the copy is appropriate, especially if the existing full
link state dump gets away without it. We're adding this facility for
performance reasons after all.
You have several options to avoid wasting filter mask space. For
example, you could use IFLA_STATS_UNSPEC, which should be OK since
only new applications will use these.
Or you could make IFLA_STATS_PAD the first attribute, and define the
filter mask as relative to it. Ie. IFLA_STATS_LINK_64 uses bit
(IFLA_STATS_LINK_64 - IFLA_STATS_PAD), etc.
^ permalink raw reply
* Re: [PATCH v2 1/1] drivers: net: cpsw: Prevent NUll pointer dereference with two PHYs
From: David Rivshin (Allworx) @ 2016-04-19 23:38 UTC (permalink / raw)
To: David Miller, grygorii.strashko
Cc: andrew.goodbody, netdev, linux-kernel, linux-omap, mugunthanvnm,
tony
In-Reply-To: <20160419.184339.1558043853032502121.davem@davemloft.net>
On Tue, 19 Apr 2016 18:43:39 -0400 (EDT)
David Miller <davem@davemloft.net> wrote:
> From: Grygorii Strashko <grygorii.strashko@ti.com>
> Date: Tue, 19 Apr 2016 21:44:09 +0300
>
> > May be you can send revert + your patch 1 (only fix for this issue).
> >
> > Dave, Does that sound good to you?
>
> Sure.
OK, I will hopefully have that ready tomorrow evening.
Anything in particular I should mention in the revert commit message?
I didn't find a discussion on it, other than the earlier statement that
"it breaks boot on many TI boards".
^ permalink raw reply
* [PATCH] net: stmmac: socfpga: Remove re-registration of reset controller
From: Marek Vasut @ 2016-04-19 23:49 UTC (permalink / raw)
To: netdev
Cc: peppe.cavallaro, alexandre.torgue, Marek Vasut, Matthew Gerlach,
Dinh Nguyen, David S . Miller
Both socfpga_dwmac_parse_data() in dwmac-socfpga.c and stmmac_dvr_probe()
in stmmac_main.c functions call devm_reset_control_get() to register an
reset controller for the stmmac. This results in an attempt to register
two reset controllers for the same non-shared reset line.
The first attempt to register the reset controller works fine. The second
attempt fails with warning from the reset controller core, see below.
The warning is produced because the reset line is non-shared and thus
it is allowed to have only up-to one reset controller associated with
that reset line, not two or more.
The solution is not great. Since the hardware needs to toggle the reset
before calling stmmac_dvr_probe() to perform mandatory preconfiguration,
this patch splits socfpga_dwmac_init_probe() from socfpga_dwmac_init().
The socfpga_dwmac_init_probe() temporarily registers the reset controller,
performs the pre-configuration and unregisters the reset controller again.
This function is only called from the socfpga_dwmac_probe().
The original socfpga_dwmac_init() is tweaked to use reset controller
pointer from the stmmac_priv (private data of the stmmac core) instead
of the local instance, which was used before.
Finally, plat_dat->exit and socfpga_dwmac_exit() is no longer necessary,
since the functionality is already performed by the stmmac core.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/reset/core.c:187 __of_reset_control_get+0x218/0x270
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4-next-20160419-00015-gabb2477-dirty #4
Hardware name: Altera SOCFPGA
[<c010f290>] (unwind_backtrace) from [<c010b82c>] (show_stack+0x10/0x14)
[<c010b82c>] (show_stack) from [<c0373da4>] (dump_stack+0x94/0xa8)
[<c0373da4>] (dump_stack) from [<c011bcc0>] (__warn+0xec/0x104)
[<c011bcc0>] (__warn) from [<c011bd88>] (warn_slowpath_null+0x20/0x28)
[<c011bd88>] (warn_slowpath_null) from [<c03a6eb4>] (__of_reset_control_get+0x218/0x270)
[<c03a6eb4>] (__of_reset_control_get) from [<c03a701c>] (__devm_reset_control_get+0x54/0x90)
[<c03a701c>] (__devm_reset_control_get) from [<c041fa30>] (stmmac_dvr_probe+0x1b4/0x8e8)
[<c041fa30>] (stmmac_dvr_probe) from [<c04298c8>] (socfpga_dwmac_probe+0x1b8/0x28c)
[<c04298c8>] (socfpga_dwmac_probe) from [<c03d6ffc>] (platform_drv_probe+0x4c/0xb0)
[<c03d6ffc>] (platform_drv_probe) from [<c03d54ec>] (driver_probe_device+0x224/0x2bc)
[<c03d54ec>] (driver_probe_device) from [<c03d5630>] (__driver_attach+0xac/0xb0)
[<c03d5630>] (__driver_attach) from [<c03d382c>] (bus_for_each_dev+0x6c/0xa0)
[<c03d382c>] (bus_for_each_dev) from [<c03d4ad4>] (bus_add_driver+0x1a4/0x21c)
[<c03d4ad4>] (bus_add_driver) from [<c03d60ac>] (driver_register+0x78/0xf8)
[<c03d60ac>] (driver_register) from [<c0101760>] (do_one_initcall+0x40/0x170)
[<c0101760>] (do_one_initcall) from [<c0800e38>] (kernel_init_freeable+0x1dc/0x27c)
[<c0800e38>] (kernel_init_freeable) from [<c05d1bd4>] (kernel_init+0x8/0x114)
[<c05d1bd4>] (kernel_init) from [<c01076f8>] (ret_from_fork+0x14/0x3c)
---[ end trace 059d2fbe87608fa9 ]---
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Gerlach <mgerlach@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: David S. Miller <davem@davemloft.net>
---
.../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 69 ++++++++++++----------
1 file changed, 38 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 76d671e..9ece2dd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -49,7 +49,6 @@ struct socfpga_dwmac {
u32 reg_shift;
struct device *dev;
struct regmap *sys_mgr_base_addr;
- struct reset_control *stmmac_rst;
void __iomem *splitter_base;
bool f2h_ptp_ref_clk;
};
@@ -92,15 +91,6 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
struct device_node *np_splitter;
struct resource res_splitter;
- dwmac->stmmac_rst = devm_reset_control_get(dev,
- STMMAC_RESOURCE_NAME);
- if (IS_ERR(dwmac->stmmac_rst)) {
- dev_info(dev, "Could not get reset control!\n");
- if (PTR_ERR(dwmac->stmmac_rst) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
- dwmac->stmmac_rst = NULL;
- }
-
dwmac->interface = of_get_phy_mode(np);
sys_mgr_base_addr = syscon_regmap_lookup_by_phandle(np, "altr,sysmgr-syscon");
@@ -194,30 +184,23 @@ static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
return 0;
}
-static void socfpga_dwmac_exit(struct platform_device *pdev, void *priv)
-{
- struct socfpga_dwmac *dwmac = priv;
-
- /* On socfpga platform exit, assert and hold reset to the
- * enet controller - the default state after a hard reset.
- */
- if (dwmac->stmmac_rst)
- reset_control_assert(dwmac->stmmac_rst);
-}
-
static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
{
- struct socfpga_dwmac *dwmac = priv;
+ struct socfpga_dwmac *dwmac = priv;
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *stpriv = NULL;
int ret = 0;
- if (ndev)
- stpriv = netdev_priv(ndev);
+ if (!ndev)
+ return -EINVAL;
+
+ stpriv = netdev_priv(ndev);
+ if (!stpriv)
+ return -EINVAL;
/* Assert reset to the enet controller before changing the phy mode */
- if (dwmac->stmmac_rst)
- reset_control_assert(dwmac->stmmac_rst);
+ if (stpriv->stmmac_rst)
+ reset_control_assert(stpriv->stmmac_rst);
/* Setup the phy mode in the system manager registers according to
* devicetree configuration
@@ -227,8 +210,8 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
/* Deassert reset for the phy configuration to be sampled by
* the enet controller, and operation to start in requested mode
*/
- if (dwmac->stmmac_rst)
- reset_control_deassert(dwmac->stmmac_rst);
+ if (stpriv->stmmac_rst)
+ reset_control_deassert(stpriv->stmmac_rst);
/* Before the enet controller is suspended, the phy is suspended.
* This causes the phy clock to be gated. The enet controller is
@@ -245,12 +228,37 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
* control register 0, and can be modified by the phy driver
* framework.
*/
- if (stpriv && stpriv->phydev)
+ if (stpriv->phydev)
phy_resume(stpriv->phydev);
return ret;
}
+static int socfpga_dwmac_init_probe(struct socfpga_dwmac *dwmac)
+{
+ struct reset_control *stmmac_rst;
+ int ret;
+
+ stmmac_rst = reset_control_get(dwmac->dev, STMMAC_RESOURCE_NAME);
+ if (IS_ERR(stmmac_rst)) {
+ dev_info(dwmac->dev, "Could not get reset control!\n");
+ if (PTR_ERR(stmmac_rst) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+ }
+
+ if (stmmac_rst)
+ reset_control_assert(stmmac_rst);
+
+ ret = socfpga_dwmac_setup(dwmac);
+
+ if (stmmac_rst) {
+ reset_control_deassert(stmmac_rst);
+ reset_control_put(stmmac_rst);
+ }
+
+ return ret;
+}
+
static int socfpga_dwmac_probe(struct platform_device *pdev)
{
struct plat_stmmacenet_data *plat_dat;
@@ -279,10 +287,9 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
plat_dat->bsp_priv = dwmac;
plat_dat->init = socfpga_dwmac_init;
- plat_dat->exit = socfpga_dwmac_exit;
plat_dat->fix_mac_speed = socfpga_dwmac_fix_mac_speed;
- ret = socfpga_dwmac_init(pdev, plat_dat->bsp_priv);
+ ret = socfpga_dwmac_init_probe(dwmac);
if (ret)
return ret;
--
2.7.0
^ permalink raw reply related
* Re: [PATCH net-next v5] rtnetlink: add new RTM_GETSTATS message to dump link stats
From: David Miller @ 2016-04-19 23:50 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: eric.dumazet, roopa, netdev, jhs, tgraf
In-Reply-To: <57168225.2040507@6wind.com>
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue, 19 Apr 2016 21:08:21 +0200
> Le 19/04/2016 20:47, Eric Dumazet a écrit :
>> Since we want to use this in other places, we could define a helper.
>>
>> nla_align_64bit(skb, attribute) or something.
> Yes, with the corresponding nla_total_size_64bit()
Good, idea, committed the following:
Roopa, please use these helpers in your RTM_GETSTATS patch.
Thank you.
====================
[PATCH] net: Add helpers for 64-bit aligning netlink attributes.
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
include/net/netlink.h | 37 +++++++++++++++++++++++++++++++++++++
net/core/rtnetlink.c | 24 +++++-------------------
2 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 0e31727..e644b34 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -1231,6 +1231,43 @@ static inline int nla_validate_nested(const struct nlattr *start, int maxtype,
}
/**
+ * nla_align_64bit - 64-bit align the nla_data() of next attribute
+ * @skb: socket buffer the message is stored in
+ * @padattr: attribute type for the padding
+ *
+ * Conditionally emit a padding netlink attribute in order to make
+ * the next attribute we emit have a 64-bit aligned nla_data() area.
+ * This will only be done in architectures which do not have
+ * HAVE_EFFICIENT_UNALIGNED_ACCESS defined.
+ *
+ * Returns zero on success or a negative error code.
+ */
+static inline int nla_align_64bit(struct sk_buff *skb, int padattr)
+{
+#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS
+ if (IS_ALIGNED((unsigned long)skb->data, 8)) {
+ struct nlattr *attr = nla_reserve(skb, padattr, 0);
+ if (!attr)
+ return -EMSGSIZE;
+ }
+#endif
+ return 0;
+}
+
+/**
+ * nla_total_size_64bit - total length of attribute including padding
+ * @payload: length of payload
+ */
+static inline int nla_total_size_64bit(int payload)
+{
+ return NLA_ALIGN(nla_attr_size(payload))
+#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS
+ + NLA_ALIGN(nla_attr_size(0))
+#endif
+ ;
+}
+
+/**
* nla_for_each_attr - iterate over a stream of attributes
* @pos: loop counter, set to current attribute
* @head: head of attribute stream
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 198ca2c..d3694a1 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -878,10 +878,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
+ nla_total_size(IFNAMSIZ) /* IFLA_QDISC */
+ nla_total_size(sizeof(struct rtnl_link_ifmap))
+ nla_total_size(sizeof(struct rtnl_link_stats))
-#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS
- + nla_total_size(0) /* IFLA_PAD */
-#endif
- + nla_total_size(sizeof(struct rtnl_link_stats64))
+ + nla_total_size_64bit(sizeof(struct rtnl_link_stats64))
+ nla_total_size(MAX_ADDR_LEN) /* IFLA_ADDRESS */
+ nla_total_size(MAX_ADDR_LEN) /* IFLA_BROADCAST */
+ nla_total_size(4) /* IFLA_TXQLEN */
@@ -1054,22 +1051,11 @@ static noinline_for_stack int rtnl_fill_stats(struct sk_buff *skb,
{
struct rtnl_link_stats64 *sp;
struct nlattr *attr;
+ int err;
-#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS
- /* IF necessary, add a zero length NOP attribute so that the
- * nla_data() of the IFLA_STATS64 will be 64-bit aligned.
- *
- * The nlattr header is 4 bytes in size, that's why we test
- * if the skb->data _is_ aligned. This NOP attribute, plus
- * nlattr header for IFLA_STATS64, will make nla_data() 8-byte
- * aligned.
- */
- if (IS_ALIGNED((unsigned long)skb->data, 8)) {
- attr = nla_reserve(skb, IFLA_PAD, 0);
- if (!attr)
- return -EMSGSIZE;
- }
-#endif
+ err = nla_align_64bit(skb, IFLA_PAD);
+ if (err)
+ return err;
attr = nla_reserve(skb, IFLA_STATS64,
sizeof(struct rtnl_link_stats64));
--
2.1.0
^ permalink raw reply related
* Re: [PATCH net-next 1/3] ila: Add struct definitions and helpers
From: David Miller @ 2016-04-20 0:00 UTC (permalink / raw)
To: tom; +Cc: netdev, kernel-team
In-Reply-To: <1460752452-3328784-2-git-send-email-tom@herbertland.com>
From: Tom Herbert <tom@herbertland.com>
Date: Fri, 15 Apr 2016 13:34:10 -0700
> + if (!ila_is_ila_addr(iaddr)) {
This doesn't compile.
^ permalink raw reply
* Re: [PATCH] net: stmmac: socfpga: Remove re-registration of reset controller
From: Marek Vasut @ 2016-04-20 0:02 UTC (permalink / raw)
To: netdev
Cc: peppe.cavallaro, alexandre.torgue, Matthew Gerlach, Dinh Nguyen,
David S . Miller
In-Reply-To: <1461109740-7105-1-git-send-email-marex@denx.de>
On 04/20/2016 01:49 AM, Marek Vasut wrote:
> Both socfpga_dwmac_parse_data() in dwmac-socfpga.c and stmmac_dvr_probe()
> in stmmac_main.c functions call devm_reset_control_get() to register an
> reset controller for the stmmac. This results in an attempt to register
> two reset controllers for the same non-shared reset line.
>
> The first attempt to register the reset controller works fine. The second
> attempt fails with warning from the reset controller core, see below.
> The warning is produced because the reset line is non-shared and thus
> it is allowed to have only up-to one reset controller associated with
> that reset line, not two or more.
>
> The solution is not great. Since the hardware needs to toggle the reset
> before calling stmmac_dvr_probe() to perform mandatory preconfiguration,
> this patch splits socfpga_dwmac_init_probe() from socfpga_dwmac_init().
>
> The socfpga_dwmac_init_probe() temporarily registers the reset controller,
> performs the pre-configuration and unregisters the reset controller again.
> This function is only called from the socfpga_dwmac_probe().
>
> The original socfpga_dwmac_init() is tweaked to use reset controller
> pointer from the stmmac_priv (private data of the stmmac core) instead
> of the local instance, which was used before.
>
> Finally, plat_dat->exit and socfpga_dwmac_exit() is no longer necessary,
> since the functionality is already performed by the stmmac core.
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at drivers/reset/core.c:187 __of_reset_control_get+0x218/0x270
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4-next-20160419-00015-gabb2477-dirty #4
> Hardware name: Altera SOCFPGA
> [<c010f290>] (unwind_backtrace) from [<c010b82c>] (show_stack+0x10/0x14)
> [<c010b82c>] (show_stack) from [<c0373da4>] (dump_stack+0x94/0xa8)
> [<c0373da4>] (dump_stack) from [<c011bcc0>] (__warn+0xec/0x104)
> [<c011bcc0>] (__warn) from [<c011bd88>] (warn_slowpath_null+0x20/0x28)
> [<c011bd88>] (warn_slowpath_null) from [<c03a6eb4>] (__of_reset_control_get+0x218/0x270)
> [<c03a6eb4>] (__of_reset_control_get) from [<c03a701c>] (__devm_reset_control_get+0x54/0x90)
> [<c03a701c>] (__devm_reset_control_get) from [<c041fa30>] (stmmac_dvr_probe+0x1b4/0x8e8)
> [<c041fa30>] (stmmac_dvr_probe) from [<c04298c8>] (socfpga_dwmac_probe+0x1b8/0x28c)
> [<c04298c8>] (socfpga_dwmac_probe) from [<c03d6ffc>] (platform_drv_probe+0x4c/0xb0)
> [<c03d6ffc>] (platform_drv_probe) from [<c03d54ec>] (driver_probe_device+0x224/0x2bc)
> [<c03d54ec>] (driver_probe_device) from [<c03d5630>] (__driver_attach+0xac/0xb0)
> [<c03d5630>] (__driver_attach) from [<c03d382c>] (bus_for_each_dev+0x6c/0xa0)
> [<c03d382c>] (bus_for_each_dev) from [<c03d4ad4>] (bus_add_driver+0x1a4/0x21c)
> [<c03d4ad4>] (bus_add_driver) from [<c03d60ac>] (driver_register+0x78/0xf8)
> [<c03d60ac>] (driver_register) from [<c0101760>] (do_one_initcall+0x40/0x170)
> [<c0101760>] (do_one_initcall) from [<c0800e38>] (kernel_init_freeable+0x1dc/0x27c)
> [<c0800e38>] (kernel_init_freeable) from [<c05d1bd4>] (kernel_init+0x8/0x114)
> [<c05d1bd4>] (kernel_init) from [<c01076f8>] (ret_from_fork+0x14/0x3c)
> ---[ end trace 059d2fbe87608fa9 ]---
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Matthew Gerlach <mgerlach@opensource.altera.com>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> Cc: David S. Miller <davem@davemloft.net>
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 69 ++++++++++++----------
> 1 file changed, 38 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
> index 76d671e..9ece2dd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
> @@ -49,7 +49,6 @@ struct socfpga_dwmac {
> u32 reg_shift;
> struct device *dev;
> struct regmap *sys_mgr_base_addr;
> - struct reset_control *stmmac_rst;
> void __iomem *splitter_base;
> bool f2h_ptp_ref_clk;
> };
> @@ -92,15 +91,6 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
> struct device_node *np_splitter;
> struct resource res_splitter;
>
> - dwmac->stmmac_rst = devm_reset_control_get(dev,
> - STMMAC_RESOURCE_NAME);
> - if (IS_ERR(dwmac->stmmac_rst)) {
> - dev_info(dev, "Could not get reset control!\n");
> - if (PTR_ERR(dwmac->stmmac_rst) == -EPROBE_DEFER)
> - return -EPROBE_DEFER;
> - dwmac->stmmac_rst = NULL;
> - }
> -
> dwmac->interface = of_get_phy_mode(np);
>
> sys_mgr_base_addr = syscon_regmap_lookup_by_phandle(np, "altr,sysmgr-syscon");
> @@ -194,30 +184,23 @@ static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
> return 0;
> }
>
> -static void socfpga_dwmac_exit(struct platform_device *pdev, void *priv)
> -{
> - struct socfpga_dwmac *dwmac = priv;
> -
> - /* On socfpga platform exit, assert and hold reset to the
> - * enet controller - the default state after a hard reset.
> - */
> - if (dwmac->stmmac_rst)
> - reset_control_assert(dwmac->stmmac_rst);
> -}
> -
> static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
> {
> - struct socfpga_dwmac *dwmac = priv;
> + struct socfpga_dwmac *dwmac = priv;
> struct net_device *ndev = platform_get_drvdata(pdev);
> struct stmmac_priv *stpriv = NULL;
> int ret = 0;
>
> - if (ndev)
> - stpriv = netdev_priv(ndev);
> + if (!ndev)
> + return -EINVAL;
> +
> + stpriv = netdev_priv(ndev);
> + if (!stpriv)
> + return -EINVAL;
>
> /* Assert reset to the enet controller before changing the phy mode */
> - if (dwmac->stmmac_rst)
> - reset_control_assert(dwmac->stmmac_rst);
> + if (stpriv->stmmac_rst)
> + reset_control_assert(stpriv->stmmac_rst);
>
> /* Setup the phy mode in the system manager registers according to
> * devicetree configuration
> @@ -227,8 +210,8 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
> /* Deassert reset for the phy configuration to be sampled by
> * the enet controller, and operation to start in requested mode
> */
> - if (dwmac->stmmac_rst)
> - reset_control_deassert(dwmac->stmmac_rst);
> + if (stpriv->stmmac_rst)
> + reset_control_deassert(stpriv->stmmac_rst);
>
> /* Before the enet controller is suspended, the phy is suspended.
> * This causes the phy clock to be gated. The enet controller is
> @@ -245,12 +228,37 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
> * control register 0, and can be modified by the phy driver
> * framework.
> */
> - if (stpriv && stpriv->phydev)
> + if (stpriv->phydev)
> phy_resume(stpriv->phydev);
>
> return ret;
> }
>
> +static int socfpga_dwmac_init_probe(struct socfpga_dwmac *dwmac)
> +{
> + struct reset_control *stmmac_rst;
> + int ret;
> +
> + stmmac_rst = reset_control_get(dwmac->dev, STMMAC_RESOURCE_NAME);
> + if (IS_ERR(stmmac_rst)) {
> + dev_info(dwmac->dev, "Could not get reset control!\n");
> + if (PTR_ERR(stmmac_rst) == -EPROBE_DEFER)
> + return -EPROBE_DEFER;
There should be stmmac_rst = NULL; here, so the checks below work
correctly. Will be added in V2 if the idea of this patch makes sense.
> + }
> +
> + if (stmmac_rst)
> + reset_control_assert(stmmac_rst);
> +
> + ret = socfpga_dwmac_setup(dwmac);
> +
> + if (stmmac_rst) {
> + reset_control_deassert(stmmac_rst);
> + reset_control_put(stmmac_rst);
> + }
> +
> + return ret;
> +}
> +
> static int socfpga_dwmac_probe(struct platform_device *pdev)
> {
> struct plat_stmmacenet_data *plat_dat;
> @@ -279,10 +287,9 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
>
> plat_dat->bsp_priv = dwmac;
> plat_dat->init = socfpga_dwmac_init;
> - plat_dat->exit = socfpga_dwmac_exit;
> plat_dat->fix_mac_speed = socfpga_dwmac_fix_mac_speed;
>
> - ret = socfpga_dwmac_init(pdev, plat_dat->bsp_priv);
> + ret = socfpga_dwmac_init_probe(dwmac);
> if (ret)
> return ret;
>
>
--
Best regards,
Marek Vasut
^ permalink raw reply
* [PATCH V2] net: stmmac: socfpga: Remove re-registration of reset controller
From: Marek Vasut @ 2016-04-20 0:05 UTC (permalink / raw)
To: netdev
Cc: peppe.cavallaro, alexandre.torgue, Marek Vasut, Matthew Gerlach,
Dinh Nguyen, David S . Miller
Both socfpga_dwmac_parse_data() in dwmac-socfpga.c and stmmac_dvr_probe()
in stmmac_main.c functions call devm_reset_control_get() to register an
reset controller for the stmmac. This results in an attempt to register
two reset controllers for the same non-shared reset line.
The first attempt to register the reset controller works fine. The second
attempt fails with warning from the reset controller core, see below.
The warning is produced because the reset line is non-shared and thus
it is allowed to have only up-to one reset controller associated with
that reset line, not two or more.
The solution is not great. Since the hardware needs to toggle the reset
before calling stmmac_dvr_probe() to perform mandatory preconfiguration,
this patch splits socfpga_dwmac_init_probe() from socfpga_dwmac_init().
The socfpga_dwmac_init_probe() temporarily registers the reset controller,
performs the pre-configuration and unregisters the reset controller again.
This function is only called from the socfpga_dwmac_probe().
The original socfpga_dwmac_init() is tweaked to use reset controller
pointer from the stmmac_priv (private data of the stmmac core) instead
of the local instance, which was used before.
Finally, plat_dat->exit and socfpga_dwmac_exit() is no longer necessary,
since the functionality is already performed by the stmmac core.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/reset/core.c:187 __of_reset_control_get+0x218/0x270
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc4-next-20160419-00015-gabb2477-dirty #4
Hardware name: Altera SOCFPGA
[<c010f290>] (unwind_backtrace) from [<c010b82c>] (show_stack+0x10/0x14)
[<c010b82c>] (show_stack) from [<c0373da4>] (dump_stack+0x94/0xa8)
[<c0373da4>] (dump_stack) from [<c011bcc0>] (__warn+0xec/0x104)
[<c011bcc0>] (__warn) from [<c011bd88>] (warn_slowpath_null+0x20/0x28)
[<c011bd88>] (warn_slowpath_null) from [<c03a6eb4>] (__of_reset_control_get+0x218/0x270)
[<c03a6eb4>] (__of_reset_control_get) from [<c03a701c>] (__devm_reset_control_get+0x54/0x90)
[<c03a701c>] (__devm_reset_control_get) from [<c041fa30>] (stmmac_dvr_probe+0x1b4/0x8e8)
[<c041fa30>] (stmmac_dvr_probe) from [<c04298c8>] (socfpga_dwmac_probe+0x1b8/0x28c)
[<c04298c8>] (socfpga_dwmac_probe) from [<c03d6ffc>] (platform_drv_probe+0x4c/0xb0)
[<c03d6ffc>] (platform_drv_probe) from [<c03d54ec>] (driver_probe_device+0x224/0x2bc)
[<c03d54ec>] (driver_probe_device) from [<c03d5630>] (__driver_attach+0xac/0xb0)
[<c03d5630>] (__driver_attach) from [<c03d382c>] (bus_for_each_dev+0x6c/0xa0)
[<c03d382c>] (bus_for_each_dev) from [<c03d4ad4>] (bus_add_driver+0x1a4/0x21c)
[<c03d4ad4>] (bus_add_driver) from [<c03d60ac>] (driver_register+0x78/0xf8)
[<c03d60ac>] (driver_register) from [<c0101760>] (do_one_initcall+0x40/0x170)
[<c0101760>] (do_one_initcall) from [<c0800e38>] (kernel_init_freeable+0x1dc/0x27c)
[<c0800e38>] (kernel_init_freeable) from [<c05d1bd4>] (kernel_init+0x8/0x114)
[<c05d1bd4>] (kernel_init) from [<c01076f8>] (ret_from_fork+0x14/0x3c)
---[ end trace 059d2fbe87608fa9 ]---
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matthew Gerlach <mgerlach@opensource.altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: David S. Miller <davem@davemloft.net>
---
V2: Add missing stmmac_rst = NULL; into socfpga_dwmac_init_probe()
---
.../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 70 ++++++++++++----------
1 file changed, 39 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 76d671e..5885a2e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -49,7 +49,6 @@ struct socfpga_dwmac {
u32 reg_shift;
struct device *dev;
struct regmap *sys_mgr_base_addr;
- struct reset_control *stmmac_rst;
void __iomem *splitter_base;
bool f2h_ptp_ref_clk;
};
@@ -92,15 +91,6 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
struct device_node *np_splitter;
struct resource res_splitter;
- dwmac->stmmac_rst = devm_reset_control_get(dev,
- STMMAC_RESOURCE_NAME);
- if (IS_ERR(dwmac->stmmac_rst)) {
- dev_info(dev, "Could not get reset control!\n");
- if (PTR_ERR(dwmac->stmmac_rst) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
- dwmac->stmmac_rst = NULL;
- }
-
dwmac->interface = of_get_phy_mode(np);
sys_mgr_base_addr = syscon_regmap_lookup_by_phandle(np, "altr,sysmgr-syscon");
@@ -194,30 +184,23 @@ static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
return 0;
}
-static void socfpga_dwmac_exit(struct platform_device *pdev, void *priv)
-{
- struct socfpga_dwmac *dwmac = priv;
-
- /* On socfpga platform exit, assert and hold reset to the
- * enet controller - the default state after a hard reset.
- */
- if (dwmac->stmmac_rst)
- reset_control_assert(dwmac->stmmac_rst);
-}
-
static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
{
- struct socfpga_dwmac *dwmac = priv;
+ struct socfpga_dwmac *dwmac = priv;
struct net_device *ndev = platform_get_drvdata(pdev);
struct stmmac_priv *stpriv = NULL;
int ret = 0;
- if (ndev)
- stpriv = netdev_priv(ndev);
+ if (!ndev)
+ return -EINVAL;
+
+ stpriv = netdev_priv(ndev);
+ if (!stpriv)
+ return -EINVAL;
/* Assert reset to the enet controller before changing the phy mode */
- if (dwmac->stmmac_rst)
- reset_control_assert(dwmac->stmmac_rst);
+ if (stpriv->stmmac_rst)
+ reset_control_assert(stpriv->stmmac_rst);
/* Setup the phy mode in the system manager registers according to
* devicetree configuration
@@ -227,8 +210,8 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
/* Deassert reset for the phy configuration to be sampled by
* the enet controller, and operation to start in requested mode
*/
- if (dwmac->stmmac_rst)
- reset_control_deassert(dwmac->stmmac_rst);
+ if (stpriv->stmmac_rst)
+ reset_control_deassert(stpriv->stmmac_rst);
/* Before the enet controller is suspended, the phy is suspended.
* This causes the phy clock to be gated. The enet controller is
@@ -245,12 +228,38 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
* control register 0, and can be modified by the phy driver
* framework.
*/
- if (stpriv && stpriv->phydev)
+ if (stpriv->phydev)
phy_resume(stpriv->phydev);
return ret;
}
+static int socfpga_dwmac_init_probe(struct socfpga_dwmac *dwmac)
+{
+ struct reset_control *stmmac_rst;
+ int ret;
+
+ stmmac_rst = reset_control_get(dwmac->dev, STMMAC_RESOURCE_NAME);
+ if (IS_ERR(stmmac_rst)) {
+ dev_info(dwmac->dev, "Could not get reset control!\n");
+ if (PTR_ERR(stmmac_rst) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+ stmmac_rst = NULL;
+ }
+
+ if (stmmac_rst)
+ reset_control_assert(stmmac_rst);
+
+ ret = socfpga_dwmac_setup(dwmac);
+
+ if (stmmac_rst) {
+ reset_control_deassert(stmmac_rst);
+ reset_control_put(stmmac_rst);
+ }
+
+ return ret;
+}
+
static int socfpga_dwmac_probe(struct platform_device *pdev)
{
struct plat_stmmacenet_data *plat_dat;
@@ -279,10 +288,9 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
plat_dat->bsp_priv = dwmac;
plat_dat->init = socfpga_dwmac_init;
- plat_dat->exit = socfpga_dwmac_exit;
plat_dat->fix_mac_speed = socfpga_dwmac_fix_mac_speed;
- ret = socfpga_dwmac_init(pdev, plat_dat->bsp_priv);
+ ret = socfpga_dwmac_init_probe(dwmac);
if (ret)
return ret;
--
2.7.0
^ permalink raw reply related
* Re: [PATCH] net/mlx4_en: allocate non 0-order pages for RX ring with __GFP_NOMEMALLOC
From: David Miller @ 2016-04-20 0:07 UTC (permalink / raw)
To: khlebnikov; +Cc: netdev, yishaih, eugenia, linux-kernel
In-Reply-To: <146097923460.15114.8965134124148581055.stgit@buzz>
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Mon, 18 Apr 2016 14:33:54 +0300
> High order pages are optional here since commit 51151a16a60f ("mlx4: allow
> order-0 memory allocations in RX path"), so here is no reason for depleting
> reserves. Generic __netdev_alloc_frag() implements the same logic.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Applied.
^ permalink raw reply
* Re: [PATCH] net/mlx4_en: do batched put_page using atomic_sub
From: David Miller @ 2016-04-20 0:07 UTC (permalink / raw)
To: khlebnikov; +Cc: netdev, yishaih, eugenia, linux-kernel
In-Reply-To: <146097924572.15144.10837875571142670008.stgit@buzz>
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Mon, 18 Apr 2016 14:34:05 +0300
> This patch fixes couple error paths after allocation failures.
> Atomic set of page reference counter is safe only if it is zero,
> otherwise set can race with any speculative get_page_unless_zero.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Applied.
^ permalink raw reply
* Re: [PATCH] cls_cgroup: get sk_classid only from full sockets
From: David Miller @ 2016-04-20 0:09 UTC (permalink / raw)
To: khlebnikov-XoJtRXgx1JseBXzfvpsJ4g
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <146097943086.15300.8997345346172526153.stgit@buzz>
From: Konstantin Khlebnikov <khlebnikov-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org>
Date: Mon, 18 Apr 2016 14:37:10 +0300
> skb->sk could point to timewait or request socket which has no sk_classid.
> Detected as "BUG: KASAN: slab-out-of-bounds in cls_cgroup_classify".
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov-XoJtRXgx1JseBXzfvpsJ4g@public.gmane.org>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH 1/2] net/ipv6/addrconf: simplify sysctl registration
From: David Miller @ 2016-04-20 0:13 UTC (permalink / raw)
To: khlebnikov; +Cc: netdev, linux-kernel
In-Reply-To: <146097967035.15409.8235893232862124602.stgit@buzz>
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Mon, 18 Apr 2016 14:41:10 +0300
> Struct ctl_table_header holds pointer to sysctl table which could be used
> for freeing it after unregistration. IPv4 sysctls already use that.
> Remove redundant NULL assignment: ndev allocated using kzalloc.
>
> This also saves some bytes: sysctl table could be shorter than
> DEVCONF_MAX+1 if some options are disable in config.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] net/ipv6/addrconf: fix sysctl table indentation
From: David Miller @ 2016-04-20 0:13 UTC (permalink / raw)
To: khlebnikov; +Cc: netdev, linux-kernel
In-Reply-To: <146097967761.15409.8428180075560908884.stgit@buzz>
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Date: Mon, 18 Apr 2016 14:41:17 +0300
> Separated from previous patch for readability.
>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Applied.
^ permalink raw reply
* Re: [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs
From: David Miller @ 2016-04-20 0:15 UTC (permalink / raw)
To: andrew.goodbody; +Cc: netdev, linux-kernel
In-Reply-To: <1460987606-18125-1-git-send-email-andrew.goodbody@cambrionix.com>
From: Andrew Goodbody <andrew.goodbody@cambrionix.com>
Date: Mon, 18 Apr 2016 14:53:25 +0100
> This is a fix for a NULL pointer dereference from cpsw which is triggered
> by having two slave PHYs attached to a cpsw network device. The problem is
> due to only maintaining a single reference to a PHY node in the prive data
> which gets overwritten by the second PHY probe. So move the PHY node
> reference to the individual slave data so that there is now one per slave.
>
> v1 had a problem that data->slaves was used before it had been filled in
I already applied v1 the other day, so you need to send me a relative
patch rather than a whole new one.
Thanks.
^ permalink raw reply
* Re: [PATCH 2/5] arcnet: com90xx: add __init attribute
From: David Miller @ 2016-04-20 0:18 UTC (permalink / raw)
To: Julia.Lawall
Cc: m.grzeschik, kernel-janitors, netdev, linux-kernel, mcgrof, josh
In-Reply-To: <1460991338-9845-3-git-send-email-Julia.Lawall@lip6.fr>
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Mon, 18 Apr 2016 16:55:35 +0200
> Add __init attribute on a function that is only called from other __init
> functions and that is not inlined, at least with gcc version 4.8.4 on an
> x86 machine with allyesconfig. Currently, the function is put in the
> .text.unlikely segment. Declaring it as __init will cause it to be put in
> the .init.text and to disappear after initialization.
>
> The result of objdump -x on the function before the change is as follows:
>
> 0000000000000000 l F .text.unlikely 00000000000000bf check_mirror
>
> And after the change it is as follows:
>
> 0000000000000000 l F .init.text 00000000000000ba check_mirror
>
> Done with the help of Coccinelle. The semantic patch checks for local
> static non-init functions that are called from an __init function and are
> not called from any other function.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH net-next 0/3] qede: Bug fixes
From: David Miller @ 2016-04-20 0:21 UTC (permalink / raw)
To: manish.chopra; +Cc: netdev, Ariel.Elior, Yuval.Mintz
In-Reply-To: <1460999167-3746-1-git-send-email-manish.chopra@qlogic.com>
From: Manish Chopra <manish.chopra@qlogic.com>
Date: Mon, 18 Apr 2016 13:06:04 -0400
> Please note that I have intentionally targeted this for "net-next"
> to avoid merge conflicts when net-next changes gets merged to net
>
> Please consider applying this series to "net-next"
I do not understand what you are saying here.
If these bugs exist in 'net' you must target these bug fixes
there.
If there will be merge conflicts after this when I merge net
into net-next, that's exactly what is supposed to happen and
is what I'm supposed to work on to resolve. That's my job.
^ permalink raw reply
* Re: [PATCH net-next v2 0/2] BPF updates
From: David Miller @ 2016-04-20 0:26 UTC (permalink / raw)
To: daniel; +Cc: alexei.starovoitov, tgraf, netdev, linux-kernel
In-Reply-To: <cover.1461005139.git.daniel@iogearbox.net>
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Mon, 18 Apr 2016 21:01:22 +0200
> This minor set adds a new helper bpf_event_output() for eBPF cls/act
> program types which allows to pass events to user space applications.
> For details, please see individual patches.
...
> v1 -> v2:
> - Address kbuild bot found compile issue in patch 2
> - Rest as is
>
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
From: David Miller @ 2016-04-20 0:27 UTC (permalink / raw)
To: hannes; +Cc: netdev, jesse
In-Reply-To: <1461007188-1603-1-git-send-email-hannes@stressinduktion.org>
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Mon, 18 Apr 2016 21:19:41 +0200
> This patchset removes the dependency of network drivers on vxlan or
> geneve, so those don't get autoloaded when the nic driver is loaded.
>
> Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port
> are not called without rtnl lock.
In net-next, the 'qed' driver has tunneling offload support too.
Don't you need to update this series to handle that driver as
well?
Thanks.
^ permalink raw reply
* Re: [PATCH net-next] net: dsa: kill circular reference with slave priv
From: David Miller @ 2016-04-20 0:29 UTC (permalink / raw)
To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew
In-Reply-To: <1461010224-10808-1-git-send-email-vivien.didelot@savoirfairelinux.com>
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Mon, 18 Apr 2016 16:10:24 -0400
> The dsa_slave_priv structure does not need a pointer to its net_device.
> Kill it.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] tcp-tso: do not split TSO packets at retransmit time
From: David Miller @ 2016-04-20 0:36 UTC (permalink / raw)
To: edumazet; +Cc: netdev, ncardwell, ycheng, eric.dumazet
In-Reply-To: <1461012972-15757-1-git-send-email-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Mon, 18 Apr 2016 13:56:12 -0700
> 1 % packet losses are common today, and at 100Gbit speeds, this
> translates to ~80,000 losses per second. If we are unlucky and
> first MSS of a 45-MSS TSO is lost, we are cooking 44 MSS segments
> at rtx instead of a single 44-MSS TSO packet.
I'm having trouble understanding this.
If the first mss is lost, then we simply chop the 45 MSS TSO skb into
two pieces. The first piece is a 1 MSS chunk for the retransmit, and
the second piece is remaining 44 MSS TSO skb.
I am pretty sure that is what the current stack does, and regardless
it is certainly what I intended it to do all those years ago when I
wrote this code. :-)
The only case where I can see this patch helping is when we have to
retransmit multi-mss chunks. And yes indeed, it might be a useful
optimization to TSO those frames rather than sending them one MSS at a
time.
^ permalink raw reply
* Re: [PATCH] VSOCK: Only check error on skb_recv_datagram when skb is NULL
From: David Miller @ 2016-04-20 0:42 UTC (permalink / raw)
To: jhansen; +Cc: pv-drivers, netdev, gregkh, linux-kernel, virtualization
In-Reply-To: <1461049132-59927-1-git-send-email-jhansen@vmware.com>
From: Jorgen Hansen <jhansen@vmware.com>
Date: Mon, 18 Apr 2016 23:58:52 -0700
> If skb_recv_datagram returns an skb, we should ignore the err
> value returned. Otherwise, datagram receives will return EAGAIN
> when they have to wait for a datagram.
>
> Acked-by: Adit Ranadive <aditr@vmware.com>
> Signed-off-by: Jorgen Hansen <jhansen@vmware.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] tcp-tso: do not split TSO packets at retransmit time
From: Eric Dumazet @ 2016-04-20 0:49 UTC (permalink / raw)
To: David Miller; +Cc: edumazet, netdev, ncardwell, ycheng
In-Reply-To: <20160419.203656.505846026424405432.davem@davemloft.net>
On Tue, 2016-04-19 at 20:36 -0400, David Miller wrote:
> From: Eric Dumazet <edumazet@google.com>
> Date: Mon, 18 Apr 2016 13:56:12 -0700
>
> > 1 % packet losses are common today, and at 100Gbit speeds, this
> > translates to ~80,000 losses per second. If we are unlucky and
> > first MSS of a 45-MSS TSO is lost, we are cooking 44 MSS segments
> > at rtx instead of a single 44-MSS TSO packet.
>
> I'm having trouble understanding this.
>
> If the first mss is lost, then we simply chop the 45 MSS TSO skb into
> two pieces. The first piece is a 1 MSS chunk for the retransmit, and
> the second piece is remaining 44 MSS TSO skb.
>
> I am pretty sure that is what the current stack does, and regardless
> it is certainly what I intended it to do all those years ago when I
> wrote this code. :-)
>
> The only case where I can see this patch helping is when we have to
> retransmit multi-mss chunks. And yes indeed, it might be a useful
> optimization to TSO those frames rather than sending them one MSS at a
> time.
Yeah, it looks like I got the changelog wrong. We definitely see these
1-MSS splits during retransmits all the time, and we had to change the
sch_fq flow_limit from 100 to 1000 packets to cope with that. (TCP Small
Queues does not guard TCP from sending hundred of rtx at the same time)
^ permalink raw reply
* Re: [PATCH net-next 0/7] net: network drivers should not depend on geneve/vxlan
From: Hannes Frederic Sowa @ 2016-04-20 1:06 UTC (permalink / raw)
To: David Miller; +Cc: netdev, jesse
In-Reply-To: <20160419.202750.1844614056540086769.davem@davemloft.net>
On Wed, Apr 20, 2016, at 02:27, David Miller wrote:
> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Date: Mon, 18 Apr 2016 21:19:41 +0200
>
> > This patchset removes the dependency of network drivers on vxlan or
> > geneve, so those don't get autoloaded when the nic driver is loaded.
> >
> > Also audited the code such that vxlan_get_rx_port and geneve_get_rx_port
> > are not called without rtnl lock.
>
> In net-next, the 'qed' driver has tunneling offload support too.
> Don't you need to update this series to handle that driver as
> well?
I audited qede as well:
qede calls {vxlan,geneve}_get_rx_port only from ndo_open which isn't
reused anywhere else in the driver, only from ndo_open, which holds
rtnl_lock also. Thus the driver is safe and doesn't need a change.
Bye,
Hannes
^ 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