Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH] netconsole: make config_item_type const
From: kbuild test robot @ 2017-10-14 19:26 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: kbuild-all, julia.lawall, davem, akpm, nab, linux-kernel, netdev,
	Bhumika Goyal
In-Reply-To: <1507811352-9962-1-git-send-email-bhumirks@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6889 bytes --]

Hi Bhumika,

[auto build test WARNING on net-next/master]
[also build test WARNING on v4.14-rc4 next-20171013]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Bhumika-Goyal/netconsole-make-config_item_type-const/20171015-014833
config: x86_64-randconfig-x005-201742 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/net/netconsole.c: In function 'make_netconsole_target':
>> drivers/net/netconsole.c:650:46: warning: passing argument 3 of 'config_item_init_type_name' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     config_item_init_type_name(&nt->item, name, &netconsole_target_type);
                                                 ^
   In file included from drivers/net/netconsole.c:49:0:
   include/linux/configfs.h:73:13: note: expected 'struct config_item_type *' but argument is of type 'const struct config_item_type *'
    extern void config_item_init_type_name(struct config_item *item,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/netconsole.c: At top level:
>> drivers/net/netconsole.c:695:15: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
       .ci_type = &netconsole_subsys_type,
                  ^

vim +650 drivers/net/netconsole.c

0bcc1816 Satyam Sharma 2007-08-10  624  
0bcc1816 Satyam Sharma 2007-08-10  625  /*
0bcc1816 Satyam Sharma 2007-08-10  626   * Group operations and type for netconsole_subsys.
0bcc1816 Satyam Sharma 2007-08-10  627   */
0bcc1816 Satyam Sharma 2007-08-10  628  
f89ab861 Joel Becker   2008-07-17  629  static struct config_item *make_netconsole_target(struct config_group *group,
f89ab861 Joel Becker   2008-07-17  630  						  const char *name)
0bcc1816 Satyam Sharma 2007-08-10  631  {
0bcc1816 Satyam Sharma 2007-08-10  632  	unsigned long flags;
0bcc1816 Satyam Sharma 2007-08-10  633  	struct netconsole_target *nt;
0bcc1816 Satyam Sharma 2007-08-10  634  
0bcc1816 Satyam Sharma 2007-08-10  635  	/*
0bcc1816 Satyam Sharma 2007-08-10  636  	 * Allocate and initialize with defaults.
698cf1c6 Tejun Heo     2015-06-25  637  	 * Target is disabled at creation (!enabled).
0bcc1816 Satyam Sharma 2007-08-10  638  	 */
0bcc1816 Satyam Sharma 2007-08-10  639  	nt = kzalloc(sizeof(*nt), GFP_KERNEL);
e404decb Joe Perches   2012-01-29  640  	if (!nt)
a6795e9e Joel Becker   2008-07-17  641  		return ERR_PTR(-ENOMEM);
0bcc1816 Satyam Sharma 2007-08-10  642  
0bcc1816 Satyam Sharma 2007-08-10  643  	nt->np.name = "netconsole";
0bcc1816 Satyam Sharma 2007-08-10  644  	strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ);
0bcc1816 Satyam Sharma 2007-08-10  645  	nt->np.local_port = 6665;
0bcc1816 Satyam Sharma 2007-08-10  646  	nt->np.remote_port = 6666;
1667c942 Joe Perches   2015-03-02  647  	eth_broadcast_addr(nt->np.remote_mac);
0bcc1816 Satyam Sharma 2007-08-10  648  
0bcc1816 Satyam Sharma 2007-08-10  649  	/* Initialize the config_item member */
0bcc1816 Satyam Sharma 2007-08-10 @650  	config_item_init_type_name(&nt->item, name, &netconsole_target_type);
0bcc1816 Satyam Sharma 2007-08-10  651  
0bcc1816 Satyam Sharma 2007-08-10  652  	/* Adding, but it is disabled */
0bcc1816 Satyam Sharma 2007-08-10  653  	spin_lock_irqsave(&target_list_lock, flags);
0bcc1816 Satyam Sharma 2007-08-10  654  	list_add(&nt->list, &target_list);
0bcc1816 Satyam Sharma 2007-08-10  655  	spin_unlock_irqrestore(&target_list_lock, flags);
0bcc1816 Satyam Sharma 2007-08-10  656  
f89ab861 Joel Becker   2008-07-17  657  	return &nt->item;
0bcc1816 Satyam Sharma 2007-08-10  658  }
0bcc1816 Satyam Sharma 2007-08-10  659  
0bcc1816 Satyam Sharma 2007-08-10  660  static void drop_netconsole_target(struct config_group *group,
0bcc1816 Satyam Sharma 2007-08-10  661  				   struct config_item *item)
0bcc1816 Satyam Sharma 2007-08-10  662  {
0bcc1816 Satyam Sharma 2007-08-10  663  	unsigned long flags;
0bcc1816 Satyam Sharma 2007-08-10  664  	struct netconsole_target *nt = to_target(item);
0bcc1816 Satyam Sharma 2007-08-10  665  
0bcc1816 Satyam Sharma 2007-08-10  666  	spin_lock_irqsave(&target_list_lock, flags);
0bcc1816 Satyam Sharma 2007-08-10  667  	list_del(&nt->list);
0bcc1816 Satyam Sharma 2007-08-10  668  	spin_unlock_irqrestore(&target_list_lock, flags);
0bcc1816 Satyam Sharma 2007-08-10  669  
0bcc1816 Satyam Sharma 2007-08-10  670  	/*
0bcc1816 Satyam Sharma 2007-08-10  671  	 * The target may have never been enabled, or was manually disabled
0bcc1816 Satyam Sharma 2007-08-10  672  	 * before being removed so netpoll may have already been cleaned up.
0bcc1816 Satyam Sharma 2007-08-10  673  	 */
0bcc1816 Satyam Sharma 2007-08-10  674  	if (nt->enabled)
0bcc1816 Satyam Sharma 2007-08-10  675  		netpoll_cleanup(&nt->np);
0bcc1816 Satyam Sharma 2007-08-10  676  
0bcc1816 Satyam Sharma 2007-08-10  677  	config_item_put(&nt->item);
0bcc1816 Satyam Sharma 2007-08-10  678  }
0bcc1816 Satyam Sharma 2007-08-10  679  
0bcc1816 Satyam Sharma 2007-08-10  680  static struct configfs_group_operations netconsole_subsys_group_ops = {
0bcc1816 Satyam Sharma 2007-08-10  681  	.make_item	= make_netconsole_target,
0bcc1816 Satyam Sharma 2007-08-10  682  	.drop_item	= drop_netconsole_target,
0bcc1816 Satyam Sharma 2007-08-10  683  };
0bcc1816 Satyam Sharma 2007-08-10  684  
5de3a121 Bhumika Goyal 2017-10-12  685  static const struct config_item_type netconsole_subsys_type = {
0bcc1816 Satyam Sharma 2007-08-10  686  	.ct_group_ops	= &netconsole_subsys_group_ops,
0bcc1816 Satyam Sharma 2007-08-10  687  	.ct_owner	= THIS_MODULE,
0bcc1816 Satyam Sharma 2007-08-10  688  };
0bcc1816 Satyam Sharma 2007-08-10  689  
0bcc1816 Satyam Sharma 2007-08-10  690  /* The netconsole configfs subsystem */
0bcc1816 Satyam Sharma 2007-08-10  691  static struct configfs_subsystem netconsole_subsys = {
0bcc1816 Satyam Sharma 2007-08-10  692  	.su_group	= {
0bcc1816 Satyam Sharma 2007-08-10  693  		.cg_item	= {
0bcc1816 Satyam Sharma 2007-08-10  694  			.ci_namebuf	= "netconsole",
0bcc1816 Satyam Sharma 2007-08-10 @695  			.ci_type	= &netconsole_subsys_type,
0bcc1816 Satyam Sharma 2007-08-10  696  		},
0bcc1816 Satyam Sharma 2007-08-10  697  	},
0bcc1816 Satyam Sharma 2007-08-10  698  };
0bcc1816 Satyam Sharma 2007-08-10  699  

:::::: The code at line 650 was first introduced by commit
:::::: 0bcc1816188e570bde1d56a208996660f2633ae0 [NET] netconsole: Support dynamic reconfiguration using configfs

:::::: TO: Satyam Sharma <satyam@infradead.org>
:::::: CC: David S. Miller <davem@sunset.davemloft.net>

---
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: 34777 bytes --]

^ permalink raw reply

* Re: [PATCH v1 RFC 1/7] Replace license with GPL
From: Andrew Lunn @ 2017-10-14 19:41 UTC (permalink / raw)
  To: David Laight, Arkadi Sharshevsky
  Cc: 'Tristram.Ha@microchip.com', Florian Fainelli,
	Pavel Machek, Ruediger Schmitt, muvarov@gmail.com,
	nathan.leigh.conrad@gmail.com,
	vivien.didelot@savoirfairelinux.com, UNGLinuxDriver@microchip.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD008D3F0@AcuExch.aculab.com>

On Mon, Oct 09, 2017 at 09:18:16AM +0000, David Laight wrote:
> From: Tristram.Ha@microchip.com
> > Sent: 06 October 2017 21:33
> > Replace license with GPL.
> 
> Don't you need permission from all the people who have updated
> the files in order to make this change?

Hi David

Interesting question.

ksz_9477_reg.h and ksz_spi.c are not a problem, since Woojung Huh is
the only contributor.

ksz_common.c has a MODULE_LICENSE("GPL") so indicating it probably was
intended to the GPL.

However, getting an acked-by from Arkadi Sharshevsky
<arkadis@mellanox.com> would be good.

       Andrew

^ permalink raw reply

* Re: [PATCH v1 RFC 2/7] Clean up code according to patch check suggestions
From: Andrew Lunn @ 2017-10-14 19:42 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt, muvarov,
	nathan.leigh.conrad, vivien.didelot, UNGLinuxDriver, netdev,
	linux-kernel
In-Reply-To: <1507321985-15097-3-git-send-email-Tristram.Ha@microchip.com>

On Fri, Oct 06, 2017 at 01:33:00PM -0700, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Clean up code according to patch check suggestions.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v1 RFC 3/7] Rename some functions with ksz9477 prefix
From: Andrew Lunn @ 2017-10-14 19:44 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt, muvarov,
	nathan.leigh.conrad, vivien.didelot, UNGLinuxDriver, netdev,
	linux-kernel
In-Reply-To: <1507321985-15097-4-git-send-email-Tristram.Ha@microchip.com>

On Fri, Oct 06, 2017 at 01:33:01PM -0700, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Rename some functions with ksz9477 prefix to separate chip specific code
> from common code.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v1 RFC 4/7] Rename ksz_spi.c to ksz9477_spi.c
From: Andrew Lunn @ 2017-10-14 19:45 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt, muvarov,
	nathan.leigh.conrad, vivien.didelot, UNGLinuxDriver, netdev,
	linux-kernel
In-Reply-To: <1507321985-15097-5-git-send-email-Tristram.Ha@microchip.com>

On Fri, Oct 06, 2017 at 01:33:02PM -0700, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add
> more KSZ switch drivers.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v1 RFC 5/7] Break KSZ9477 DSA driver into two files
From: Andrew Lunn @ 2017-10-14 19:52 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt, muvarov,
	nathan.leigh.conrad, vivien.didelot, UNGLinuxDriver, netdev,
	linux-kernel
In-Reply-To: <1507321985-15097-6-git-send-email-Tristram.Ha@microchip.com>

> diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
> new file mode 100644
> index 0000000..214d380
> --- /dev/null
> +++ b/drivers/net/dsa/microchip/ksz9477.c
> @@ -0,0 +1,1328 @@
> +/*
> + * Microchip KSZ9477 switch driver main logic
> + *
> + * Copyright (C) 2017 Microchip Technology Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <linux/delay.h>
> +#include <linux/export.h>
> +#include <linux/gpio.h>
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/platform_data/microchip-ksz.h>
> +#include <linux/phy.h>
> +#include <linux/etherdevice.h>
> +#include <linux/if_bridge.h>
> +#include <net/dsa.h>
> +#include <net/switchdev.h>
> +
> +#include "ksz_priv.h"
> +#include "ksz_common.h"
> +#include "ksz_9477_reg.h"
> +
> +static const struct {
> +	int index;
> +	char string[ETH_GSTRING_LEN];
> +} mib_names[TOTAL_SWITCH_COUNTER_NUM] = {
> +	{ 0x00, "rx_hi" },
> +	{ 0x01, "rx_undersize" },
> +	{ 0x02, "rx_fragments" },
> +	{ 0x03, "rx_oversize" },
> +	{ 0x04, "rx_jabbers" },
> +	{ 0x05, "rx_symbol_err" },
> +	{ 0x06, "rx_crc_err" },
> +	{ 0x07, "rx_align_err" },
> +	{ 0x08, "rx_mac_ctrl" },
> +	{ 0x09, "rx_pause" },
> +	{ 0x0A, "rx_bcast" },
> +	{ 0x0B, "rx_mcast" },
> +	{ 0x0C, "rx_ucast" },
> +	{ 0x0D, "rx_64_or_less" },
> +	{ 0x0E, "rx_65_127" },
> +	{ 0x0F, "rx_128_255" },
> +	{ 0x10, "rx_256_511" },
> +	{ 0x11, "rx_512_1023" },
> +	{ 0x12, "rx_1024_1522" },
> +	{ 0x13, "rx_1523_2000" },
> +	{ 0x14, "rx_2001" },
> +	{ 0x15, "tx_hi" },
> +	{ 0x16, "tx_late_col" },
> +	{ 0x17, "tx_pause" },
> +	{ 0x18, "tx_bcast" },
> +	{ 0x19, "tx_mcast" },
> +	{ 0x1A, "tx_ucast" },
> +	{ 0x1B, "tx_deferred" },
> +	{ 0x1C, "tx_total_col" },
> +	{ 0x1D, "tx_exc_col" },
> +	{ 0x1E, "tx_single_col" },
> +	{ 0x1F, "tx_mult_col" },
> +	{ 0x80, "rx_total" },
> +	{ 0x81, "tx_total" },
> +	{ 0x82, "rx_discards" },
> +	{ 0x83, "tx_discards" },
> +};
> +
> +static void ksz_cfg32(struct ksz_device *dev, u32 addr, u32 bits, bool set)
> +{
> +	u32 data;
> +
> +	ksz_read32(dev, addr, &data);
> +	if (set)
> +		data |= bits;
> +	else
> +		data &= ~bits;
> +	ksz_write32(dev, addr, data);
> +}

In a follow up patch, it would be good to fixup the naming. All
functions should use the ksz9477_ prefix.

But this is O.K. for now.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply

* Re: [PATCH v1 RFC 6/7] Add MIB counter reading support
From: Andrew Lunn @ 2017-10-14 20:07 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt, muvarov,
	nathan.leigh.conrad, vivien.didelot, UNGLinuxDriver, netdev,
	linux-kernel
In-Reply-To: <1507321985-15097-7-git-send-email-Tristram.Ha@microchip.com>

> +static void ksz9477_phy_setup(struct ksz_device *dev, int port,
> +			      struct phy_device *phy)
> +{
> +	if (port < dev->phy_port_cnt) {
> +		/* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be removed to
> +		 * disable flow control when rate limiting is used.
> +		 */
> +		phy->advertising = phy->supported;
> +	}
> +}
> +

This has nothing to do with MIBs. It does not belong in this patch.

>  static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
>  {
>  	u8 data8;
> @@ -1159,6 +1198,8 @@ static int ksz9477_setup(struct dsa_switch *ds)
>  	/* start switch */
>  	ksz_cfg(dev, REG_SW_OPERATION, SW_START, true);
>  
> +	ksz_init_mib_timer(dev);
> +
>  	return 0;
>  }
>  
> @@ -1168,6 +1209,7 @@ static int ksz9477_setup(struct dsa_switch *ds)
>  	.set_addr		= ksz9477_set_addr,
>  	.phy_read		= ksz9477_phy_read16,
>  	.phy_write		= ksz9477_phy_write16,
> +	.adjust_link		= ksz_adjust_link,

Please move the adjust_link changes into a separate patch.

I need to come back at look at the mutex's and the freeze code. It is
not obviously correct, and i don't have the time at the moment.

       Andrew

^ permalink raw reply

* Re: [PATCH v1 RFC 7/7] Modify tag_ksz.c so that tail tag code can be used by other KSZ switch drivers
From: Andrew Lunn @ 2017-10-14 20:15 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt, muvarov,
	nathan.leigh.conrad, vivien.didelot, UNGLinuxDriver, netdev,
	linux-kernel
In-Reply-To: <1507321985-15097-8-git-send-email-Tristram.Ha@microchip.com>

On Fri, Oct 06, 2017 at 01:33:05PM -0700, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Modify tag_ksz.c so that tail tag code can be used by other KSZ switch
> drivers.

There is multiple things going on in this patch. Please split the
special_mult_addr change into a separate patch, with an explanation
why it is needed. Same for the PTP indication.

It is always better to have lots of small patches, one logical change
per patch.

    Andrew

^ permalink raw reply

* Re: [pull request][for-next 00/12] Mellanox, mlx5 IPoIB Muli Pkey support 2017-10-11
From: Doug Ledford @ 2017-10-14 21:19 UTC (permalink / raw)
  To: Saeed Mahameed, David S. Miller
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Leon Romanovsky
In-Reply-To: <20171014184827.18491-1-saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1229 bytes --]

On 10/14/2017 2:48 PM, Saeed Mahameed wrote:
> Hi Dave and Doug,
> 
> This series includes updates for mlx5 IPoIB offloading driver from Alex
> and Feras to add the support for Muli Pkey in the mlx5i ipoib offloading netdev,
> to be merged into net-next and rdma-next trees.

As far as the two IPoIB patches are concerned, they're fine.

> Doug, I am sorry I couldn't base this on rc2 since the series needs and conflicts
> with a fix that was submitted to rc3, so to keep things simple I based it on rc4,
> I hope this is ok with you..

No worries, it just means I have to submit it under another branch.  But
I'm already holding one patch series in a stand alone branch, so no big
deal.  And, actually, the IPoIB changes are so small they can simply go
through Dave's tree if you don't have any dependent code in the IPoIB
driver to submit after this but still in this devel cycle.

> Please pull and let me know if there's any problem.

Once I hear that Dave is OK with the net changes, I'm ready to pull (if
I need to).

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG Key ID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply

* Re: [PATCH v3 0/6] staging: Introduce DPAA2 Ethernet Switch driver
From: Linus Walleij @ 2017-10-14 21:59 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: devel@driverdev.osuosl.org, Andrew Lunn, ruxandra.radulescu,
	Arnd Bergmann, netdev@vger.kernel.org, alexandru.marginean,
	linux-kernel@vger.kernel.org, Alexander Graf, Razvan Stefanescu,
	Stuart Yoder, Greg KH, OpenWrt Development List,
	bogdan.purcareata, laurentiu.tudor
In-Reply-To: <f8b49089-f2db-f7d7-f615-1e4b5082127d@gmail.com>

On Sat, Oct 14, 2017 at 8:52 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:

> The most deployed switch device drivers have been converted to DSA
> already: b53, qca8k (ar83xx in OpenWrt/LEDE) and mtk7530 are all in
> tree, and now we are getting new submissions from Michrochip to support
> their pretty large KSZ series. Converting from swconfig to DSA is
> actually quite simple, but like anything requires time and testing, and
> access to hardware and ideally datasheet.

Hm, I have a Realtek RB8366RB in this router on my desk.

I guess that means I should just take the old switchdev-based
SMI-driver and convert it to DSA.

I bet I can do that :D

Well, I will try. Because it's blocking me to work on the Gemini
ethernet driver.

Yours,
Linus Walleij
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

^ permalink raw reply

* Re: [OpenWrt-Devel] [PATCH v3 0/6] staging: Introduce DPAA2 Ethernet Switch driver
From: Florian Fainelli @ 2017-10-14 22:11 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Razvan Stefanescu, OpenWrt Development List,
	netdev@vger.kernel.org, devel@driverdev.osuosl.org,
	ruxandra.radulescu, Arnd Bergmann, Greg KH, alexandru.marginean,
	linux-kernel@vger.kernel.org, Alexander Graf, Stuart Yoder,
	bogdan.purcareata, laurentiu.tudor, Andrew Lunn, Vivien Didelot
In-Reply-To: <CACRpkdbyZYP9-CoZA+BZmnaQ+5mz9fZjQ1ApVBp65XB1LmOhaw@mail.gmail.com>

On October 14, 2017 2:59:22 PM PDT, Linus Walleij <linus.walleij@linaro.org> wrote:
>On Sat, Oct 14, 2017 at 8:52 PM, Florian Fainelli
><f.fainelli@gmail.com> wrote:
>
>> The most deployed switch device drivers have been converted to DSA
>> already: b53, qca8k (ar83xx in OpenWrt/LEDE) and mtk7530 are all in
>> tree, and now we are getting new submissions from Michrochip to
>support
>> their pretty large KSZ series. Converting from swconfig to DSA is
>> actually quite simple, but like anything requires time and testing,
>and
>> access to hardware and ideally datasheet.
>
>Hm, I have a Realtek RB8366RB in this router on my desk.
>
>I guess that means I should just take the old switchdev-based
>SMI-driver and convert it to DSA.
>
>I bet I can do that :D

Yes, it really should not be too hard. The OpenWrt/LEDE driver had mostly the same semantics as what is needed for being a proper DSA driver. You should of course start simple: get basic switching working, then add statistics, VLAN, FDB, etc. OpenWrt/LEDE models switches as PHY device objects which would not work upstream so you should have the driver be probed as a MDIO/SPI/I2C (see b53 for example) and set up fixed-link properties between the CPU and the switch.

>
>Well, I will try. Because it's blocking me to work on the Gemini
>ethernet driver.

Well usually the boot loader may leave the switch in a good enough state that you can work on the CPU controller mostly independently from dealing with the switch. This is not universally true, and a properly working bootloader should actually quiesce/reset both blocks prior to OS control.

Don't hesitate if you have questions.

Cheers.

-- 
Florian

^ permalink raw reply

* Re: [pull request][for-next 00/12] Mellanox, mlx5 IPoIB Muli Pkey support 2017-10-11
From: Parav Pandit @ 2017-10-14 22:51 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: David S. Miller, Doug Ledford, netdev, linux-rdma,
	Leon Romanovsky
In-Reply-To: <20171014184827.18491-1-saeedm@mellanox.com>

On Sat, Oct 14, 2017 at 1:48 PM, Saeed Mahameed <saeedm@mellanox.com> wrote:
> Hi Dave and Doug,
>
> This series includes updates for mlx5 IPoIB offloading driver from Alex
> and Feras to add the support for Muli Pkey in the mlx5i ipoib offloading netdev,

In description and cover letter subject, here
s/Muli/Multi

^ permalink raw reply

* Re: [PATCH] Add -target to clang switch while cross compiling.
From: Daniel Borkmann @ 2017-10-14 23:10 UTC (permalink / raw)
  To: Abhijit Ayarekar, ast; +Cc: netdev, linux-kernel
In-Reply-To: <1507922646-19260-1-git-send-email-abhijit.ayarekar@caviumnetworks.com>

On 10/13/2017 09:24 PM, Abhijit Ayarekar wrote:
> Update to llvm excludes assembly instructions.
> llvm git revision is below
>
> commit 65fad7c26569 ("bpf: add inline-asm support")
>
> This change will be part of llvm  release 6.0
>
> __ASM_SYSREG_H define is not required for native compile.
> -target switch includes appropriate target specific files
> while cross compiling
>
> Tested on x86 and arm64.
>
> Signed-off-by: Abhijit Ayarekar <abhijit.ayarekar@caviumnetworks.com>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

^ permalink raw reply

* Re: [patch net-next 06/34] net: core: use dev->ingress_queue instead of tp->q
From: Daniel Borkmann @ 2017-10-14 23:18 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: netdev, davem, jhs, xiyou.wangcong, mlxsw, andrew, vivien.didelot,
	f.fainelli, michael.chan, ganeshgr, jeffrey.t.kirsher, saeedm,
	matanb, leonro, idosch, jakub.kicinski, ast, simon.horman,
	pieter.jansenvanvuuren, john.hurley, edumazet, dsahern,
	alexander.h.duyck, john.fastabend, willemb
In-Reply-To: <20171013063019.GC1952@nanopsycho.orion>

On 10/13/2017 08:30 AM, Jiri Pirko wrote:
> Thu, Oct 12, 2017 at 11:45:43PM CEST, daniel@iogearbox.net wrote:
>> On 10/12/2017 07:17 PM, Jiri Pirko wrote:
>>> From: Jiri Pirko <jiri@mellanox.com>
>>>
>>> In sch_handle_egress and sch_handle_ingress, don't use tp->q and use
>>> dev->ingress_queue which stores the same pointer instead.
>>>
>>> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
>>> ---
>>>    net/core/dev.c | 21 +++++++++++++++------
>>>    1 file changed, 15 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/net/core/dev.c b/net/core/dev.c
>>> index fcddccb..cb9e5e5 100644
>>> --- a/net/core/dev.c
>>> +++ b/net/core/dev.c
>>> @@ -3273,14 +3273,18 @@ EXPORT_SYMBOL(dev_loopback_xmit);
>>>    static struct sk_buff *
>>>    sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev)
>>>    {
>>> +	struct netdev_queue *netdev_queue =
>>> +				rcu_dereference_bh(dev->ingress_queue);
>>>    	struct tcf_proto *cl = rcu_dereference_bh(dev->egress_cl_list);
>>>    	struct tcf_result cl_res;
>>> +	struct Qdisc *q;
>>>
>>> -	if (!cl)
>>> +	if (!cl || !netdev_queue)
>>>    		return skb;
>>> +	q = netdev_queue->qdisc;
>>
>> NAK, no additional overhead in the software fast-path of
>> sch_handle_{ingress,egress}() like this. There are users out there
>> that use tc in software only, so performance is critical here.
>
> Okay, how else do you suggest I can avoid the need to use tp->q?
> I was thinking about storing q directly to net_device, which would safe
> one dereference, resulting in the same amount as current cl->q.

Sorry for late reply, mostly off for few days. netdev struct has different
cachelines which are hot on rx and tx (see also the location of the two
lists, ingress_cl_list and egress_cl_list), if you add only one qdisc
pointer there, then you'd at least penalize one of the two w/ potential
cache miss. Can we leave it in cl?

^ permalink raw reply

* Re: [PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
From: Michael S. Tsirkin @ 2017-10-15  0:45 UTC (permalink / raw)
  To: Willem de Bruijn
  Cc: netdev, davem, jasowang, virtualization, Willem de Bruijn
In-Reply-To: <20171013155140.124530-1-willemdebruijn.kernel@gmail.com>

On Fri, Oct 13, 2017 at 11:51:40AM -0400, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> Implement the reset communication request defined in the VIRTIO 1.0
> specification and introduces in Linux in commit c00bbcf862896 ("virtio:
> add VIRTIO_CONFIG_S_NEEDS_RESET device status bit").
> 
> Use the virtnet_reset function introduced in commit 2de2f7f40ef9
> ("virtio_net: XDP support for adjust_head"). That was removed in
> commit 4941d472bf95 ("virtio-net: do not reset during XDP set"),
> because no longer used. Bring it back, minus the xdp specific code.
> 
> Before tearing down any state, virtnet_freeze_down quiesces the
> device with netif_tx_disable. virtnet_reset also ensures that no
> other config operations can run concurrently.
> 
> On successful reset, the host can observe that the flag has been
> cleared. There is no need for the explicit control flag introduced
> in the previous RFC of this patch.
> 
> Changes
>   RFC -> v1
>   - drop VIRTIO_NET_CTRL_RESET_ACK message
>   - drop VIRTIO_F_CAN_RESET flag to notify guest support
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>
> ---
>  drivers/net/virtio_net.c | 48 ++++++++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 44 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fc059f193e7d..8e768b54844f 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1903,13 +1903,14 @@ static const struct ethtool_ops virtnet_ethtool_ops = {
>  	.set_link_ksettings = virtnet_set_link_ksettings,
>  };
>  
> -static void virtnet_freeze_down(struct virtio_device *vdev)
> +static void virtnet_freeze_down(struct virtio_device *vdev, bool in_config)
>  {
>  	struct virtnet_info *vi = vdev->priv;
>  	int i;
>  
> -	/* Make sure no work handler is accessing the device */
> -	flush_work(&vi->config_work);
> +	/* Make sure no other work handler is accessing the device */
> +	if (!in_config)
> +		flush_work(&vi->config_work);
>  
>  	netif_device_detach(vi->dev);
>  	netif_tx_disable(vi->dev);
> @@ -1924,6 +1925,7 @@ static void virtnet_freeze_down(struct virtio_device *vdev)
>  }
>  
>  static int init_vqs(struct virtnet_info *vi);
> +static void remove_vq_common(struct virtnet_info *vi);
>  
>  static int virtnet_restore_up(struct virtio_device *vdev)
>  {
> @@ -1952,6 +1954,40 @@ static int virtnet_restore_up(struct virtio_device *vdev)
>  	return err;
>  }
>  
> +static int virtnet_reset(struct virtnet_info *vi)
> +{
> +	struct virtio_device *dev = vi->vdev;
> +	int ret;
> +
> +	virtio_config_disable(dev);
> +	dev->failed = dev->config->get_status(dev) & VIRTIO_CONFIG_S_FAILED;
> +	virtnet_freeze_down(dev, true);
> +	remove_vq_common(vi);
> +
> +	virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE);
> +	virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER);
> +
> +	ret = virtio_finalize_features(dev);
> +	if (ret)
> +		goto err;
> +
> +	ret = virtnet_restore_up(dev);
> +	if (ret)
> +		goto err;
> +
> +	ret = virtnet_set_queues(vi, vi->curr_queue_pairs);
> +	if (ret)
> +		goto err;
> +
> +	virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
> +	virtio_config_enable(dev);
> +	return 0;
> +
> +err:
> +	virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED);
> +	return ret;
> +}
> +
>  static int virtnet_set_guest_offloads(struct virtnet_info *vi, u64 offloads)
>  {
>  	struct scatterlist sg;

I have a question here though. How do things like MAC address
get restored?

What about the rx mode?

vlans?

Also, it seems that LINK_ANNOUNCE requests will get ignored
even if they got set before the reset, leading to downtime.

> @@ -2136,6 +2172,10 @@ static void virtnet_config_changed_work(struct work_struct *work)
>  		virtnet_ack_link_announce(vi);
>  	}
>  
> +	if (vi->vdev->config->get_status(vi->vdev) &
> +	    VIRTIO_CONFIG_S_NEEDS_RESET)
> +		virtnet_reset(vi);
> +
>  	/* Ignore unknown (future) status bits */
>  	v &= VIRTIO_NET_S_LINK_UP;
>  
> @@ -2756,7 +2796,7 @@ static __maybe_unused int virtnet_freeze(struct virtio_device *vdev)
>  	struct virtnet_info *vi = vdev->priv;
>  
>  	virtnet_cpu_notif_remove(vi);
> -	virtnet_freeze_down(vdev);
> +	virtnet_freeze_down(vdev, false);
>  	remove_vq_common(vi);
>  
>  	return 0;
> -- 
> 2.15.0.rc0.271.g36b669edcc-goog

^ permalink raw reply

* Re: Linux 4.12+ memory leak on router with i40e NICs
From: Alexander Duyck @ 2017-10-15  0:58 UTC (permalink / raw)
  To: Paweł Staszewski
  Cc: Anders K. Pedersen | Cohaesio, netdev@vger.kernel.org,
	intel-wired-lan@lists.osuosl.org, alexander.h.duyck@intel.com
In-Reply-To: <c49a750f-c47c-9de0-ebf0-148db5e3d3c5@itcare.pl>

Hi Pawel,

To clarify is that Dave Miller's tree or Linus's that you are talking
about? If it is Dave's tree how long ago was it you pulled it since I
think the fix was just pushed by Jeff Kirsher a few days ago.

The issue should be fixed in the following commit:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/drivers/net/ethernet/intel/i40e/i40e_txrx.c?id=2b9478ffc550f17c6cd8c69057234e91150f5972

Thanks.

- Alex

On Sat, Oct 14, 2017 at 3:03 PM, Paweł Staszewski <pstaszewski@itcare.pl> wrote:
> Forgot to add - this graphs are tested with Kernel 4.14-rc4-next
>
>
> W dniu 2017-10-15 o 00:00, Paweł Staszewski pisze:
>
> Same problem here
>
> Also only difference is change 82599 intel to x710 and have memleak
>
> mem with ixgbe driver over time - same config saame kernel
>
>
>
> changed NIC's to x710 i40e driver (this is the only change)
>
> And mem over time:
>
>
>
> There is no process that is eating memory - looks like there is some problem
> with i40e driver - but it not a surprise :) this driver is really buggy -
> with many things - most tickets on e1000e sourceforge that i openned have no
> reply for year or more - or if somebody reply after year they are closing
> ticket after 1 day with info about no activity :)
>
>
>
> W dniu 2017-10-05 o 07:19, Anders K. Pedersen | Cohaesio pisze:
>
> On ons, 2017-10-04 at 08:32 -0700, Alexander Duyck wrote:
>
> On Wed, Oct 4, 2017 at 5:56 AM, Anders K. Pedersen | Cohaesio
> <akp@cohaesio.com> wrote:
>
> Hello,
>
> After updating one of our Linux based routers to kernel 4.13 it
> began
> leaking memory quite fast (about 1 GB every half hour). To narrow
> we
> tried various kernel versions and found that 4.11.12 is okay, while
> 4.12 also leaks, so we did a bisection between 4.11 and 4.12.
>
> The first bisection ended at
> "[6964e53f55837b0c49ed60d36656d2e0ee4fc27b] i40e: fix handling of
> HW
> ATR eviction", which fixes some flag handling that was broken by
> 47994c119a36 "i40e: remove hw_disabled_flags in favor of using
> separate
> flag bits", so I did a second bisection, where I added 6964e53f5583
> "i40e: fix handling of HW ATR eviction" to the steps that had
> 47994c119a36 "i40e: remove hw_disabled_flags in favor of using
> separate
> flag bits" in them.
>
> The second bisection ended at
> "[0e626ff7ccbfc43c6cc4aeea611c40b899682382] i40e: Fix support for
> flow
> director programming status", where I don't see any obvious
> problems,
> so I'm hoping for some assistance.
>
> The router is a PowerEdge R730 server (Haswell based) with three
> Intel
> NICs (all using the i40e driver):
>
> X710 quad port 10 GbE SFP+: eth0 eth1 eth2 eth3
> X710 quad port 10 GbE SFP+: eth4 eth5 eth6 eth7
> XL710 dual port 40 GbE QSFP+: eth8 eth9
>
> The NICs are aggregated with LACP with the team driver:
>
> team0: eth9 (40 GbE selected primary), and eth3, eth7 (10 GbE non-
> selected backups)
> team1: eth0, eth1, eth4, eth5 (all 10 GbE selected)
>
> team0 is used for internal networks and has one untagged and four
> tagged VLAN interfaces, while team1 has an external uplink
> connection
> without any VLANs.
>
> The router runs an eBGP session on team1 to one of our uplinks, and
> iBGP via team0 to our other border routers. It also runs OSPF on
> the
> internal VLANs on team0. One thing I've noticed is that when OSPF
> is
> not announcing a default gateway to the internal networks, so there
> is
> almost no traffic coming in on team0 and out on team1, but still
> plenty
> of traffic coming in on team1 and out via team0, there's no memory
> leak
> (or at least it is so small that we haven't detected it). But as
> soon
> as we configure OSPF to announce a default gateway to the internal
> VLANs, so we get traffic from team0 to team1 the leaking begins.
> Stopping the OSPF default gateway announcement again also stops the
> leaking, but does not release already leaked memory.
>
> So this leads to me suspect that the leaking is related to RX on
> team0
> (where XL710 eth9 is normally the only active interface) or TX on
> team1
> (X710 eth0, eth1, eth4, eth5). The first bad commit is related to
> RX
> cleaning, which suggests RX on team0. Since we're only seeing the
> leak
> for our outbound traffic, I suspect either a difference between the
> X710 vs. XL710 NICs, or that the inbound traffic is for relatively
> few
> destination addresses (only our own systems) while the outbound
> traffic
> is for many different addresses on the internet. But I'm just
> guessing
> here.
>
> I've tried kmemleak, but it only found a few kB of suspected memory
> leaks (several of which disappeared again after a while).
>
> Below I've included more details - git bisect logs, ethtool -i,
> dmesg,
> Kernel .config, and various memory related /proc files. Any help or
> suggestions would be much appreciated, and please let me know if
> more
> information is needed or there's something I should try.
>
> Regards,
> Anders K. Pedersen
>
> Hi Anders,
>
> I think I see the problem and should have a patch submitted shortly
> to
> address it. From what I can tell it looks like the issue is that we
> weren't properly recycling the pages associated with descriptors that
> contained an Rx programming status. For now the workaround would be
> to
> try disabling ATR via the "ethtool --set-priv-flags" command. I
> should
> have a patch out in the next hour or so that you can try testing to
> verify if it addresses the issue.
>
> Thanks.
>
> - Alex
>
> Thanks Alex,
>
> I will test the patch in our next service window on Tuesday morning.
>
> Regards,
> Anders
>
>
>

^ permalink raw reply

* Re: [PATCH] fix typo in skbuff.c
From: David Miller @ 2017-10-15  1:24 UTC (permalink / raw)
  To: march511; +Cc: netdev, linux-kernel
In-Reply-To: <20171014165136.2041-1-march511@gmail.com>

From: Wenhua Shi <march511@gmail.com>
Date: Sat, 14 Oct 2017 18:51:36 +0200

> ---
>  net/core/skbuff.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

^ permalink raw reply

* Re: [PATCH] atm: fore200e: mark expected switch fall-throughs
From: David Miller @ 2017-10-15  1:25 UTC (permalink / raw)
  To: garsilva; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel
In-Reply-To: <20171012211132.GA6589@embeddedor.com>

From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Date: Thu, 12 Oct 2017 16:11:32 -0500

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Applied to net-next

^ permalink raw reply

* Re: [PATCH net-next v3 0/5] net: dsa: remove .set_addr
From: David Miller @ 2017-10-15  1:30 UTC (permalink / raw)
  To: vivien.didelot
  Cc: netdev, linux-kernel, kernel, f.fainelli, andrew, David.Laight
In-Reply-To: <20171013181809.14627-1-vivien.didelot@savoirfairelinux.com>

From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Fri, 13 Oct 2017 14:18:04 -0400

> An Ethernet switch may support having a MAC address, which can be used
> as the switch's source address in transmitted full-duplex Pause frames.
> 
> If a DSA switch supports the related .set_addr operation, the DSA core
> sets the master's MAC address on the switch.
> 
> This won't make sense anymore in a multi-CPU ports system, because there
> won't be a unique master device assigned to a switch tree.
> 
> Moreover this operation is confusing because it makes the user think
> that it could be used to program the switch with the MAC address of the
> CPU/management port such that MAC address learning can be disabled on
> said port, but in fact, that's not how it is currently used.
> 
> To fix this, assign a random MAC address at setup time in the mv88e6060
> and mv88e6xxx drivers before removing .set_addr completely from DSA.
> 
> Changes in v3:
>   - include fix for mv88e6060 switch MAC address setter.
> 
> Changes in v2:
>   - remove .set_addr implementation from drivers and use a random MAC.

Series applied,thanks Vivien.

^ permalink raw reply

* Re: [PATCH] nfp: Explicitly include linux/bug.h
From: David Miller @ 2017-10-15  1:31 UTC (permalink / raw)
  To: broonie; +Cc: jakub.kicinski, simon.horman, oss-drivers, netdev
In-Reply-To: <20171013025035.4450-1-broonie@kernel.org>

From: Mark Brown <broonie@kernel.org>
Date: Fri, 13 Oct 2017 03:50:35 +0100

> Today's -next build encountered an error due to a missing definition of
> WARN_ON(), caused by some header reorganization removing an implicit
> inclusion of linux/bug.h.  Fix this with an explicit inclusion.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Applied, thanks Mark.

^ permalink raw reply

* Re: [PATCH net-next v2 0/8] cxgb4: add support to get hardware debug logs via ethtool
From: David Miller @ 2017-10-15  1:35 UTC (permalink / raw)
  To: rahul.lakkireddy; +Cc: netdev, ganeshgr, nirranjan, indranil
In-Reply-To: <cover.1507899723.git.rahul.lakkireddy@chelsio.com>

From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Fri, 13 Oct 2017 18:48:12 +0530

> This series of patches add support to collect hardware debug logs
> via ethtool --get-dump facility.

Series applied, thank you.

^ permalink raw reply

* Re: pull-request: mac80211-next 2017-10-13
From: David Miller @ 2017-10-15  1:37 UTC (permalink / raw)
  To: johannes; +Cc: netdev, linux-wireless
In-Reply-To: <20171013155332.4310-1-johannes@sipsolutions.net>

From: Johannes Berg <johannes@sipsolutions.net>
Date: Fri, 13 Oct 2017 17:53:31 +0200

> Sorry for the quick succession - there were a few issues with
> the last pull request that only got noticed now, so I'm fixing
> those here.
> 
> Please pull and let me know if there's any problem.

No worries, pulled, thanks Johannes.

^ permalink raw reply

* Re: [PATCH][net-next] cxgb4: fix missing break in switch and indent return statements
From: David Miller @ 2017-10-15  1:38 UTC (permalink / raw)
  To: colin.king; +Cc: ganeshgr, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20171013162900.16911-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Fri, 13 Oct 2017 17:29:00 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> The break statement for the Macronix case is missing and will
> fall through to the Winbond case and re-assign the size setting.
> Fix this by adding the missing break statement.  Also correctly
> indent the return statements.
> 
> Detected by CoverityScan, CID#1458020 ("Missing break in switch")
> 
> Fixes: 96ac18f14a5a ("cxgb4: Add support for new flash parts")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] l2tp: check ps->sock before running pppol2tp_session_ioctl()
From: David Miller @ 2017-10-15  1:39 UTC (permalink / raw)
  To: g.nault; +Cc: netdev, jchapman, tparkin
In-Reply-To: <520e39809f7ca7d8b38282e3a6bf0bbf93219541.1507915312.git.g.nault@alphalink.fr>

From: Guillaume Nault <g.nault@alphalink.fr>
Date: Fri, 13 Oct 2017 19:22:35 +0200

> When pppol2tp_session_ioctl() is called by pppol2tp_tunnel_ioctl(),
> the session may be unconnected. That is, it was created by
> pppol2tp_session_create() and hasn't been connected with
> pppol2tp_connect(). In this case, ps->sock is NULL, so we need to check
> for this case in order to avoid dereferencing a NULL pointer.
> 
> Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP")
> Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH net-next,0/3] Add init of send table and var renames
From: David Miller @ 2017-10-15  1:43 UTC (permalink / raw)
  To: haiyangz, haiyangz; +Cc: netdev, kys, sthemmin, olaf, vkuznets, linux-kernel
In-Reply-To: <20171013192805.18183-1-haiyangz@exchange.microsoft.com>

From: Haiyang Zhang <haiyangz@exchange.microsoft.com>
Date: Fri, 13 Oct 2017 12:28:02 -0700

> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> Add initialization of send indirection table. Otherwise it may contain
> old info of previous device with different number of channels.
> 
> Also, did some variable renaming for easier reading.

Series applied, thank you.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox