* Re: [PATCH net] net: gso: Fix skb_segment splat when splitting gso_size mangled skb having linear-headed frag_list
From: Shmulik Ladkani @ 2019-09-06 20:02 UTC (permalink / raw)
To: Willem de Bruijn, Alexander Duyck
Cc: Eric Dumazet, Daniel Borkmann, eyal, netdev, Shmulik Ladkani
In-Reply-To: <CA+FuTSea6gTEFFsBfwSECQ8CSi3TFqi2mEPvMuaWNdHwQxwcLg@mail.gmail.com>
> > Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> Reviewed-by: Willem de Bruijn <willemb@google.com>
Thank you Alexander and Willem.
Care to reply with you Reviewed-by tags on the v2 thread?
Best,
Shmulik
^ permalink raw reply
* Re: [PATCH net-next 3/5] enetc: Initialize SerDes for SGMII and SXGMII protocols
From: Andrew Lunn @ 2019-09-06 20:01 UTC (permalink / raw)
To: Claudiu Manoil; +Cc: David S . Miller, alexandru.marginean, netdev
In-Reply-To: <1567779344-30965-4-git-send-email-claudiu.manoil@nxp.com>
On Fri, Sep 06, 2019 at 05:15:42PM +0300, Claudiu Manoil wrote:
> +int enetc_imdio_init(struct enetc_pf *pf)
> +{
> + struct device *dev = &pf->si->pdev->dev;
> + struct enetc_mdio_priv *mdio_priv;
> + struct mii_bus *bus;
> + int err;
> +
> + bus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));
> + if (!bus)
> + return -ENOMEM;
> +
> + bus->name = "FSL ENETC internal MDIO Bus";
> + bus->read = enetc_mdio_read;
> + bus->write = enetc_mdio_write;
> + bus->parent = dev;
Hi Claudiu
Since you don't expect any PHYs to be on this bus, maybe you should
set bus->phy_mask;
Andrew
^ permalink raw reply
* Re: [PATCH net-next 1/5] enetc: Fix if_mode extraction
From: Andrew Lunn @ 2019-09-06 19:57 UTC (permalink / raw)
To: Claudiu Manoil; +Cc: David S . Miller, alexandru.marginean, netdev
In-Reply-To: <1567779344-30965-2-git-send-email-claudiu.manoil@nxp.com>
On Fri, Sep 06, 2019 at 05:15:40PM +0300, Claudiu Manoil wrote:
> Fix handling of error return code. Before this fix,
> the error code was handled as unsigned type.
> Also, on this path if if_mode not found then just handle
> it as fixed link (i.e mac2mac connection).
>
> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
> ---
> drivers/net/ethernet/freescale/enetc/enetc_pf.c | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
> index 7d6513ff8507..3a556646a2fb 100644
> --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
> +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
> @@ -751,6 +751,7 @@ static int enetc_of_get_phy(struct enetc_ndev_priv *priv)
> struct enetc_pf *pf = enetc_si_priv(priv->si);
> struct device_node *np = priv->dev->of_node;
> struct device_node *mdio_np;
> + int phy_mode;
> int err;
>
> if (!np) {
> @@ -784,17 +785,11 @@ static int enetc_of_get_phy(struct enetc_ndev_priv *priv)
> }
> }
>
> - priv->if_mode = of_get_phy_mode(np);
> - if (priv->if_mode < 0) {
> - dev_err(priv->dev, "missing phy type\n");
> - of_node_put(priv->phy_node);
> - if (of_phy_is_fixed_link(np))
> - of_phy_deregister_fixed_link(np);
> - else
> - enetc_mdio_remove(pf);
> -
> - return -EINVAL;
> - }
Hi Claudiu
It is not clear to me why it is no longer necessary to deregister the
fixed link, or remove the mdio bus?
> + phy_mode = of_get_phy_mode(np);
> + if (phy_mode < 0)
> + priv->if_mode = PHY_INTERFACE_MODE_NA; /* fixed link */
> + else
> + priv->if_mode = phy_mode;
Thanks
Andrew
^ permalink raw reply
* Re: [PATCH net-next 2/5] enetc: Make mdio accessors more generic
From: Andrew Lunn @ 2019-09-06 19:53 UTC (permalink / raw)
To: Claudiu Manoil; +Cc: David S . Miller, alexandru.marginean, netdev
In-Reply-To: <1567779344-30965-3-git-send-email-claudiu.manoil@nxp.com>
On Fri, Sep 06, 2019 at 05:15:41PM +0300, Claudiu Manoil wrote:
> +#define enetc_mdio_rd(mdio_priv, off) \
> + _enetc_mdio_rd(mdio_priv, ENETC_##off)
> +#define enetc_mdio_wr(mdio_priv, off, val) \
> + _enetc_mdio_wr(mdio_priv, ENETC_##off, val)
Hi Claudiu
The MDIO code appears to be the only part of this driver which does
these ENETC_##off games. Could you please clean this up and use the
full name in the enetc_mdio_rd() and enetc_mdio_wr() calls.
Otherwise this looks good.
Andrew
^ permalink raw reply
* Re: [PATCH] net/skbuff: silence warnings under memory pressure
From: Sergey Senozhatsky @ 2019-09-06 19:51 UTC (permalink / raw)
To: Petr Mladek
Cc: Sergey Senozhatsky, Steven Rostedt, Qian Cai, davem, Eric Dumazet,
Sergey Senozhatsky, Michal Hocko, linux-mm, linux-kernel, netdev
In-Reply-To: <20190906145533.4uw43a5pvsawmdov@pathway.suse.cz>
On (09/06/19 16:55), Petr Mladek wrote:
> > I think we can queue significantly much less irq_work-s from printk().
> >
> > Petr, Steven, what do you think?
> >
> > Something like this. Call wake_up_interruptible(), switch to
> > wake_up_klogd() only when called from sched code.
>
> Replacing irq_work_queue() with wake_up_interruptible() looks
> dangerous to me.
>
> As a result, all "normal" printk() calls from the scheduler
> code will deadlock. There is almost always a userspace
> logger registered.
I don't see why all printk()-s should deadlock.
A "normal" printk() call will deadlock only when scheduler calls
"normal" printk() under rq or pi locks. But this is illegal anyway,
because console_sem up() calls wake_up_process() - the same function
wake_up_interruptible() calls. IOW "normal" printk() calls from
scheduler end up in scheduler, via console_sem->sched chain. We
already execute wake_up_process()->try_to_wake_up() in printk(),
even when a non-LOGLEVEL_SCHED printk() comes from scheduler.
What am I missing something?
-ss
^ permalink raw reply
* Re: [PATCH] ethernet: micrel: Use DIV_ROUND_CLOSEST directly to make it readable
From: Andrew Lunn @ 2019-09-06 19:40 UTC (permalink / raw)
To: zhong jiang; +Cc: davem, kstewart, gregkh, netdev, linux-kernel
In-Reply-To: <1567698828-26825-1-git-send-email-zhongjiang@huawei.com>
On Thu, Sep 05, 2019 at 11:53:48PM +0800, zhong jiang wrote:
> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
> but is perhaps more readable.
Hi Zhong
Did you find this by hand, or did you use a tool. If a tool is used,
it is normal to give some credit to the tool.
Thanks
Andrew
^ permalink raw reply
* Re: [PATCH 1/2] net: phy: dp83867: Add documentation for SGMII mode type
From: Andrew Lunn @ 2019-09-06 19:29 UTC (permalink / raw)
To: Vitaly Gaiduk
Cc: davem, robh+dt, f.fainelli, Mark Rutland, Trent Piepho, netdev,
devicetree, linux-kernel
In-Reply-To: <1567700761-14195-2-git-send-email-vitaly.gaiduk@cloudbear.ru>
On Thu, Sep 05, 2019 at 07:26:00PM +0300, Vitaly Gaiduk wrote:
> Add documentation of ti,sgmii-type which can be used to select
> SGMII mode type (4 or 6-wire).
Hi Vitaly
Is 4 vs 6-wire a generic SGMII property? Or is it proprietary to TI?
I did a quick search and i could not find any other PHYs supporting
it.
Andrew
^ permalink raw reply
* [PATCH v2] net: enable wireless core features with LEGACY_WEXT_ALLCONFIG
From: Mark Salyzyn @ 2019-09-06 19:24 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-team, Mark Salyzyn, Johannes Berg, David S. Miller,
Marcel Holtmann, linux-wireless, netdev, stable
In embedded environments the requirements are to be able to pick and
chose which features one requires built into the kernel. If an
embedded environment wants to supports loading modules that have been
kbuilt out of tree, there is a need to enable hidden configurations
for legacy wireless core features to provide the API surface for
them to load.
Introduce CONFIG_LEGACY_WEXT_ALLCONFIG to select all legacy wireless
extension core features by activating in turn all the associated
hidden configuration options, without having to specifically select
any wireless module(s).
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: kernel-team@android.com
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # 4.19
---
v2: change name and documentation to CONFIG_LEGACY_WEXT_ALLCONFIG
---
net/wireless/Kconfig | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index 67f8360dfcee..0d646cf28de5 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -17,6 +17,20 @@ config WEXT_SPY
config WEXT_PRIV
bool
+config LEGACY_WEXT_ALLCONFIG
+ bool "allconfig for legacy wireless extensions"
+ select WIRELESS_EXT
+ select WEXT_CORE
+ select WEXT_PROC
+ select WEXT_SPY
+ select WEXT_PRIV
+ help
+ Config option used to enable all the legacy wireless extensions to
+ the core functionality used by add-in modules.
+
+ If you are not building a kernel to be used for a variety of
+ out-of-kernel built wireless modules, say N here.
+
config CFG80211
tristate "cfg80211 - wireless configuration API"
depends on RFKILL || !RFKILL
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related
* [PATCH] ath9k: release allocated buffer if timed out
From: Navid Emamdoost @ 2019-09-06 18:59 UTC (permalink / raw)
Cc: emamd001, smccaman, kjlu, Navid Emamdoost, QCA ath9k Development,
Kalle Valo, David S. Miller, linux-wireless, netdev, linux-kernel
In ath9k_wmi_cmd, the allocated network buffer needs to be released
if timeout happens. Otherwise memory will be leaked.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/net/wireless/ath/ath9k/wmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c
index d1f6710ca63b..cdc146091194 100644
--- a/drivers/net/wireless/ath/ath9k/wmi.c
+++ b/drivers/net/wireless/ath/ath9k/wmi.c
@@ -336,6 +336,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
wmi_cmd_to_name(cmd_id));
mutex_unlock(&wmi->op_mutex);
+ kfree_skb(skb);
return -ETIMEDOUT;
}
--
2.17.1
^ permalink raw reply related
* [vhost:linux-next 15/15] include/linux/page_reporting.h:10:34: error: 'HUGETLB_PAGE_ORDER' undeclared; did you mean 'IOREMAP_MAX_ORDER'?
From: kbuild test robot @ 2019-09-06 18:47 UTC (permalink / raw)
To: Alexander Duyck
Cc: kbuild-all, kvm, virtualization, netdev, Michael S. Tsirkin
[-- Attachment #1: Type: text/plain, Size: 11016 bytes --]
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next
head: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b
commit: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b [15/15] virtio-balloon: Add support for providing unused page reports to host
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c5db5a8d998da36ada7287aa53b4ed501a0a2b2b
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT not defined or empty, the compat vDSO will not be built
In file included from include/linux/mmzone.h:775:0,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/acpi/apei.h:9,
from include/acpi/ghes.h:5,
from include/linux/arm_sdei.h:14,
from arch/arm64/kernel/asm-offsets.c:10:
include/linux/page_reporting.h:9:37: warning: "HUGETLB_PAGE_ORDER" is not defined, evaluates to 0 [-Wundef]
#if defined(CONFIG_HUGETLB_PAGE) && HUGETLB_PAGE_ORDER < MAX_ORDER
^~~~~~~~~~~~~~~~~~
include/linux/page_reporting.h: In function 'get_unreported_tail':
>> include/linux/page_reporting.h:10:34: error: 'HUGETLB_PAGE_ORDER' undeclared (first use in this function); did you mean 'IOREMAP_MAX_ORDER'?
#define PAGE_REPORTING_MIN_ORDER HUGETLB_PAGE_ORDER
^
>> include/linux/page_reporting.h:72:15: note: in expansion of macro 'PAGE_REPORTING_MIN_ORDER'
if (order >= PAGE_REPORTING_MIN_ORDER &&
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/page_reporting.h:10:34: note: each undeclared identifier is reported only once for each function it appears in
#define PAGE_REPORTING_MIN_ORDER HUGETLB_PAGE_ORDER
^
>> include/linux/page_reporting.h:72:15: note: in expansion of macro 'PAGE_REPORTING_MIN_ORDER'
if (order >= PAGE_REPORTING_MIN_ORDER &&
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/page_reporting.h: In function 'add_page_to_reported_list':
>> include/linux/page_reporting.h:10:34: error: 'HUGETLB_PAGE_ORDER' undeclared (first use in this function); did you mean 'IOREMAP_MAX_ORDER'?
#define PAGE_REPORTING_MIN_ORDER HUGETLB_PAGE_ORDER
^
include/linux/page_reporting.h:94:31: note: in expansion of macro 'PAGE_REPORTING_MIN_ORDER'
zone->reported_pages[order - PAGE_REPORTING_MIN_ORDER]++;
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/page_reporting.h: In function 'del_page_from_reported_list':
>> include/linux/page_reporting.h:10:34: error: 'HUGETLB_PAGE_ORDER' undeclared (first use in this function); did you mean 'IOREMAP_MAX_ORDER'?
#define PAGE_REPORTING_MIN_ORDER HUGETLB_PAGE_ORDER
^
include/linux/page_reporting.h:110:44: note: in expansion of macro 'PAGE_REPORTING_MIN_ORDER'
zone->reported_pages[page_private(page) - PAGE_REPORTING_MIN_ORDER]--;
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/page_reporting.h: In function 'page_reporting_notify_free':
>> include/linux/page_reporting.h:10:34: error: 'HUGETLB_PAGE_ORDER' undeclared (first use in this function); did you mean 'IOREMAP_MAX_ORDER'?
#define PAGE_REPORTING_MIN_ORDER HUGETLB_PAGE_ORDER
^
include/linux/page_reporting.h:158:14: note: in expansion of macro 'PAGE_REPORTING_MIN_ORDER'
if (order < PAGE_REPORTING_MIN_ORDER)
^~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
8 real 4 user 4 sys 96.33% cpu make prepare
vim +10 include/linux/page_reporting.h
b1b0d638e6f93b Alexander Duyck 2019-09-06 8
b1b0d638e6f93b Alexander Duyck 2019-09-06 @9 #if defined(CONFIG_HUGETLB_PAGE) && HUGETLB_PAGE_ORDER < MAX_ORDER
b1b0d638e6f93b Alexander Duyck 2019-09-06 @10 #define PAGE_REPORTING_MIN_ORDER HUGETLB_PAGE_ORDER
b1b0d638e6f93b Alexander Duyck 2019-09-06 11 #else
b1b0d638e6f93b Alexander Duyck 2019-09-06 12 #define PAGE_REPORTING_MIN_ORDER (MAX_ORDER - 1)
b1b0d638e6f93b Alexander Duyck 2019-09-06 13 #endif
b1b0d638e6f93b Alexander Duyck 2019-09-06 14 #define PAGE_REPORTING_HWM 32
b1b0d638e6f93b Alexander Duyck 2019-09-06 15
b1b0d638e6f93b Alexander Duyck 2019-09-06 16 #ifdef CONFIG_PAGE_REPORTING
b1b0d638e6f93b Alexander Duyck 2019-09-06 17 struct page_reporting_dev_info {
b1b0d638e6f93b Alexander Duyck 2019-09-06 18 /* function that alters pages to make them "reported" */
b1b0d638e6f93b Alexander Duyck 2019-09-06 19 void (*report)(struct page_reporting_dev_info *phdev,
b1b0d638e6f93b Alexander Duyck 2019-09-06 20 unsigned int nents);
b1b0d638e6f93b Alexander Duyck 2019-09-06 21
b1b0d638e6f93b Alexander Duyck 2019-09-06 22 /* scatterlist containing pages to be processed */
b1b0d638e6f93b Alexander Duyck 2019-09-06 23 struct scatterlist *sg;
b1b0d638e6f93b Alexander Duyck 2019-09-06 24
b1b0d638e6f93b Alexander Duyck 2019-09-06 25 /*
b1b0d638e6f93b Alexander Duyck 2019-09-06 26 * Upper limit on the number of pages that the react function
b1b0d638e6f93b Alexander Duyck 2019-09-06 27 * expects to be placed into the batch list to be processed.
b1b0d638e6f93b Alexander Duyck 2019-09-06 28 */
b1b0d638e6f93b Alexander Duyck 2019-09-06 29 unsigned long capacity;
b1b0d638e6f93b Alexander Duyck 2019-09-06 30
b1b0d638e6f93b Alexander Duyck 2019-09-06 31 /* work struct for processing reports */
b1b0d638e6f93b Alexander Duyck 2019-09-06 32 struct delayed_work work;
b1b0d638e6f93b Alexander Duyck 2019-09-06 33
b1b0d638e6f93b Alexander Duyck 2019-09-06 34 /*
b1b0d638e6f93b Alexander Duyck 2019-09-06 35 * The number of zones requesting reporting, plus one additional if
b1b0d638e6f93b Alexander Duyck 2019-09-06 36 * processing thread is active.
b1b0d638e6f93b Alexander Duyck 2019-09-06 37 */
b1b0d638e6f93b Alexander Duyck 2019-09-06 38 atomic_t refcnt;
b1b0d638e6f93b Alexander Duyck 2019-09-06 39 };
b1b0d638e6f93b Alexander Duyck 2019-09-06 40
b1b0d638e6f93b Alexander Duyck 2019-09-06 41 /* Boundary functions */
b1b0d638e6f93b Alexander Duyck 2019-09-06 42 struct list_head *__page_reporting_get_boundary(unsigned int order,
b1b0d638e6f93b Alexander Duyck 2019-09-06 43 int migratetype);
b1b0d638e6f93b Alexander Duyck 2019-09-06 44 void page_reporting_del_from_boundary(struct page *page, struct zone *zone);
b1b0d638e6f93b Alexander Duyck 2019-09-06 45 void page_reporting_add_to_boundary(struct page *page, struct zone *zone,
b1b0d638e6f93b Alexander Duyck 2019-09-06 46 int migratetype);
b1b0d638e6f93b Alexander Duyck 2019-09-06 47 void page_reporting_move_to_boundary(struct page *page, struct zone *zone,
b1b0d638e6f93b Alexander Duyck 2019-09-06 48 int migratetype);
b1b0d638e6f93b Alexander Duyck 2019-09-06 49
b1b0d638e6f93b Alexander Duyck 2019-09-06 50 /* Reported page accessors, defined in page_alloc.c */
b1b0d638e6f93b Alexander Duyck 2019-09-06 51 struct page *get_unreported_page(struct zone *zone, unsigned int order,
b1b0d638e6f93b Alexander Duyck 2019-09-06 52 int migratetype);
b1b0d638e6f93b Alexander Duyck 2019-09-06 53 void free_reported_page(struct page *page, unsigned int order);
b1b0d638e6f93b Alexander Duyck 2019-09-06 54
b1b0d638e6f93b Alexander Duyck 2019-09-06 55 /* Tear-down and bring-up for page reporting devices */
b1b0d638e6f93b Alexander Duyck 2019-09-06 56 void page_reporting_shutdown(struct page_reporting_dev_info *phdev);
b1b0d638e6f93b Alexander Duyck 2019-09-06 57 int page_reporting_startup(struct page_reporting_dev_info *phdev);
b1b0d638e6f93b Alexander Duyck 2019-09-06 58
b1b0d638e6f93b Alexander Duyck 2019-09-06 59 void __page_reporting_free_stats(struct zone *zone);
b1b0d638e6f93b Alexander Duyck 2019-09-06 60 void __page_reporting_request(struct zone *zone);
b1b0d638e6f93b Alexander Duyck 2019-09-06 61 #endif /* CONFIG_PAGE_REPORTING */
b1b0d638e6f93b Alexander Duyck 2019-09-06 62
b1b0d638e6f93b Alexander Duyck 2019-09-06 63 /*
b1b0d638e6f93b Alexander Duyck 2019-09-06 64 * Method for obtaining the tail of the free list. Using this allows for
b1b0d638e6f93b Alexander Duyck 2019-09-06 65 * tail insertions of unreported pages into the region that is currently
b1b0d638e6f93b Alexander Duyck 2019-09-06 66 * being scanned so as to avoid interleaving reported and unreported pages.
b1b0d638e6f93b Alexander Duyck 2019-09-06 67 */
b1b0d638e6f93b Alexander Duyck 2019-09-06 68 static inline struct list_head *
b1b0d638e6f93b Alexander Duyck 2019-09-06 69 get_unreported_tail(struct zone *zone, unsigned int order, int migratetype)
b1b0d638e6f93b Alexander Duyck 2019-09-06 70 {
b1b0d638e6f93b Alexander Duyck 2019-09-06 71 #ifdef CONFIG_PAGE_REPORTING
b1b0d638e6f93b Alexander Duyck 2019-09-06 @72 if (order >= PAGE_REPORTING_MIN_ORDER &&
b1b0d638e6f93b Alexander Duyck 2019-09-06 73 test_bit(ZONE_PAGE_REPORTING_ACTIVE, &zone->flags))
b1b0d638e6f93b Alexander Duyck 2019-09-06 74 return __page_reporting_get_boundary(order, migratetype);
b1b0d638e6f93b Alexander Duyck 2019-09-06 75 #endif
b1b0d638e6f93b Alexander Duyck 2019-09-06 76 return &zone->free_area[order].free_list[migratetype];
b1b0d638e6f93b Alexander Duyck 2019-09-06 77 }
b1b0d638e6f93b Alexander Duyck 2019-09-06 78
:::::: The code at line 10 was first introduced by commit
:::::: b1b0d638e6f93b91cf34585350bb00035d066989 mm: Introduce Reported pages
:::::: TO: Alexander Duyck <alexander.h.duyck@linux.intel.com>
:::::: CC: Michael S. Tsirkin <mst@redhat.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45258 bytes --]
^ permalink raw reply
* [patch iproute2/net-next] devlink: add reload failed indication
From: Jiri Pirko @ 2019-09-06 18:47 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, dsahern, jakub.kicinski, tariqt, mlxsw
In-Reply-To: <20190906184419.5101-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
devlink/devlink.c | 22 +++++++++++++++-------
include/uapi/linux/devlink.h | 2 ++
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 8c5612a9f9a8..8020d76dd7f7 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -451,6 +451,7 @@ static const enum mnl_attr_data_type devlink_policy[DEVLINK_ATTR_MAX + 1] = {
[DEVLINK_ATTR_TRAP_GENERIC] = MNL_TYPE_FLAG,
[DEVLINK_ATTR_TRAP_METADATA] = MNL_TYPE_NESTED,
[DEVLINK_ATTR_TRAP_GROUP_NAME] = MNL_TYPE_STRING,
+ [DEVLINK_ATTR_RELOAD_FAILED] = MNL_TYPE_U8,
};
static const enum mnl_attr_data_type
@@ -1950,11 +1951,6 @@ static void pr_out_region_chunk(struct dl *dl, uint8_t *data, uint32_t len,
pr_out_region_chunk_end(dl);
}
-static void pr_out_dev(struct dl *dl, struct nlattr **tb)
-{
- pr_out_handle(dl, tb);
-}
-
static void pr_out_section_start(struct dl *dl, const char *name)
{
if (dl->json_output) {
@@ -2630,11 +2626,23 @@ static int cmd_dev_show_cb(const struct nlmsghdr *nlh, void *data)
struct dl *dl = data;
struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
+ uint8_t reload_failed = 0;
mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
if (!tb[DEVLINK_ATTR_BUS_NAME] || !tb[DEVLINK_ATTR_DEV_NAME])
return MNL_CB_ERROR;
- pr_out_dev(dl, tb);
+
+ if (tb[DEVLINK_ATTR_RELOAD_FAILED])
+ reload_failed = mnl_attr_get_u8(tb[DEVLINK_ATTR_RELOAD_FAILED]);
+
+ if (reload_failed) {
+ __pr_out_handle_start(dl, tb, true, false);
+ pr_out_bool(dl, "reload_failed", true);
+ pr_out_handle_end(dl);
+ } else {
+ pr_out_handle(dl, tb);
+ }
+
return MNL_CB_OK;
}
@@ -3972,7 +3980,7 @@ static int cmd_mon_show_cb(const struct nlmsghdr *nlh, void *data)
if (!tb[DEVLINK_ATTR_BUS_NAME] || !tb[DEVLINK_ATTR_DEV_NAME])
return MNL_CB_ERROR;
pr_out_mon_header(genl->cmd);
- pr_out_dev(dl, tb);
+ pr_out_handle(dl, tb);
break;
case DEVLINK_CMD_PORT_GET: /* fall through */
case DEVLINK_CMD_PORT_SET: /* fall through */
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 3fb683bee6ba..d63cf9723f57 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -410,6 +410,8 @@ enum devlink_attr {
DEVLINK_ATTR_TRAP_METADATA, /* nested */
DEVLINK_ATTR_TRAP_GROUP_NAME, /* string */
+ DEVLINK_ATTR_RELOAD_FAILED, /* u8 0 or 1 */
+
/* add new attributes above here, update the policy in devlink.c */
__DEVLINK_ATTR_MAX,
--
2.21.0
^ permalink raw reply related
* [patch net-next 3/3] net: devlink: move reload fail indication to devlink core and expose to user
From: Jiri Pirko @ 2019-09-06 18:44 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, dsahern, jakub.kicinski, tariqt, mlxsw
In-Reply-To: <20190906184419.5101-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@mellanox.com>
Currently the fact that devlink failed is stored in drivers. Move this
flag into devlink core. Also, expose it to the user.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 15 +++++----------
include/net/devlink.h | 3 +++
include/uapi/linux/devlink.h | 2 ++
net/core/devlink.c | 21 ++++++++++++++++++++-
4 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index c71a1d9ea17b..3fa96076e8a5 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -80,7 +80,6 @@ struct mlxsw_core {
struct mlxsw_thermal *thermal;
struct mlxsw_core_port *ports;
unsigned int max_ports;
- bool reload_fail;
bool fw_flash_in_progress;
unsigned long driver_priv[0];
/* driver_priv has to be always the last item */
@@ -1002,15 +1001,11 @@ mlxsw_devlink_core_bus_device_reload_up(struct devlink *devlink,
struct netlink_ext_ack *extack)
{
struct mlxsw_core *mlxsw_core = devlink_priv(devlink);
- int err;
-
- err = mlxsw_core_bus_device_register(mlxsw_core->bus_info,
- mlxsw_core->bus,
- mlxsw_core->bus_priv, true,
- devlink);
- mlxsw_core->reload_fail = !!err;
- return err;
+ return mlxsw_core_bus_device_register(mlxsw_core->bus_info,
+ mlxsw_core->bus,
+ mlxsw_core->bus_priv, true,
+ devlink);
}
static int mlxsw_devlink_flash_update(struct devlink *devlink,
@@ -1254,7 +1249,7 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core,
{
struct devlink *devlink = priv_to_devlink(mlxsw_core);
- if (mlxsw_core->reload_fail) {
+ if (devlink_is_reload_failed(devlink)) {
if (!reload)
/* Only the parts that were not de-initialized in the
* failed reload attempt need to be de-initialized.
diff --git a/include/net/devlink.h b/include/net/devlink.h
index c17709c0d0ec..9c881dc25273 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -38,6 +38,7 @@ struct devlink {
struct device *dev;
possible_net_t _net;
struct mutex lock;
+ bool reload_failed;
char priv[0] __aligned(NETDEV_ALIGN);
};
@@ -940,6 +941,8 @@ void
devlink_health_reporter_state_update(struct devlink_health_reporter *reporter,
enum devlink_health_reporter_state state);
+bool devlink_is_reload_failed(struct devlink *devlink);
+
void devlink_flash_update_begin_notify(struct devlink *devlink);
void devlink_flash_update_end_notify(struct devlink *devlink);
void devlink_flash_update_status_notify(struct devlink *devlink,
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 546e75dd74ac..7cb5e8c5ae0d 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -410,6 +410,8 @@ enum devlink_attr {
DEVLINK_ATTR_TRAP_METADATA, /* nested */
DEVLINK_ATTR_TRAP_GROUP_NAME, /* string */
+ DEVLINK_ATTR_RELOAD_FAILED, /* u8 0 or 1 */
+
/* add new attributes above here, update the policy in devlink.c */
__DEVLINK_ATTR_MAX,
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 1e3a2288b0b2..e00a4a643d17 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -471,6 +471,8 @@ static int devlink_nl_fill(struct sk_buff *msg, struct devlink *devlink,
if (devlink_nl_put_handle(msg, devlink))
goto nla_put_failure;
+ if (nla_put_u8(msg, DEVLINK_ATTR_RELOAD_FAILED, devlink->reload_failed))
+ goto nla_put_failure;
genlmsg_end(msg, hdr);
return 0;
@@ -2677,6 +2679,21 @@ static bool devlink_reload_supported(struct devlink *devlink)
return devlink->ops->reload_down && devlink->ops->reload_up;
}
+static void devlink_reload_failed_set(struct devlink *devlink,
+ bool reload_failed)
+{
+ if (devlink->reload_failed == reload_failed)
+ return;
+ devlink->reload_failed = reload_failed;
+ devlink_notify(devlink, DEVLINK_CMD_NEW);
+}
+
+bool devlink_is_reload_failed(struct devlink *devlink)
+{
+ return devlink->reload_failed;
+}
+EXPORT_SYMBOL_GPL(devlink_is_reload_failed);
+
static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
{
struct devlink *devlink = info->user_ptr[0];
@@ -2693,7 +2710,9 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
err = devlink->ops->reload_down(devlink, info->extack);
if (err)
return err;
- return devlink->ops->reload_up(devlink, info->extack);
+ err = devlink->ops->reload_up(devlink, info->extack);
+ devlink_reload_failed_set(devlink, !!err);
+ return err;
}
static int devlink_nl_flash_update_fill(struct sk_buff *msg,
--
2.21.0
^ permalink raw reply related
* [patch net-next 2/3] net: devlink: split reload op into two
From: Jiri Pirko @ 2019-09-06 18:44 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, dsahern, jakub.kicinski, tariqt, mlxsw
In-Reply-To: <20190906184419.5101-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@mellanox.com>
In order to properly implement failure indication during reload,
split the reload op into two ops, one for down phase and one for
up phase.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/main.c | 19 +++++++++++++++----
drivers/net/ethernet/mellanox/mlxsw/core.c | 19 +++++++++++++++----
drivers/net/netdevsim/dev.c | 13 ++++++++++---
include/net/devlink.h | 5 ++++-
net/core/devlink.c | 16 ++++++++++++----
5 files changed, 56 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index a39c647c12dc..ef3f3d06ff1e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -3935,17 +3935,27 @@ static void mlx4_restart_one_down(struct pci_dev *pdev);
static int mlx4_restart_one_up(struct pci_dev *pdev, bool reload,
struct devlink *devlink);
-static int mlx4_devlink_reload(struct devlink *devlink,
- struct netlink_ext_ack *extack)
+static int mlx4_devlink_reload_down(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
{
struct mlx4_priv *priv = devlink_priv(devlink);
struct mlx4_dev *dev = &priv->dev;
struct mlx4_dev_persistent *persist = dev->persist;
- int err;
if (persist->num_vfs)
mlx4_warn(persist->dev, "Reload performed on PF, will cause reset on operating Virtual Functions\n");
mlx4_restart_one_down(persist->pdev);
+ return 0;
+}
+
+static int mlx4_devlink_reload_up(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
+{
+ struct mlx4_priv *priv = devlink_priv(devlink);
+ struct mlx4_dev *dev = &priv->dev;
+ struct mlx4_dev_persistent *persist = dev->persist;
+ int err;
+
err = mlx4_restart_one_up(persist->pdev, true, devlink);
if (err)
mlx4_err(persist->dev, "mlx4_restart_one_up failed, ret=%d\n",
@@ -3956,7 +3966,8 @@ static int mlx4_devlink_reload(struct devlink *devlink,
static const struct devlink_ops mlx4_devlink_ops = {
.port_type_set = mlx4_devlink_port_type_set,
- .reload = mlx4_devlink_reload,
+ .reload_down = mlx4_devlink_reload_down,
+ .reload_up = mlx4_devlink_reload_up,
};
static int mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index 963a2b4b61b1..c71a1d9ea17b 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -984,16 +984,26 @@ mlxsw_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,
return 0;
}
-static int mlxsw_devlink_core_bus_device_reload(struct devlink *devlink,
- struct netlink_ext_ack *extack)
+static int
+mlxsw_devlink_core_bus_device_reload_down(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
{
struct mlxsw_core *mlxsw_core = devlink_priv(devlink);
- int err;
if (!(mlxsw_core->bus->features & MLXSW_BUS_F_RESET))
return -EOPNOTSUPP;
mlxsw_core_bus_device_unregister(mlxsw_core, true);
+ return 0;
+}
+
+static int
+mlxsw_devlink_core_bus_device_reload_up(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
+{
+ struct mlxsw_core *mlxsw_core = devlink_priv(devlink);
+ int err;
+
err = mlxsw_core_bus_device_register(mlxsw_core->bus_info,
mlxsw_core->bus,
mlxsw_core->bus_priv, true,
@@ -1066,7 +1076,8 @@ mlxsw_devlink_trap_group_init(struct devlink *devlink,
}
static const struct devlink_ops mlxsw_devlink_ops = {
- .reload = mlxsw_devlink_core_bus_device_reload,
+ .reload_down = mlxsw_devlink_core_bus_device_reload_down,
+ .reload_up = mlxsw_devlink_core_bus_device_reload_up,
.port_type_set = mlxsw_devlink_port_type_set,
.port_split = mlxsw_devlink_port_split,
.port_unsplit = mlxsw_devlink_port_unsplit,
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c
index 39cdb6c18ec0..7fba7b271a57 100644
--- a/drivers/net/netdevsim/dev.c
+++ b/drivers/net/netdevsim/dev.c
@@ -521,8 +521,14 @@ static void nsim_dev_traps_exit(struct devlink *devlink)
kfree(nsim_dev->trap_data);
}
-static int nsim_dev_reload(struct devlink *devlink,
- struct netlink_ext_ack *extack)
+static int nsim_dev_reload_down(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
+{
+ return 0;
+}
+
+static int nsim_dev_reload_up(struct devlink *devlink,
+ struct netlink_ext_ack *extack)
{
enum nsim_resource_id res_ids[] = {
NSIM_RESOURCE_IPV4_FIB, NSIM_RESOURCE_IPV4_FIB_RULES,
@@ -638,7 +644,8 @@ nsim_dev_devlink_trap_action_set(struct devlink *devlink,
}
static const struct devlink_ops nsim_dev_devlink_ops = {
- .reload = nsim_dev_reload,
+ .reload_down = nsim_dev_reload_down,
+ .reload_up = nsim_dev_reload_up,
.flash_update = nsim_dev_flash_update,
.trap_init = nsim_dev_devlink_trap_init,
.trap_action_set = nsim_dev_devlink_trap_action_set,
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 460bc629d1a4..c17709c0d0ec 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -637,7 +637,10 @@ enum devlink_trap_group_generic_id {
}
struct devlink_ops {
- int (*reload)(struct devlink *devlink, struct netlink_ext_ack *extack);
+ int (*reload_down)(struct devlink *devlink,
+ struct netlink_ext_ack *extack);
+ int (*reload_up)(struct devlink *devlink,
+ struct netlink_ext_ack *extack);
int (*port_type_set)(struct devlink_port *devlink_port,
enum devlink_port_type port_type);
int (*port_split)(struct devlink *devlink, unsigned int port_index,
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 6e52d639dac6..1e3a2288b0b2 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2672,12 +2672,17 @@ devlink_resources_validate(struct devlink *devlink,
return err;
}
+static bool devlink_reload_supported(struct devlink *devlink)
+{
+ return devlink->ops->reload_down && devlink->ops->reload_up;
+}
+
static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
{
struct devlink *devlink = info->user_ptr[0];
int err;
- if (!devlink->ops->reload)
+ if (!devlink_reload_supported(devlink))
return -EOPNOTSUPP;
err = devlink_resources_validate(devlink, NULL, info);
@@ -2685,7 +2690,10 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
NL_SET_ERR_MSG_MOD(info->extack, "resources size validation failed");
return err;
}
- return devlink->ops->reload(devlink, info->extack);
+ err = devlink->ops->reload_down(devlink, info->extack);
+ if (err)
+ return err;
+ return devlink->ops->reload_up(devlink, info->extack);
}
static int devlink_nl_flash_update_fill(struct sk_buff *msg,
@@ -7145,7 +7153,7 @@ __devlink_param_driverinit_value_set(struct devlink *devlink,
int devlink_param_driverinit_value_get(struct devlink *devlink, u32 param_id,
union devlink_param_value *init_val)
{
- if (!devlink->ops->reload)
+ if (!devlink_reload_supported(devlink))
return -EOPNOTSUPP;
return __devlink_param_driverinit_value_get(&devlink->param_list,
@@ -7192,7 +7200,7 @@ int devlink_port_param_driverinit_value_get(struct devlink_port *devlink_port,
{
struct devlink *devlink = devlink_port->devlink;
- if (!devlink->ops->reload)
+ if (!devlink_reload_supported(devlink))
return -EOPNOTSUPP;
return __devlink_param_driverinit_value_get(&devlink_port->param_list,
--
2.21.0
^ permalink raw reply related
* [patch net-next 1/3] mlx4: Split restart_one into two functions
From: Jiri Pirko @ 2019-09-06 18:44 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, dsahern, jakub.kicinski, tariqt, mlxsw
In-Reply-To: <20190906184419.5101-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@mellanox.com>
Split the function restart_one into two functions and separate teardown
and buildup.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx4/catas.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/main.c | 25 ++++++++++++++++++----
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 3 +--
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c
index 87e90b5d4d7d..5b11557f1ae4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/catas.c
+++ b/drivers/net/ethernet/mellanox/mlx4/catas.c
@@ -210,7 +210,7 @@ static void mlx4_handle_error_state(struct mlx4_dev_persistent *persist)
mutex_lock(&persist->interface_state_mutex);
if (persist->interface_state & MLX4_INTERFACE_STATE_UP &&
!(persist->interface_state & MLX4_INTERFACE_STATE_DELETION)) {
- err = mlx4_restart_one(persist->pdev, false, NULL);
+ err = mlx4_restart_one(persist->pdev);
mlx4_info(persist->dev, "mlx4_restart_one was ended, ret=%d\n",
err);
}
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 07c204bd3fc4..a39c647c12dc 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -3931,6 +3931,10 @@ static void mlx4_devlink_param_load_driverinit_values(struct devlink *devlink)
}
}
+static void mlx4_restart_one_down(struct pci_dev *pdev);
+static int mlx4_restart_one_up(struct pci_dev *pdev, bool reload,
+ struct devlink *devlink);
+
static int mlx4_devlink_reload(struct devlink *devlink,
struct netlink_ext_ack *extack)
{
@@ -3941,9 +3945,11 @@ static int mlx4_devlink_reload(struct devlink *devlink,
if (persist->num_vfs)
mlx4_warn(persist->dev, "Reload performed on PF, will cause reset on operating Virtual Functions\n");
- err = mlx4_restart_one(persist->pdev, true, devlink);
+ mlx4_restart_one_down(persist->pdev);
+ err = mlx4_restart_one_up(persist->pdev, true, devlink);
if (err)
- mlx4_err(persist->dev, "mlx4_restart_one failed, ret=%d\n", err);
+ mlx4_err(persist->dev, "mlx4_restart_one_up failed, ret=%d\n",
+ err);
return err;
}
@@ -4163,7 +4169,13 @@ static int restore_current_port_types(struct mlx4_dev *dev,
return err;
}
-int mlx4_restart_one(struct pci_dev *pdev, bool reload, struct devlink *devlink)
+static void mlx4_restart_one_down(struct pci_dev *pdev)
+{
+ mlx4_unload_one(pdev);
+}
+
+static int mlx4_restart_one_up(struct pci_dev *pdev, bool reload,
+ struct devlink *devlink)
{
struct mlx4_dev_persistent *persist = pci_get_drvdata(pdev);
struct mlx4_dev *dev = persist->dev;
@@ -4175,7 +4187,6 @@ int mlx4_restart_one(struct pci_dev *pdev, bool reload, struct devlink *devlink)
total_vfs = dev->persist->num_vfs;
memcpy(nvfs, dev->persist->nvfs, sizeof(dev->persist->nvfs));
- mlx4_unload_one(pdev);
if (reload)
mlx4_devlink_param_load_driverinit_values(devlink);
err = mlx4_load_one(pdev, pci_dev_data, total_vfs, nvfs, priv, 1);
@@ -4194,6 +4205,12 @@ int mlx4_restart_one(struct pci_dev *pdev, bool reload, struct devlink *devlink)
return err;
}
+int mlx4_restart_one(struct pci_dev *pdev)
+{
+ mlx4_restart_one_down(pdev);
+ return mlx4_restart_one_up(pdev, false, NULL);
+}
+
#define MLX_SP(id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_FORCE_SENSE_PORT }
#define MLX_VF(id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_IS_VF }
#define MLX_GN(id) { PCI_VDEVICE(MELLANOX, id), 0 }
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index 23f1b5b512c2..527b52e48276 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -1043,8 +1043,7 @@ int mlx4_catas_init(struct mlx4_dev *dev);
void mlx4_catas_end(struct mlx4_dev *dev);
int mlx4_crdump_init(struct mlx4_dev *dev);
void mlx4_crdump_end(struct mlx4_dev *dev);
-int mlx4_restart_one(struct pci_dev *pdev, bool reload,
- struct devlink *devlink);
+int mlx4_restart_one(struct pci_dev *pdev);
int mlx4_register_device(struct mlx4_dev *dev);
void mlx4_unregister_device(struct mlx4_dev *dev);
void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_dev_event type,
--
2.21.0
^ permalink raw reply related
* [patch net-next 0/3] net: devlink: move reload fail indication to devlink core and expose to user
From: Jiri Pirko @ 2019-09-06 18:44 UTC (permalink / raw)
To: netdev; +Cc: davem, idosch, dsahern, jakub.kicinski, tariqt, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
First two patches are dependencies of the last one. That moves devlink
reload failure indication to the devlink code, so the drivers do not
have to track it themselves. Currently it is only mlxsw, but I will send
a follow-up patchset that introduces this in netdevsim too.
Jiri Pirko (3):
mlx4: Split restart_one into two functions
net: devlink: split reload op into two
net: devlink: move reload fail indication to devlink core and expose
to user
drivers/net/ethernet/mellanox/mlx4/catas.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/main.c | 44 ++++++++++++++++++----
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 3 +-
drivers/net/ethernet/mellanox/mlxsw/core.c | 30 +++++++++------
drivers/net/netdevsim/dev.c | 13 +++++--
include/net/devlink.h | 8 +++-
include/uapi/linux/devlink.h | 2 +
net/core/devlink.c | 35 +++++++++++++++--
8 files changed, 106 insertions(+), 31 deletions(-)
--
2.21.0
^ permalink raw reply
* Re: [net-next 02/11] devlink: add 'reset_dev_on_drv_probe' param
From: Dirk van der Merwe @ 2019-09-06 18:40 UTC (permalink / raw)
To: Jiri Pirko, Simon Horman
Cc: David Miller, Jakub Kicinski, netdev, oss-drivers
In-Reply-To: <20190906183106.GA3223@nanopsycho.orion>
On 9/6/19 11:31 AM, Jiri Pirko wrote:
> Fri, Sep 06, 2019 at 06:00:52PM CEST, simon.horman@netronome.com wrote:
>> From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
>>
>> Add the 'reset_dev_on_drv_probe' devlink parameter, controlling the
>> device reset policy on driver probe.
>>
>> This parameter is useful in conjunction with the existing
>> 'fw_load_policy' parameter.
>>
>> Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
>> Signed-off-by: Simon Horman <simon.horman@netronome.com>
>> ---
>> Documentation/networking/devlink-params.txt | 14 ++++++++++++++
>> include/net/devlink.h | 4 ++++
>> include/uapi/linux/devlink.h | 7 +++++++
>> net/core/devlink.c | 5 +++++
>> 4 files changed, 30 insertions(+)
>>
>> diff --git a/Documentation/networking/devlink-params.txt b/Documentation/networking/devlink-params.txt
>> index fadb5436188d..f9e30d686243 100644
>> --- a/Documentation/networking/devlink-params.txt
>> +++ b/Documentation/networking/devlink-params.txt
>> @@ -51,3 +51,17 @@ fw_load_policy [DEVICE, GENERIC]
>> * DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK (2)
>> Load firmware currently available on host's disk.
>> Type: u8
>> +
>> +reset_dev_on_drv_probe [DEVICE, GENERIC]
>> + Controls the device's reset policy on driver probe.
>> + Valid values:
>> + * DEVLINK_PARAM_RESET_DEV_VALUE_UNKNOWN (0)
>> + Unknown or invalid value.
> Why do you need this? Do you have usecase for this value?
I added this in to avoid having the entire netlink dump fail when there
are invalid values read from hardware.
This way, it can report an unknown or invalid value instead of failing
the operation.
>
>
>> + * DEVLINK_PARAM_RESET_DEV_VALUE_ALWAYS (1)
>> + Always reset device on driver probe.
>> + * DEVLINK_PARAM_RESET_DEV_VALUE_NEVER (2)
>> + Never reset device on driver probe.
>> + * DEVLINK_PARAM_RESET_DEV_VALUE_DISK (3)
>> + Reset only if device firmware can be found in the
>> + filesystem.
>> + Type: u8
>> diff --git a/include/net/devlink.h b/include/net/devlink.h
>> index 460bc629d1a4..d880de5b8d3a 100644
>> --- a/include/net/devlink.h
>> +++ b/include/net/devlink.h
>> @@ -398,6 +398,7 @@ enum devlink_param_generic_id {
>> DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
>> DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
>> DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
>> + DEVLINK_PARAM_GENERIC_ID_RESET_DEV,
>>
>> /* add new param generic ids above here*/
>> __DEVLINK_PARAM_GENERIC_ID_MAX,
>> @@ -428,6 +429,9 @@ enum devlink_param_generic_id {
>> #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME "fw_load_policy"
>> #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE DEVLINK_PARAM_TYPE_U8
>>
>> +#define DEVLINK_PARAM_GENERIC_RESET_DEV_NAME "reset_dev_on_drv_probe"
> The name of the define and name of the string should be the same. Please
> adjust.
Sure, I will make the change.
Thanks for the review.
^ permalink raw reply
* Re: [PATCH] net: enable wireless core features with WIRELESS_ALLCONFIG
From: Marcel Holtmann @ 2019-09-06 18:31 UTC (permalink / raw)
To: Mark Salyzyn
Cc: linux-kernel, kernel-team, Johannes Berg, David S. Miller,
linux-wireless, netdev, stable
In-Reply-To: <20190906180551.163714-1-salyzyn@android.com>
Hi Mark,
> In embedded environments the requirements are to be able to pick and
> chose which features one requires built into the kernel. If an
> embedded environment wants to supports loading modules that have been
> kbuilt out of tree, there is a need to enable hidden configurations
> for core features to provide the API surface for them to load.
>
> Introduce CONFIG_WIRELESS_ALLCONFIG to select all wireless core
> features by activating all the hidden configuration options, without
> having to specifically select any wireless module(s).
>
> Signed-off-by: Mark Salyzyn <salyzyn@android.com>
> Cc: kernel-team@android.com
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: stable@vger.kernel.org # 4.19
> ---
> net/wireless/Kconfig | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
> index 67f8360dfcee..0d32350e1729 100644
> --- a/net/wireless/Kconfig
> +++ b/net/wireless/Kconfig
> @@ -17,6 +17,20 @@ config WEXT_SPY
> config WEXT_PRIV
> bool
>
> +config WIRELESS_ALLCONFIG
> + bool "allconfig for wireless core"
> + select WIRELESS_EXT
> + select WEXT_CORE
> + select WEXT_PROC
> + select WEXT_SPY
> + select WEXT_PRIV
> + help
> + Config option used to enable all the wireless core functionality
> + used by modules.
> +
> + If you are not building a kernel to be used for a variety of
> + out-of-kernel built wireless modules, say N here.
> +
this looks rather legacy Wireless Extension (wext) specific. So it might be better to clearly name the option “legacy” and “wext” to not confuse anybody running an actual modern driver and userspace.
Regards
Marcel
^ permalink raw reply
* Re: [net-next 02/11] devlink: add 'reset_dev_on_drv_probe' param
From: Jiri Pirko @ 2019-09-06 18:31 UTC (permalink / raw)
To: Simon Horman
Cc: David Miller, Jakub Kicinski, netdev, oss-drivers,
Dirk van der Merwe
In-Reply-To: <20190906160101.14866-3-simon.horman@netronome.com>
Fri, Sep 06, 2019 at 06:00:52PM CEST, simon.horman@netronome.com wrote:
>From: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
>
>Add the 'reset_dev_on_drv_probe' devlink parameter, controlling the
>device reset policy on driver probe.
>
>This parameter is useful in conjunction with the existing
>'fw_load_policy' parameter.
>
>Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
>Signed-off-by: Simon Horman <simon.horman@netronome.com>
>---
> Documentation/networking/devlink-params.txt | 14 ++++++++++++++
> include/net/devlink.h | 4 ++++
> include/uapi/linux/devlink.h | 7 +++++++
> net/core/devlink.c | 5 +++++
> 4 files changed, 30 insertions(+)
>
>diff --git a/Documentation/networking/devlink-params.txt b/Documentation/networking/devlink-params.txt
>index fadb5436188d..f9e30d686243 100644
>--- a/Documentation/networking/devlink-params.txt
>+++ b/Documentation/networking/devlink-params.txt
>@@ -51,3 +51,17 @@ fw_load_policy [DEVICE, GENERIC]
> * DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK (2)
> Load firmware currently available on host's disk.
> Type: u8
>+
>+reset_dev_on_drv_probe [DEVICE, GENERIC]
>+ Controls the device's reset policy on driver probe.
>+ Valid values:
>+ * DEVLINK_PARAM_RESET_DEV_VALUE_UNKNOWN (0)
>+ Unknown or invalid value.
Why do you need this? Do you have usecase for this value?
>+ * DEVLINK_PARAM_RESET_DEV_VALUE_ALWAYS (1)
>+ Always reset device on driver probe.
>+ * DEVLINK_PARAM_RESET_DEV_VALUE_NEVER (2)
>+ Never reset device on driver probe.
>+ * DEVLINK_PARAM_RESET_DEV_VALUE_DISK (3)
>+ Reset only if device firmware can be found in the
>+ filesystem.
>+ Type: u8
>diff --git a/include/net/devlink.h b/include/net/devlink.h
>index 460bc629d1a4..d880de5b8d3a 100644
>--- a/include/net/devlink.h
>+++ b/include/net/devlink.h
>@@ -398,6 +398,7 @@ enum devlink_param_generic_id {
> DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
> DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
> DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
>+ DEVLINK_PARAM_GENERIC_ID_RESET_DEV,
>
> /* add new param generic ids above here*/
> __DEVLINK_PARAM_GENERIC_ID_MAX,
>@@ -428,6 +429,9 @@ enum devlink_param_generic_id {
> #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME "fw_load_policy"
> #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE DEVLINK_PARAM_TYPE_U8
>
>+#define DEVLINK_PARAM_GENERIC_RESET_DEV_NAME "reset_dev_on_drv_probe"
The name of the define and name of the string should be the same. Please
adjust.
>+#define DEVLINK_PARAM_GENERIC_RESET_DEV_TYPE DEVLINK_PARAM_TYPE_U8
>+
> #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
> { \
> .id = DEVLINK_PARAM_GENERIC_ID_##_id, \
>diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
>index c25cc29a6647..3172d1b3329f 100644
>--- a/include/uapi/linux/devlink.h
>+++ b/include/uapi/linux/devlink.h
>@@ -205,6 +205,13 @@ enum devlink_param_fw_load_policy_value {
> DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK,
> };
>
>+enum devlink_param_reset_dev_value {
>+ DEVLINK_PARAM_RESET_DEV_VALUE_UNKNOWN,
>+ DEVLINK_PARAM_RESET_DEV_VALUE_ALWAYS,
>+ DEVLINK_PARAM_RESET_DEV_VALUE_NEVER,
>+ DEVLINK_PARAM_RESET_DEV_VALUE_DISK,
>+};
>+
> enum {
> DEVLINK_ATTR_STATS_RX_PACKETS, /* u64 */
> DEVLINK_ATTR_STATS_RX_BYTES, /* u64 */
>diff --git a/net/core/devlink.c b/net/core/devlink.c
>index 6e52d639dac6..e8bc96f104a7 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -2852,6 +2852,11 @@ static const struct devlink_param devlink_param_generic[] = {
> .name = DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME,
> .type = DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE,
> },
>+ {
>+ .id = DEVLINK_PARAM_GENERIC_ID_RESET_DEV,
>+ .name = DEVLINK_PARAM_GENERIC_RESET_DEV_NAME,
>+ .type = DEVLINK_PARAM_GENERIC_RESET_DEV_TYPE,
>+ },
> };
>
> static int devlink_param_generic_verify(const struct devlink_param *param)
>--
>2.11.0
>
^ permalink raw reply
* [vhost:linux-next 13/15] arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0
From: kbuild test robot @ 2019-09-06 18:28 UTC (permalink / raw)
To: Alexander Duyck
Cc: kbuild-all, kvm, virtualization, netdev, Michael S. Tsirkin
[-- Attachment #1: Type: text/plain, Size: 15735 bytes --]
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next
head: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b
commit: b1b0d638e6f93b91cf34585350bb00035d066989 [13/15] mm: Introduce Reported pages
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b1b0d638e6f93b91cf34585350bb00035d066989
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/ia64/include/asm/ptrace.h:46:0,
from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from arch/ia64/kernel/asm-offsets.c:10:
>> arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0 [-Wundef]
# define HPAGE_SHIFT hpage_shift
^
>> arch/ia64/include/asm/page.h:153:30: note: in expansion of macro 'HPAGE_SHIFT'
# define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
^~~~~~~~~~~
include/linux/page_reporting.h:9:37: note: in expansion of macro 'HUGETLB_PAGE_ORDER'
#if defined(CONFIG_HUGETLB_PAGE) && HUGETLB_PAGE_ORDER < MAX_ORDER
^~~~~~~~~~~~~~~~~~
--
In file included from arch/ia64/include/asm/ptrace.h:46:0,
from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from arch/ia64/kernel/asm-offsets.c:10:
>> arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0 [-Wundef]
# define HPAGE_SHIFT hpage_shift
^
>> arch/ia64/include/asm/page.h:153:30: note: in expansion of macro 'HPAGE_SHIFT'
# define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
^~~~~~~~~~~
include/linux/page_reporting.h:9:37: note: in expansion of macro 'HUGETLB_PAGE_ORDER'
#if defined(CONFIG_HUGETLB_PAGE) && HUGETLB_PAGE_ORDER < MAX_ORDER
^~~~~~~~~~~~~~~~~~
<stdin>:1511:2: warning: #warning syscall clone3 not implemented [-Wcpp]
4 real 3 user 1 sys 120.83% cpu make prepare
vim +/hpage_shift +51 arch/ia64/include/asm/page.h
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 47
0a41e250116058 include/asm-ia64/page.h Peter Chubb 2005-08-16 48
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 49 #ifdef CONFIG_HUGETLB_PAGE
0a41e250116058 include/asm-ia64/page.h Peter Chubb 2005-08-16 50 # define HPAGE_REGION_BASE RGN_BASE(RGN_HPAGE)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 @51 # define HPAGE_SHIFT hpage_shift
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 52 # define HPAGE_SHIFT_DEFAULT 28 /* check ia64 SDM for architecture supported size */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 53 # define HPAGE_SIZE (__IA64_UL_CONST(1) << HPAGE_SHIFT)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 54 # define HPAGE_MASK (~(HPAGE_SIZE - 1))
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 55
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 56 # define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 57 #endif /* CONFIG_HUGETLB_PAGE */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 58
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 59 #ifdef __ASSEMBLY__
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 60 # define __pa(x) ((x) - PAGE_OFFSET)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 61 # define __va(x) ((x) + PAGE_OFFSET)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 62 #else /* !__ASSEMBLY */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 63 # define STRICT_MM_TYPECHECKS
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 64
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 65 extern void clear_page (void *page);
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 66 extern void copy_page (void *to, void *from);
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 67
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 68 /*
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 69 * clear_user_page() and copy_user_page() can't be inline functions because
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 70 * flush_dcache_page() can't be defined until later...
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 71 */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 72 #define clear_user_page(addr, vaddr, page) \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 73 do { \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 74 clear_page(addr); \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 75 flush_dcache_page(page); \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 76 } while (0)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 77
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 78 #define copy_user_page(to, from, vaddr, page) \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 79 do { \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 80 copy_page((to), (from)); \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 81 flush_dcache_page(page); \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 82 } while (0)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 83
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 84
769848c03895b6 include/asm-ia64/page.h Mel Gorman 2007-07-17 85 #define __alloc_zeroed_user_highpage(movableflags, vma, vaddr) \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 86 ({ \
769848c03895b6 include/asm-ia64/page.h Mel Gorman 2007-07-17 87 struct page *page = alloc_page_vma( \
769848c03895b6 include/asm-ia64/page.h Mel Gorman 2007-07-17 88 GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr); \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 89 if (page) \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 90 flush_dcache_page(page); \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 91 page; \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 92 })
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 93
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 94 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 95
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 96 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 97
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 98 #ifdef CONFIG_VIRTUAL_MEM_MAP
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 99 extern int ia64_pfn_valid (unsigned long pfn);
b0f40ea04a85b0 include/asm-ia64/page.h Matthew Wilcox 2006-11-16 100 #else
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 101 # define ia64_pfn_valid(pfn) 1
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 102 #endif
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 103
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 104 #ifdef CONFIG_VIRTUAL_MEM_MAP
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 105 extern struct page *vmem_map;
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 106 #ifdef CONFIG_DISCONTIGMEM
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 107 # define page_to_pfn(page) ((unsigned long) (page - vmem_map))
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 108 # define pfn_to_page(pfn) (vmem_map + (pfn))
d2c0f041e1bb12 arch/ia64/include/asm/page.h Dan Williams 2016-01-15 109 # define __pfn_to_phys(pfn) PFN_PHYS(pfn)
b0f40ea04a85b0 include/asm-ia64/page.h Matthew Wilcox 2006-11-16 110 #else
b0f40ea04a85b0 include/asm-ia64/page.h Matthew Wilcox 2006-11-16 111 # include <asm-generic/memory_model.h>
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 112 #endif
b0f40ea04a85b0 include/asm-ia64/page.h Matthew Wilcox 2006-11-16 113 #else
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 114 # include <asm-generic/memory_model.h>
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 115 #endif
0ecd702bcb924d include/asm-ia64/page.h KAMEZAWA Hiroyuki 2006-03-27 116
1be7d9935b9c7f include/asm-ia64/page.h Bob Picco 2005-10-04 117 #ifdef CONFIG_FLATMEM
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 118 # define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
1be7d9935b9c7f include/asm-ia64/page.h Bob Picco 2005-10-04 119 #elif defined(CONFIG_DISCONTIGMEM)
b77dae5293efba include/asm-ia64/page.h Dean Roe 2005-11-09 120 extern unsigned long min_low_pfn;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 121 extern unsigned long max_low_pfn;
b77dae5293efba include/asm-ia64/page.h Dean Roe 2005-11-09 122 # define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 123 #endif
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 124
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 125 #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 126 #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
631bb0e74e811e include/asm-ia64/page.h Bob Picco 2005-10-31 127 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 128
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 129 typedef union ia64_va {
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 130 struct {
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 131 unsigned long off : 61; /* intra-region offset */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 132 unsigned long reg : 3; /* region number */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 133 } f;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 134 unsigned long l;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 135 void *p;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 136 } ia64_va;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 137
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 138 /*
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 139 * Note: These macros depend on the fact that PAGE_OFFSET has all
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 140 * region bits set to 1 and all other bits set to zero. They are
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 141 * expressed in this way to ensure they result in a single "dep"
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 142 * instruction.
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 143 */
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 144 #define __pa(x) ({ia64_va _v; _v.l = (long) (x); _v.f.reg = 0; _v.l;})
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 145 #define __va(x) ({ia64_va _v; _v.l = (long) (x); _v.f.reg = -1; _v.p;})
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 146
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 147 #define REGION_NUMBER(x) ({ia64_va _v; _v.l = (long) (x); _v.f.reg;})
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 148 #define REGION_OFFSET(x) ({ia64_va _v; _v.l = (long) (x); _v.f.off;})
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 149
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 150 #ifdef CONFIG_HUGETLB_PAGE
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 151 # define htlbpage_to_page(x) (((unsigned long) REGION_NUMBER(x) << 61) \
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 152 | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT)))
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 @153 # define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 154 extern unsigned int hpage_shift;
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 155 #endif
^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 156
:::::: The code at line 51 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19192 bytes --]
^ permalink raw reply
* [PATCH] ath9k_htc: release allocated buffer if timed out
From: Navid Emamdoost @ 2019-09-06 18:26 UTC (permalink / raw)
Cc: emamd001, smccaman, kjlu, Navid Emamdoost, QCA ath9k Development,
Kalle Valo, David S. Miller, linux-wireless, netdev, linux-kernel
In htc_config_pipe_credits, htc_setup_complete, and htc_connect_service
if time out happens, the allocated buffer needs to be released.
Otherwise there will be memory leak.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/net/wireless/ath/ath9k/htc_hst.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c
index 1bf63a4efb4c..d091c8ebdcf0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_hst.c
+++ b/drivers/net/wireless/ath/ath9k/htc_hst.c
@@ -170,6 +170,7 @@ static int htc_config_pipe_credits(struct htc_target *target)
time_left = wait_for_completion_timeout(&target->cmd_wait, HZ);
if (!time_left) {
dev_err(target->dev, "HTC credit config timeout\n");
+ kfree_skb(skb);
return -ETIMEDOUT;
}
@@ -205,6 +206,7 @@ static int htc_setup_complete(struct htc_target *target)
time_left = wait_for_completion_timeout(&target->cmd_wait, HZ);
if (!time_left) {
dev_err(target->dev, "HTC start timeout\n");
+ kfree_skb(skb);
return -ETIMEDOUT;
}
@@ -277,6 +279,7 @@ int htc_connect_service(struct htc_target *target,
if (!time_left) {
dev_err(target->dev, "Service connection timeout for: %d\n",
service_connreq->service_id);
+ kfree_skb(skb);
return -ETIMEDOUT;
}
--
2.17.1
^ permalink raw reply related
* ixgbe: driver drops packets routed from an IPSec interface with a "bad sa_idx" error
From: Michael Marley @ 2019-09-06 18:13 UTC (permalink / raw)
To: netdev
(This is also reported at
https://bugzilla.kernel.org/show_bug.cgi?id=204551, but it was
recommended that I send it to this list as well.)
I have a put together a router that routes traffic from several local
subnets from a switch attached to an i82599ES card through an IPSec VPN
interface set up with StrongSwan. (The VPN is running on an unrelated
second interface with a different driver.) Traffic from the local
interfaces to the VPN works as it should and eventually makes it through
the VPN server and out to the Internet. The return traffic makes it
back to the router and tcpdump shows it leaving by the i82599, but the
traffic never actually makes it onto the wire and I instead get one of
enp1s0: ixgbe_ipsec_tx: bad sa_idx=64512 handle=0
for each packet that should be transmitted. (The sa_idx and handle
values are always the same.)
I realized this was probably related to ixgbe's IPSec offloading
feature, so I tried with the motherboard's integrated e1000e device and
didn't have the problem. I tried using ethtool to disable all the
IPSec-related offloads (tx-esp-segmentation, esp-hw-offload,
esp-tx-csum-hw-offload), but the problem persisted. I then tried
recompiling the kernel with CONFIG_IXGBE_IPSEC=n and that worked around
the problem.
I was also able to find another instance of the same problem reported in
Debian at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930443.
That person seems to be having exactly the same issue as me, down to the
sa_idx and handle values being the same.
If there are any more details I can provide to make this easier to track
down, please let me know.
Thanks,
Michael Marley
^ permalink raw reply
* Re: [PATCH net-next,v3 0/4] flow_offload: update mangle action representation
From: Pablo Neira Ayuso @ 2019-09-06 18:15 UTC (permalink / raw)
To: Edward Cree
Cc: netfilter-devel, davem, netdev, jakub.kicinski, jiri, saeedm,
vishal, vladbu
In-Reply-To: <1637ec50-daae-65df-fcaa-bfd763dbb1d9@solarflare.com>
On Fri, Sep 06, 2019 at 05:49:07PM +0100, Edward Cree wrote:
> On 06/09/2019 16:58, Pablo Neira Ayuso wrote:
> > In tc pedit ex, those are _indeed_ two separated actions:
>
> I read the code again and I get it now, there's double iteration
> already over tcf_exts_for_each_action and tcf_pedit_nkeys, and
> it's only within the latter that you coalesce.
Exactly.
> However, have you considered that iproute2 (i.e. tc tool) isn't
> guaranteed to be the only userland consumer of the TC uAPI?
> For all we know there could be another user out there producing things like
> a single pedit action with two keys, same offset but different
> masks, to mangle sport & dport separately, which your code now
> _would_ coalesce into a single mangle. I don't know if that would
> lead to any problems, but I want to be sure you've thought about it ;)
tc pedit only supports for the "extended mode". So the hardware
offloads only support for a subset of the tc pedit uAPI already.
Userland may decide not to use the "extended mode", however, it will
not work for hardware offloads.
> >> Proper thing to do is have helper functions available to drivers to test
> >> the pedit, and not just switch on the offset. Why do I say that?
> >>
> >> Well, consider a pedit on UDP dport, with mask 0x00ff (network endian).
> >> Now as a u32 pedit that's 0x000000ff offset 0, so field-blind offset
> >> calculation (ffs in flow_action_mangle_entry()) will turn that into
> >> offset 3 mask 0xff. Now driver does
> >> switch(offset) { /* 3 */
> >> case offsetof(struct udphdr, dest): /* 2 */
> >> /* Whoops, we never get here! */
> >> }
> >>
> >> Do you see the problem?
> >
> > This scenario you describe cannot _work_ right now, with the existing
> > code. Without my patchset, this scenario you describe does _not_ work,
> >
> > The drivers in the tree need a mask of 0xffff to infer that this is
> > UDP dport.
> >
> > The 'tc pedit ex' infrastructure does not allow for the scenario that
> > you describe above.
> >
> > No driver in the tree allow for what you describe already.
>
> Looks to me like existing nfp_fl_set_tport() handles just fine any
> arbitrary mask across the u32 that contains UDP sport & dport.
> And the uAPI we have to maintain is the uAPI we expose, not the subset
> that iproute2 uses. I could write a patched tc tool *today* that does
> a pedit of 'UDP header, offset 0, mask 0xff0000ff' and the nfp driver
> would accept that fine (no idea what the fw / chip would do with it,
> but presumably it works or Netronome folks would have put checks in),
> whereas with your patch it'll complain "invalid pedit L4 action"
> because the mask isn't all-1s.
'UDP header, offset 0, mask 0xff0000ff': Mangle one byte of the UDP
sport, and only one mangle of the dport via uAPI.
I get your point: If you think that supporting for this is reasonable
usecase, I'll fix this patchset and send a v4 so the nfp still works
for this.
> And if I made it produce my example from above, mask 0x000000ff, you'd
> calculate an offset of 3 and hit the other error, "unsupported section
> of L4 header", which again would have worked before.
'mask 0x000000ff' mangle only one byte of a UDP port.
I'm sorry for this, I assumed in this case that the reasonable (sane)
uAPI subset in this case to be supported for the hardware offloads is
what tc tool via pedit ex generates.
I'll restore the nfp driver so it works for these scenarios via uAPI
that you describe.
^ permalink raw reply
* [PATCH] net: enable wireless core features with WIRELESS_ALLCONFIG
From: Mark Salyzyn @ 2019-09-06 18:05 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-team, Mark Salyzyn, Johannes Berg, David S. Miller,
linux-wireless, netdev, stable
In embedded environments the requirements are to be able to pick and
chose which features one requires built into the kernel. If an
embedded environment wants to supports loading modules that have been
kbuilt out of tree, there is a need to enable hidden configurations
for core features to provide the API surface for them to load.
Introduce CONFIG_WIRELESS_ALLCONFIG to select all wireless core
features by activating all the hidden configuration options, without
having to specifically select any wireless module(s).
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
Cc: kernel-team@android.com
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # 4.19
---
net/wireless/Kconfig | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index 67f8360dfcee..0d32350e1729 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -17,6 +17,20 @@ config WEXT_SPY
config WEXT_PRIV
bool
+config WIRELESS_ALLCONFIG
+ bool "allconfig for wireless core"
+ select WIRELESS_EXT
+ select WEXT_CORE
+ select WEXT_PROC
+ select WEXT_SPY
+ select WEXT_PRIV
+ help
+ Config option used to enable all the wireless core functionality
+ used by modules.
+
+ If you are not building a kernel to be used for a variety of
+ out-of-kernel built wireless modules, say N here.
+
config CFG80211
tristate "cfg80211 - wireless configuration API"
depends on RFKILL || !RFKILL
--
2.23.0.187.g17f5b7556c-goog
^ permalink raw reply related
* [vhost:linux-next 13/15] htmldocs: mm/page_alloc.c:2207: warning: Function parameter or member 'order' not described in 'free_reported_page'
From: kbuild test robot @ 2019-09-06 17:56 UTC (permalink / raw)
To: Alexander Duyck
Cc: kbuild-all, kvm, virtualization, netdev, Michael S. Tsirkin
[-- Attachment #1: Type: text/plain, Size: 19833 bytes --]
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next
head: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b
commit: b1b0d638e6f93b91cf34585350bb00035d066989 [13/15] mm: Introduce Reported pages
reproduce: make htmldocs
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme.
WARNING: dot(1) not found, for better output quality install graphviz from http://www.graphviz.org
WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org)
drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found
drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found
drivers/usb/typec/class.c:1: warning: 'typec_altmode_unregister_notifier' not found
drivers/usb/typec/class.c:1: warning: 'typec_altmode_register_notifier' not found
include/linux/w1.h:272: warning: Function parameter or member 'of_match_table' not described in 'w1_family'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'quotactl' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'quota_on' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_free_mnt_opts' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_eat_lsm_opts' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_kern_mount' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_show_options' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'sb_add_mnt_opt' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'd_instantiate' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'getprocattr' not described in 'security_list_options'
include/linux/lsm_hooks.h:1811: warning: Function parameter or member 'setprocattr' not described in 'security_list_options'
lib/genalloc.c:1: warning: 'gen_pool_add_virt' not found
lib/genalloc.c:1: warning: 'gen_pool_alloc' not found
lib/genalloc.c:1: warning: 'gen_pool_free' not found
lib/genalloc.c:1: warning: 'gen_pool_alloc_algo' not found
include/linux/regulator/machine.h:196: warning: Function parameter or member 'max_uV_step' not described in 'regulation_constraints'
include/linux/regulator/driver.h:223: warning: Function parameter or member 'resume' not described in 'regulator_ops'
include/linux/spi/spi.h:190: warning: Function parameter or member 'driver_override' not described in 'spi_device'
fs/direct-io.c:258: warning: Excess function parameter 'offset' description in 'dio_complete'
fs/libfs.c:496: warning: Excess function parameter 'available' description in 'simple_write_end'
fs/posix_acl.c:647: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode'
fs/posix_acl.c:647: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode'
fs/posix_acl.c:647: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode'
include/linux/i2c.h:337: warning: Function parameter or member 'init_irq' not described in 'i2c_client'
include/linux/input/sparse-keymap.h:43: warning: Function parameter or member 'sw' not described in 'key_entry'
include/linux/skbuff.h:893: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'list' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'ip_defrag_offset' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'skb_mstamp_ns' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'head_frag' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'encapsulation' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'csum_valid' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member '__pkt_vlan_present_offset' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'vlan_present' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'csum_level' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff'
include/linux/skbuff.h:893: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff'
include/net/sock.h:233: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_portpair' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_cookie' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_listener' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common'
include/net/sock.h:233: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common'
include/net/sock.h:515: warning: Function parameter or member 'sk_rx_skb_cache' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_wq_raw' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_tx_skb_cache' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_route_forced_caps' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_txtime_report_errors' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_validate_xmit_skb' not described in 'sock'
include/net/sock.h:515: warning: Function parameter or member 'sk_bpf_storage' not described in 'sock'
include/net/sock.h:2439: warning: Function parameter or member 'tcp_rx_skb_cache_key' not described in 'DECLARE_STATIC_KEY_FALSE'
include/net/sock.h:2439: warning: Excess function parameter 'sk' description in 'DECLARE_STATIC_KEY_FALSE'
include/net/sock.h:2439: warning: Excess function parameter 'skb' description in 'DECLARE_STATIC_KEY_FALSE'
include/linux/netdevice.h:2040: warning: Function parameter or member 'gso_partial_features' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'tlsdev_ops' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'name_assign_type' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'mpls_ptr' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'xdp_prog' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member '____cacheline_aligned_in_smp' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'qdisc_hash' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'xps_cpus_map' not described in 'net_device'
include/linux/netdevice.h:2040: warning: Function parameter or member 'xps_rxqs_map' not described in 'net_device'
include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state'
include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state'
drivers/net/phy/phylink.c:595: warning: Function parameter or member 'config' not described in 'phylink_create'
drivers/net/phy/phylink.c:595: warning: Excess function parameter 'ndev' description in 'phylink_create'
mm/util.c:1: warning: 'get_user_pages_fast' not found
mm/slab.c:4215: warning: Function parameter or member 'objp' not described in '__ksize'
>> mm/page_alloc.c:2207: warning: Function parameter or member 'order' not described in 'free_reported_page'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:142: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_read_lock'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:347: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor '
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:348: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor '
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:494: warning: Function parameter or member 'start' not described in 'amdgpu_vm_pt_first_dfs'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'vm' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'start' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'cursor' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:546: warning: Function parameter or member 'entry' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:823: warning: Function parameter or member 'level' not described in 'amdgpu_vm_bo_param'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'params' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'bo' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'level' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'pe' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'addr' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'count' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'incr' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1285: warning: Function parameter or member 'flags' not described in 'amdgpu_vm_update_flags'
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:2822: warning: Function parameter or member 'pasid' not described in 'amdgpu_vm_make_compute'
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:378: warning: Excess function parameter 'entry' description in 'amdgpu_irq_dispatch'
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:379: warning: Function parameter or member 'ih' not described in 'amdgpu_irq_dispatch'
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:379: warning: Excess function parameter 'entry' description in 'amdgpu_irq_dispatch'
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:1: warning: no structured comments found
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1: warning: no structured comments found
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:1: warning: 'pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie' not found
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:131: warning: Incorrect use of kernel-doc format: Documentation Makefile include scripts source @atomic_obj
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:237: warning: Incorrect use of kernel-doc format: Documentation Makefile include scripts source gpu_info FW provided soc bounding box struct or 0 if not
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'atomic_obj' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'backlight_link' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'backlight_caps' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'freesync_module' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'fw_dmcu' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'dmcu_fw_version' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:242: warning: Function parameter or member 'soc_bounding_box' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1: warning: 'register_hpd_handlers' not found
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1: warning: 'dm_crtc_high_irq' not found
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1: warning: 'dm_pflip_high_irq' not found
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_pin' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_unpin' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_res_obj' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_get_sg_table' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_import_sg_table' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_vmap' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_vunmap' not described in 'drm_driver'
include/drm/drm_drv.h:722: warning: Function parameter or member 'gem_prime_mmap' not described in 'drm_driver'
include/drm/drm_modeset_helper_vtables.h:1053: warning: Function parameter or member 'prepare_writeback_job' not described in 'drm_connector_helper_funcs'
include/drm/drm_modeset_helper_vtables.h:1053: warning: Function parameter or member 'cleanup_writeback_job' not described in 'drm_connector_helper_funcs'
include/drm/drm_atomic_state_helper.h:1: warning: no structured comments found
drivers/gpu/drm/mcde/mcde_drv.c:1: warning: 'ST-Ericsson MCDE DRM Driver' not found
include/net/cfg80211.h:1092: warning: Function parameter or member 'txpwr' not described in 'station_parameters'
include/net/mac80211.h:4043: warning: Function parameter or member 'sta_set_txpwr' not described in 'ieee80211_ops'
include/net/mac80211.h:2006: warning: Function parameter or member 'txpwr' not described in 'ieee80211_sta'
Documentation/admin-guide/xfs.rst:257: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/trace/kprobetrace.rst:99: WARNING: Explicit markup ends without a blank line; unexpected unindent.
Documentation/translations/it_IT/process/maintainer-pgp-guide.rst:458: WARNING: Unknown target name: "nitrokey pro".
include/uapi/linux/firewire-cdev.h:312: WARNING: Inline literal start-string without end-string.
drivers/firewire/core-transaction.c:606: WARNING: Inline strong start-string without end-string.
Documentation/process/embargoed-hardware-issues.rst:215: WARNING: Malformed table.
Bottom/header table border does not match top border.
vim +2207 mm/page_alloc.c
2195
2196 #ifdef CONFIG_PAGE_REPORTING
2197 /**
2198 * free_reported_page - Return a now-reported page back where we got it
2199 * @page: Page that was reported
2200 *
2201 * This function will pull the migratetype and order information out
2202 * of the page and attempt to return it where it found it. If the page
2203 * is added to the free list without changes we will mark it as being
2204 * reported.
2205 */
2206 void free_reported_page(struct page *page, unsigned int order)
> 2207 {
2208 struct zone *zone = page_zone(page);
2209 unsigned long pfn;
2210 unsigned int mt;
2211
2212 /* zone lock should be held when this function is called */
2213 lockdep_assert_held(&zone->lock);
2214
2215 pfn = page_to_pfn(page);
2216 mt = get_pfnblock_migratetype(page, pfn);
2217 __free_one_page(page, pfn, zone, order, mt, true);
2218
2219 /*
2220 * If page was not comingled with another page we can consider
2221 * the result to be "reported" since part of the page hasn't been
2222 * modified, otherwise we would need to report on the new larger
2223 * page.
2224 */
2225 if (PageBuddy(page) && page_order(page) == order)
2226 add_page_to_reported_list(page, zone, order, mt);
2227 }
2228
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 7254 bytes --]
^ permalink raw reply
* [PATCH net] nfp: flower: cmsg rtnl locks can timeout reify messages
From: Simon Horman @ 2019-09-06 17:29 UTC (permalink / raw)
To: David Miller
Cc: Jakub Kicinski, netdev, oss-drivers, Fred Lotter, Simon Horman
From: Fred Lotter <frederik.lotter@netronome.com>
Flower control message replies are handled in different locations. The truly
high priority replies are handled in the BH (tasklet) context, while the
remaining replies are handled in a predefined Linux work queue. The work
queue handler orders replies into high and low priority groups, and always
start servicing the high priority replies within the received batch first.
Reply Type: Rtnl Lock: Handler:
CMSG_TYPE_PORT_MOD no BH tasklet (mtu)
CMSG_TYPE_TUN_NEIGH no BH tasklet
CMSG_TYPE_FLOW_STATS no BH tasklet
CMSG_TYPE_PORT_REIFY no WQ high
CMSG_TYPE_PORT_MOD yes WQ high (link/mtu)
CMSG_TYPE_MERGE_HINT yes WQ low
CMSG_TYPE_NO_NEIGH no WQ low
CMSG_TYPE_ACTIVE_TUNS no WQ low
CMSG_TYPE_QOS_STATS no WQ low
CMSG_TYPE_LAG_CONFIG no WQ low
A subset of control messages can block waiting for an rtnl lock (from both
work queue priority groups). The rtnl lock is heavily contended for by
external processes such as systemd-udevd, systemd-network and libvirtd,
especially during netdev creation, such as when flower VFs and representors
are instantiated.
Kernel netlink instrumentation shows that external processes (such as
systemd-udevd) often use successive rtnl_trylock() sequences, which can result
in an rtnl_lock() blocked control message to starve for longer periods of time
during rtnl lock contention, i.e. netdev creation.
In the current design a single blocked control message will block the entire
work queue (both priorities), and introduce a latency which is
nondeterministic and dependent on system wide rtnl lock usage.
In some extreme cases, one blocked control message at exactly the wrong time,
just before the maximum number of VFs are instantiated, can block the work
queue for long enough to prevent VF representor REIFY replies from getting
handled in time for the 40ms timeout.
The firmware will deliver the total maximum number of REIFY message replies in
around 300us.
Only REIFY and MTU update messages require replies within a timeout period (of
40ms). The MTU-only updates are already done directly in the BH (tasklet)
handler.
Move the REIFY handler down into the BH (tasklet) in order to resolve timeouts
caused by a blocked work queue waiting on rtnl locks.
Signed-off-by: Fred Lotter <frederik.lotter@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Hi Dave,
I am handling maintenance of the nfp diver in Jakub's absence while he is
on vacation this week and next, and I am sending this patchset in that
capacity.
diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
index d5bbe3d6048b..05981b54eaab 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
@@ -260,9 +260,6 @@ nfp_flower_cmsg_process_one_rx(struct nfp_app *app, struct sk_buff *skb)
type = cmsg_hdr->type;
switch (type) {
- case NFP_FLOWER_CMSG_TYPE_PORT_REIFY:
- nfp_flower_cmsg_portreify_rx(app, skb);
- break;
case NFP_FLOWER_CMSG_TYPE_PORT_MOD:
nfp_flower_cmsg_portmod_rx(app, skb);
break;
@@ -328,8 +325,7 @@ nfp_flower_queue_ctl_msg(struct nfp_app *app, struct sk_buff *skb, int type)
struct nfp_flower_priv *priv = app->priv;
struct sk_buff_head *skb_head;
- if (type == NFP_FLOWER_CMSG_TYPE_PORT_REIFY ||
- type == NFP_FLOWER_CMSG_TYPE_PORT_MOD)
+ if (type == NFP_FLOWER_CMSG_TYPE_PORT_MOD)
skb_head = &priv->cmsg_skbs_high;
else
skb_head = &priv->cmsg_skbs_low;
@@ -368,6 +364,10 @@ void nfp_flower_cmsg_rx(struct nfp_app *app, struct sk_buff *skb)
} else if (cmsg_hdr->type == NFP_FLOWER_CMSG_TYPE_TUN_NEIGH) {
/* Acks from the NFP that the route is added - ignore. */
dev_consume_skb_any(skb);
+ } else if (cmsg_hdr->type == NFP_FLOWER_CMSG_TYPE_PORT_REIFY) {
+ /* Handle REIFY acks outside wq to prevent RTNL conflict. */
+ nfp_flower_cmsg_portreify_rx(app, skb);
+ dev_consume_skb_any(skb);
} else {
nfp_flower_queue_ctl_msg(app, skb, cmsg_hdr->type);
}
--
2.11.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox