* Re: [PATCH spi for-5.4 0/5] Deterministic SPI latency with NXP DSPI driver
From: Richard Cochran @ 2019-08-23 5:22 UTC (permalink / raw)
To: Vladimir Oltean
Cc: Mark Brown, Hubert Feurstein, Miroslav Lichvar, Andrew Lunn,
Florian Fainelli, linux-spi, netdev
In-Reply-To: <CA+h21hrELeUKbfGD3n=BL741QN9m3SaoJJ0y+q_uthdxvSFVRg@mail.gmail.com>
On Thu, Aug 22, 2019 at 07:13:12PM +0300, Vladimir Oltean wrote:
> You do think that I understand the problem? But I don't!
;^)
> > And who generates Local_sync_resp?
> >
>
> Local_sync_resp is the same as Local_sync_req except maybe with a
> custom tag added by the switch. Irrelevant as long as the DSA master
> can timestamp it.
So this is point why it won't work. The time stamping logic in the
switch only recognizes PTP frames.
Thanks,
Richard
^ permalink raw reply
* Re: [PATCH] iwlwifi: mvm: fix old-style declaration
From: Luciano Coelho @ 2019-08-23 5:17 UTC (permalink / raw)
To: YueHaibing, johannes.berg, emmanuel.grumbach, linuxwifi, kvalo,
sara.sharon
Cc: linux-kernel, netdev, linux-wireless
In-Reply-To: <20190726141838.19424-1-yuehaibing@huawei.com>
On Fri, 2019-07-26 at 22:18 +0800, YueHaibing wrote:
> There expect the 'static' keyword to come first in a
> declaration, and we get a warning for this with "make W=1":
>
> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:427:1: warning:
> 'static' is not at beginning of declaration [-Wold-style-declaration]
> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:434:1: warning:
> 'static' is not at beginning of declaration [-Wold-style-declaration]
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
Thanks! Johannes applied this in our internal tree a few weeks ago and
it will reach the mainline following our usual upstreaming process.
--
Cheers,
Luca.
^ permalink raw reply
* Re: [PATCH net-next 07/10] iwlwifi: Use dev_get_drvdata where possible
From: Luciano Coelho @ 2019-08-23 5:09 UTC (permalink / raw)
To: Chuhong Yuan
Cc: Johannes Berg, Emmanuel Grumbach, Intel Linux Wireless,
Kalle Valo, David S . Miller, linux-wireless, netdev,
linux-kernel
In-Reply-To: <20190724112738.13457-1-hslester96@gmail.com>
On Wed, 2019-07-24 at 19:27 +0800, Chuhong Yuan wrote:
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
>
> Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
> ---
This patch is not relevant anymore because we have removed all
D0i3/runtime PM code.
Thanks anyway!
--
Cheers,
Luca.
^ permalink raw reply
* Re: [PATCH net-next,v5, 0/6] Add software backchannel and mlx5e HV VHCA stats
From: Eran Ben Elisha @ 2019-08-23 5:05 UTC (permalink / raw)
To: haiyangz, David Miller
Cc: sashal@kernel.org, Saeed Mahameed, leon@kernel.org,
lorenzo.pieralisi@arm.com, bhelgaas@google.com,
linux-pci@vger.kernel.org, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, kys, Stephen Hemminger,
linux-kernel@vger.kernel.org
In-Reply-To: <DM6PR21MB133778F0890449A5D58DD9D5CAA50@DM6PR21MB1337.namprd21.prod.outlook.com>
On 8/23/2019 1:43 AM, Haiyang Zhang wrote:
>
>
>> -----Original Message-----
>> From: David Miller <davem@davemloft.net>
>> Sent: Thursday, August 22, 2019 3:39 PM
>> To: Haiyang Zhang <haiyangz@microsoft.com>
>> Cc: sashal@kernel.org; saeedm@mellanox.com; leon@kernel.org;
>> eranbe@mellanox.com; lorenzo.pieralisi@arm.com; bhelgaas@google.com;
>> linux-pci@vger.kernel.org; linux-hyperv@vger.kernel.org;
>> netdev@vger.kernel.org; KY Srinivasan <kys@microsoft.com>; Stephen
>> Hemminger <sthemmin@microsoft.com>; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH net-next,v5, 0/6] Add software backchannel and mlx5e
>> HV VHCA stats
>>
>> From: Haiyang Zhang <haiyangz@microsoft.com>
>> Date: Thu, 22 Aug 2019 22:37:13 +0000
>>
>>> The v5 is pretty much the same as v4, except Eran had a fix to patch #3 in
>> response to
>>> Leon Romanovsky <leon@kernel.org>.
>>
>> Well you now have to send me a patch relative to v4 in order to fix that.
>>
>> When I say "applied", the series is in my tree and is therefore permanent.
>> It is therefore never appropriate to then post a new version of the series.
>
> Thanks.
>
> Eran, could you submit another patch for the fix to patch #3?
Sure, will prepare and send later today.
>
> - Haiyang
>
^ permalink raw reply
* Re: [PATCH 1/2] rtnetlink: gate MAC address with an LSM hook
From: kbuild test robot @ 2019-08-23 4:24 UTC (permalink / raw)
To: Jeff Vander Stoep
Cc: kbuild-all, netdev, linux-security-module, selinux,
Jeff Vander Stoep
In-Reply-To: <20190821134547.96929-1-jeffv@google.com>
[-- Attachment #1: Type: text/plain, Size: 13961 bytes --]
Hi Jeff,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc5 next-20190822]
[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/Jeff-Vander-Stoep/rtnetlink-gate-MAC-address-with-an-LSM-hook/20190823-071253
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)
include/linux/w1.h:272: warning: Function parameter or member 'of_match_table' not described in 'w1_family'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'quotactl' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'quota_on' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'sb_free_mnt_opts' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'sb_eat_lsm_opts' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'sb_kern_mount' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'sb_show_options' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'sb_add_mnt_opt' not described in 'security_list_options'
>> include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'netlink_receive' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'd_instantiate' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: warning: Function parameter or member 'getprocattr' not described in 'security_list_options'
include/linux/lsm_hooks.h:1818: 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/i2c.h:337: warning: Function parameter or member 'init_irq' not described in 'i2c_client'
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/spi/spi.h:190: warning: Function parameter or member 'driver_override' not described in 'spi_device'
drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found
drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found
drivers/usb/typec/class.c:1: warning: 'typec_altmode_register_notifier' not found
drivers/usb/typec/class.c:1: warning: 'typec_altmode_unregister_notifier' 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/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'
include/net/mac80211.h:2006: warning: Function parameter or member 'txpwr' not described in 'ieee80211_sta'
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'
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'
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'
vim +1818 include/linux/lsm_hooks.h
3c4ed7bdf5997d Casey Schaufler 2015-05-02 @1818
:::::: The code at line 1818 was first introduced by commit
:::::: 3c4ed7bdf5997d8020cbb8d4abbef2fcfb9f1284 LSM: Split security.h
:::::: TO: Casey Schaufler <casey@schaufler-ca.com>
:::::: CC: James Morris <james.l.morris@oracle.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: 7282 bytes --]
^ permalink raw reply
* [PATCH v2] bonding: force enable lacp port after link state recovery for 802.3ad
From: zhangsha.zhang @ 2019-08-23 3:42 UTC (permalink / raw)
To: j.vosburgh, vfalico, andy, davem
Cc: netdev, linux-kernel, zhangsha.zhang, yuehaibing, hunongda,
alex.chen
From: Sha Zhang <zhangsha.zhang@huawei.com>
After the commit 334031219a84 ("bonding/802.3ad: fix slave link
initialization transition states") merged,
the slave's link status will be changed to BOND_LINK_FAIL
from BOND_LINK_DOWN in the following scenario:
- Driver reports loss of carrier and
bonding driver receives NETDEV_DOWN notifier
- slave's duplex and speed is zerod and
its port->is_enabled is cleard to 'false';
- Driver reports link recovery and
bonding driver receives NETDEV_UP notifier;
- If speed/duplex getting failed here, the link status
will be changed to BOND_LINK_FAIL;
- The MII monotor later recover the slave's speed/duplex
and set link status to BOND_LINK_UP, but remains
the 'port->is_enabled' to 'false'.
In this scenario, the lacp port will not be enabled even its speed
and duplex are valid. The bond will not send LACPDU's, and its
state is 'AD_STATE_DEFAULTED' forever. The simplest fix I think
is to call bond_3ad_handle_link_change() in bond_miimon_commit,
this function can enable lacp after port slave speed check.
As enabled, the lacp port can run its state machine normally
after link recovery.
Signed-off-by: Sha Zhang <zhangsha.zhang@huawei.com>
---
drivers/net/bonding/bond_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 931d9d9..ef4ec99 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2206,7 +2206,7 @@ static void bond_miimon_commit(struct bonding *bond)
*/
if (BOND_MODE(bond) == BOND_MODE_8023AD &&
slave->link == BOND_LINK_UP)
- bond_3ad_adapter_speed_duplex_changed(slave);
+ bond_3ad_handle_link_change(slave, BOND_LINK_UP);
continue;
case BOND_LINK_UP:
--
1.8.3.1
^ permalink raw reply related
* Re: BUG: bnxt_en driver fails to initialize
From: Michael Chan @ 2019-08-23 3:22 UTC (permalink / raw)
To: Jonathan Lemon; +Cc: Netdev, Kernel Team
In-Reply-To: <E350D230-9E45-41FC-ADF5-5CF2317171DA@gmail.com>
On Thu, Aug 22, 2019 at 8:03 PM Jonathan Lemon <jonathan.lemon@gmail.com> wrote:
>
> On a recent net-next 932630fa902878f4c8c50d0b1260eeb9de16b0a4,
> installing the build on a box which has a Broadcom card with
> the 20.1 firmware, the driver refuses to initialize. I tracked
> this down to:
>
> static int bnxt_alloc_stats(struct bnxt *bp)
> ...
> cpr->hw_stats = dma_alloc_coherent(&pdev->dev, size,
> &cpr->hw_stats_map,
> GFP_KERNEL);
> if (!cpr->hw_stats)
> return -ENOMEM;
>
> Where size == 0, so obviously it returns NULL, and -ENOMEM.
Thanks for the report. I will send a patch to fix this later tonight.
>
> The same build, when installed on different box with the
> 20.6.167.0 firmware, works fine. Details below.
>
>
^ permalink raw reply
* Re: [PATCH v3] tun: fix use-after-free when register netdev failed
From: Jason Wang @ 2019-08-23 3:05 UTC (permalink / raw)
To: Yang Yingliang
Cc: David Miller, netdev, eric dumazet, xiyou wangcong, weiyongjun1
In-Reply-To: <5D5E90C3.50306@huawei.com>
----- Original Message -----
>
>
> On 2019/8/22 14:07, Yang Yingliang wrote:
> >
> >
> > On 2019/8/22 10:13, Jason Wang wrote:
> >>
> >> On 2019/8/20 上午10:28, Jason Wang wrote:
> >>>
> >>> On 2019/8/20 上午9:25, David Miller wrote:
> >>>> From: Yang Yingliang <yangyingliang@huawei.com>
> >>>> Date: Mon, 19 Aug 2019 21:31:19 +0800
> >>>>
> >>>>> Call tun_attach() after register_netdevice() to make sure tfile->tun
> >>>>> is not published until the netdevice is registered. So the read/write
> >>>>> thread can not use the tun pointer that may freed by free_netdev().
> >>>>> (The tun and dev pointer are allocated by alloc_netdev_mqs(), they
> >>>>> can
> >>>>> be freed by netdev_freemem().)
> >>>> register_netdevice() must always be the last operation in the order of
> >>>> network device setup.
> >>>>
> >>>> At the point register_netdevice() is called, the device is visible
> >>>> globally
> >>>> and therefore all of it's software state must be fully initialized and
> >>>> ready for us.
> >>>>
> >>>> You're going to have to find another solution to these problems.
> >>>
> >>>
> >>> The device is loosely coupled with sockets/queues. Each side is
> >>> allowed to be go away without caring the other side. So in this
> >>> case, there's a small window that network stack think the device has
> >>> one queue but actually not, the code can then safely drop them.
> >>> Maybe it's ok here with some comments?
> >>>
> >>> Or if not, we can try to hold the device before tun_attach and drop
> >>> it after register_netdevice().
> >>
> >>
> >> Hi Yang:
> >>
> >> I think maybe we can try to hold refcnt instead of playing real num
> >> queues here. Do you want to post a V4?
> > I think the refcnt can prevent freeing the memory in this case.
> > When register_netdevice() failed, free_netdev() will be called directly,
> > dev->pcpu_refcnt and dev are freed without checking refcnt of dev.
> How about using patch-v1 that using a flag to check whether the device
> registered successfully.
>
As I said, it lacks sufficient locks or barriers. To be clear, I meant
something like (compile-test only):
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index db16d7a13e00..e52678f9f049 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -2828,6 +2828,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
(ifr->ifr_flags & TUN_FEATURES);
INIT_LIST_HEAD(&tun->disabled);
+ dev_hold(dev);
err = tun_attach(tun, file, false, ifr->ifr_flags & IFF_NAPI,
ifr->ifr_flags & IFF_NAPI_FRAGS);
if (err < 0)
@@ -2836,6 +2837,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
err = register_netdevice(tun->dev);
if (err < 0)
goto err_detach;
+ dev_put(dev);
}
netif_carrier_on(tun->dev);
@@ -2852,11 +2854,13 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
return 0;
err_detach:
+ dev_put(dev);
tun_detach_all(dev);
/* register_netdevice() already called tun_free_netdev() */
goto err_free_dev;
err_free_flow:
+ dev_put(dev);
tun_flow_uninit(tun);
security_tun_dev_free_security(tun->security);
err_free_stat:
What's your thought?
Thanks
^ permalink raw reply related
* BUG: bnxt_en driver fails to initialize
From: Jonathan Lemon @ 2019-08-23 3:03 UTC (permalink / raw)
To: Netdev, michael.chan; +Cc: kernel-team
On a recent net-next 932630fa902878f4c8c50d0b1260eeb9de16b0a4,
installing the build on a box which has a Broadcom card with
the 20.1 firmware, the driver refuses to initialize. I tracked
this down to:
static int bnxt_alloc_stats(struct bnxt *bp)
...
cpr->hw_stats = dma_alloc_coherent(&pdev->dev, size,
&cpr->hw_stats_map,
GFP_KERNEL);
if (!cpr->hw_stats)
return -ENOMEM;
Where size == 0, so obviously it returns NULL, and -ENOMEM.
The same build, when installed on different box with the
20.6.167.0 firmware, works fine. Details below.
Taken from the same box with a 4.16 kernel, showing firmware:
# ethtool -i eth0
driver: bnxt_en
version: 1.9.0
firmware-version: 20.1.20.0
expansion-rom-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: yes
supports-register-dump: no
supports-priv-flags: no
The problematic box:
[ 0.000000] Linux version 5.3.0-rc5-00987-g12a993533ad1
(bsd@devvm1828.vll1.facebook.com) (gcc version 4.8.5 20150623 (Red Hat
4.8.5-36) (GCC)) #7 SMP Thu Aug 22 19:48:01 PDT 2019
[ 11.195653] Broadcom NetXtreme-C/E driver bnxt_en v1.10.0
[ 11.262489] b:00.0 (unnamed net_device) (uninitialized): Firmware
does not support TC flower offload.
[ 11.283546] bnxt_en 0000:03:00.0 eth0: Firmware does not support NVM
params
[ 11.297448] bnxt_en 0000:03:00.0 eth0: Broadcom BCM57302 NetXtreme-C
10Gb/25Gb Ethernet found at mem 383fffe10000, node addr
00:0a:f7:a3:d8:94
[ 11.322965] bnxt_en 0000:03:00.0: 63.008 Gb/s available PCIe
bandwidth (8 GT/s x8 link)
[ 12.136319] WARNING: CPU: 5 PID: 1 at ../mm/page_alloc.c:4707
__alloc_pages_nodemask+0x27c/0x330
[ 12.155239] Modules linked in:
[ 12.155242] CPU: 5 PID: 1 Comm: swapper/0 Not tainted
5.3.0-rc5-00987-g12a993533ad1 #7
[ 12.155243] Hardware name: Quanta Leopard ORv2-DDR4/Leopard
ORv2-DDR4, BIOS F06_3B17 03/16/2018
[ 12.155245] RIP: 0010:__alloc_pages_nodemask+0x27c/0x330
[ 12.239793] Code: 48 83 c3 18 44 89 e9 44 89 e2 48 89 ee e8 5c b9 bb
00 4c 8b 0b 4d 85 c9 75 df 48 89 e8 e9 42 ff ff ff 81 e7 00 20 00 00 75
02 <0f> 0b 31 c0 e9 31 ff ff ff 48 89 e8 e9 29 ff ff ff 89 c2 90 e9 f0
[ 12.277249] RSP: 0000:ffffc9000c4dfc08 EFLAGS: 00010246
[ 12.287667] RAX: 0000000000000000 RBX: 0000000000000cc0 RCX:
0000000000000000
[ 12.301897] RDX: 0000000000000000 RSI: 0000000000000034 RDI:
0000000000000000
[ 12.316127] RBP: 0000000000000000 R08: 0000000000000000 R09:
0000000000000000
[ 12.330358] R10: ffff888000000000 R11: 00000000ffdd4f00 R12:
0000000000000034
[ 12.344587] R13: 0000160000000000 R14: ffffffffffffffff R15:
ffff889ff71ad0b0
[ 12.358819] FS: 0000000000000000(0000) GS:ffff889fff540000(0000)
knlGS:0000000000000000
[ 12.374957] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 12.386413] CR2: 0000000000000000 CR3: 000000000240a001 CR4:
00000000003606e0
[ 12.400643] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 12.414875] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400
[ 12.429107] Call Trace:
[ 12.433981] __dma_direct_alloc_pages+0x89/0x120
[ 12.443200] dma_direct_alloc_pages+0x1c/0xa0
[ 12.451902] bnxt_alloc_mem+0x32e/0xe20
[ 12.459566] ? bnxt_need_reserve_rings+0x30/0x120
[ 12.468957] __bnxt_open_nic+0x8c/0x880
[ 12.476601] bnxt_open+0x34/0xb0
[ 12.483032] __dev_open+0xd1/0x160
[ 12.489807] dev_open+0x43/0x90
[ 12.496070] netpoll_setup+0x26d/0x330
[ 12.503558] init_netconsole+0x145/0x276
[ 12.511390] ? option_setup+0x1f/0x1f
[ 12.518705] do_one_initcall+0x4e/0x1f4
[ 12.526351] ? trace_event_define_fields_initcall_finish+0x62/0x62
[ 12.538690] kernel_init_freeable+0x182/0x224
[ 12.547376] ? trace_event_define_fields_initcall_finish+0x62/0x62
[ 12.559716] ? rest_init+0xb0/0xb0
[ 12.566491] kernel_init+0xa/0x110
[ 12.573269] ret_from_fork+0x35/0x40
[ 12.580392] ---[ end trace e4d68dee87999a79 ]---
[ 12.589614] bnxt_en 0000:03:00.0 eth0: bnxt_alloc_mem err: fffffff4
^ permalink raw reply
* Re: [PATCH ipsec-next 1/7] net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram
From: kbuild test robot @ 2019-08-23 2:39 UTC (permalink / raw)
To: Sabrina Dubroca
Cc: kbuild-all, netdev, Herbert Xu, Steffen Klassert, Sabrina Dubroca
In-Reply-To: <46946935e3faf51447443c9504d56c5eba49bef2.1566395202.git.sd@queasysnail.net>
[-- Attachment #1: Type: text/plain, Size: 30831 bytes --]
Hi Sabrina,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ipsec-next/master]
url: https://github.com/0day-ci/linux/commits/Sabrina-Dubroca/ipsec-add-TCP-encapsulation-support-RFC-8229/20190823-065431
base: https://kernel.googlesource.com/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
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 >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_start_hsa'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_start_hsa'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_end'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_end'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_end'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:183: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_read_lock'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Function parameter or member 'range' not described in 'amdgpu_mn_invalidate_range_start_hsa'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_start_hsa'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_start_hsa'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_start_hsa'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Function parameter or member 'range' not described in 'amdgpu_mn_invalidate_range_end'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_end'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_end'
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_end'
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:2812: warning: Function parameter or member 'pasid' not described in 'amdgpu_vm_make_compute'
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:375: warning: Excess function parameter 'entry' description in 'amdgpu_irq_dispatch'
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:376: warning: Function parameter or member 'ih' not described in 'amdgpu_irq_dispatch'
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:376: warning: Excess function parameter 'entry' description in 'amdgpu_irq_dispatch'
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:1: warning: no structured comments found
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:128: warning: Incorrect use of kernel-doc format: * @atomic_obj
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:210: warning: Function parameter or member 'atomic_obj' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:210: warning: Function parameter or member 'backlight_link' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:210: warning: Function parameter or member 'backlight_caps' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:210: warning: Function parameter or member 'freesync_module' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:210: warning: Function parameter or member 'fw_dmcu' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:210: warning: Function parameter or member 'dmcu_fw_version' not described in 'amdgpu_display_manager'
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1: warning: no structured comments 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:1004: warning: Function parameter or member 'prepare_writeback_job' not described in 'drm_connector_helper_funcs'
include/drm/drm_modeset_helper_vtables.h:1004: 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/scheduler/sched_main.c:419: warning: Function parameter or member 'full_recovery' not described in 'drm_sched_start'
drivers/gpu/drm/i915/i915_vma.h:50: warning: cannot understand function prototype: 'struct i915_vma '
drivers/gpu/drm/i915/i915_vma.h:1: warning: no structured comments found
drivers/gpu/drm/i915/intel_guc_fwif.h:536: warning: cannot understand function prototype: 'struct guc_log_buffer_state '
drivers/gpu/drm/i915/i915_trace.h:1: warning: no structured comments found
drivers/gpu/drm/i915/i915_reg.h:156: warning: bad line:
include/linux/interconnect.h:1: warning: no structured comments found
include/linux/skbuff.h:897: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'list' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'ip_defrag_offset' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'skb_mstamp_ns' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'head_frag' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'encapsulation' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'csum_valid' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member '__pkt_vlan_present_offset' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'vlan_present' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'csum_level' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff'
include/linux/skbuff.h:897: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff'
include/net/sock.h:238: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_portpair' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_cookie' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_listener' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common'
include/net/sock.h:238: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common'
include/net/sock.h:520: warning: Function parameter or member 'sk_rx_skb_cache' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'sk_wq_raw' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'sk_tx_skb_cache' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'sk_route_forced_caps' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'sk_txtime_report_errors' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'sk_validate_xmit_skb' not described in 'sock'
include/net/sock.h:520: warning: Function parameter or member 'sk_bpf_storage' not described in 'sock'
>> net/core/datagram.c:253: warning: Function parameter or member 'queue' not described in '__skb_try_recv_datagram'
include/linux/netdevice.h:2044: warning: Function parameter or member 'gso_partial_features' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'tlsdev_ops' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'name_assign_type' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'mpls_ptr' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'xdp_prog' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member '____cacheline_aligned_in_smp' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'qdisc_hash' not described in 'net_device'
include/linux/netdevice.h:2044: warning: Function parameter or member 'xps_cpus_map' not described in 'net_device'
include/linux/netdevice.h:2044: 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:593: warning: Function parameter or member 'config' not described in 'phylink_create'
drivers/net/phy/phylink.c:593: warning: Excess function parameter 'ndev' description in 'phylink_create'
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'
Documentation/admin-guide/mm/numaperf.rst:168: WARNING: Footnote [1] is not referenced.
Documentation/bpf/btf.rst:154: WARNING: Unexpected indentation.
Documentation/bpf/btf.rst:163: WARNING: Unexpected indentation.
lib/list_sort.c:162: WARNING: Unexpected indentation.
lib/list_sort.c:163: WARNING: Block quote ends without a blank line; unexpected unindent.
include/linux/xarray.h:232: WARNING: Unexpected indentation.
kernel/time/hrtimer.c:1120: WARNING: Block quote ends without a blank line; unexpected unindent.
kernel/signal.c:349: WARNING: Inline literal start-string without end-string.
include/uapi/linux/firewire-cdev.h:312: WARNING: Inline literal start-string without end-string.
Documentation/driver-api/gpio/driver.rst:419: WARNING: Unknown target name: "devm".
include/linux/i2c.h:511: WARNING: Inline strong start-string without end-string.
drivers/ata/libata-core.c:5944: WARNING: Unknown target name: "hw".
drivers/message/fusion/mptbase.c:5057: WARNING: Definition list ends without a blank line; unexpected unindent.
drivers/tty/serial/serial_core.c:1959: WARNING: Definition list ends without a blank line; unexpected unindent.
include/linux/regulator/driver.h:289: WARNING: Unknown target name: "regulator_regmap_x_voltage".
Documentation/driver-api/soundwire/locking.rst:50: WARNING: Inconsistent literal block quoting.
Documentation/driver-api/soundwire/locking.rst:51: WARNING: Line block ends without a blank line.
Documentation/driver-api/soundwire/locking.rst:55: WARNING: Inline substitution_reference start-string without end-string.
Documentation/driver-api/soundwire/locking.rst:56: WARNING: Line block ends without a blank line.
include/linux/spi/spi.h:380: WARNING: Unexpected indentation.
fs/posix_acl.c:636: WARNING: Inline emphasis start-string without end-string.
fs/debugfs/inode.c:385: WARNING: Inline literal start-string without end-string.
fs/debugfs/inode.c:464: WARNING: Inline literal start-string without end-string.
fs/debugfs/inode.c:496: WARNING: Inline literal start-string without end-string.
fs/debugfs/inode.c:583: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:394: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:400: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:439: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:445: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:484: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:490: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:530: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:536: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:578: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:584: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:845: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:851: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:898: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:904: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:1001: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:1001: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:1096: WARNING: Inline literal start-string without end-string.
fs/debugfs/file.c:1102: WARNING: Inline literal start-string without end-string.
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:2024: WARNING: Inline emphasis start-string without end-string.
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:2026: WARNING: Inline emphasis start-string without end-string.
Documentation/networking/af_xdp.rst:319: WARNING: Literal block expected; none found.
Documentation/networking/af_xdp.rst:326: WARNING: Literal block expected; none found.
Documentation/networking/device_drivers/freescale/dpaa2/dpio-driver.rst:43: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/networking/device_drivers/freescale/dpaa2/dpio-driver.rst:63: WARNING: Unexpected indentation.
Documentation/networking/dsa/sja1105.rst:91: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/networking/dsa/sja1105.rst:91: WARNING: Block quote ends without a blank line; unexpected unindent.
include/linux/netdevice.h:3486: WARNING: Inline emphasis start-string without end-string.
include/linux/netdevice.h:3486: WARNING: Inline emphasis start-string without end-string.
net/core/dev.c:4994: WARNING: Unknown target name: "page_is".
Documentation/security/keys/core.rst:1597: WARNING: Inline literal start-string without end-string.
Documentation/security/keys/core.rst:1597: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1597: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1598: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1598: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1600: WARNING: Inline literal start-string without end-string.
Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1600: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1666: WARNING: Inline literal start-string without end-string.
Documentation/security/keys/core.rst:1666: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1666: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/core.rst:1666: WARNING: Inline emphasis start-string without end-string.
Documentation/security/keys/trusted-encrypted.rst:112: WARNING: Literal block expected; none found.
Documentation/security/keys/trusted-encrypted.rst:121: WARNING: Unexpected indentation.
Documentation/security/keys/trusted-encrypted.rst:122: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/security/keys/trusted-encrypted.rst:123: WARNING: Block quote ends without a blank line; unexpected unindent.
vim +253 net/core/datagram.c
65101aeca52241 Paolo Abeni 2017-05-16 209
^1da177e4c3f41 Linus Torvalds 2005-04-16 210 /**
ea3793ee29d362 Rainer Weikusat 2015-12-06 211 * __skb_try_recv_datagram - Receive a datagram skbuff
4dc3b16ba18c0f Pavel Pisa 2005-05-01 212 * @sk: socket
d3f6cd9e6018db stephen hemminger 2017-07-12 213 * @flags: MSG\_ flags
7c13f97ffde63c Paolo Abeni 2016-11-04 214 * @destructor: invoked under the receive lock on successful dequeue
3f518bf745cbd6 Pavel Emelyanov 2012-02-21 215 * @off: an offset in bytes to peek skb from. Returns an offset
3f518bf745cbd6 Pavel Emelyanov 2012-02-21 216 * within an skb where data actually starts
4dc3b16ba18c0f Pavel Pisa 2005-05-01 217 * @err: error code returned
ea3793ee29d362 Rainer Weikusat 2015-12-06 218 * @last: set to last peeked message to inform the wait function
ea3793ee29d362 Rainer Weikusat 2015-12-06 219 * what to look for when peeking
^1da177e4c3f41 Linus Torvalds 2005-04-16 220 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 221 * Get a datagram skbuff, understands the peeking, nonblocking wakeups
^1da177e4c3f41 Linus Torvalds 2005-04-16 222 * and possible races. This replaces identical code in packet, raw and
^1da177e4c3f41 Linus Torvalds 2005-04-16 223 * udp, as well as the IPX AX.25 and Appletalk. It also finally fixes
^1da177e4c3f41 Linus Torvalds 2005-04-16 224 * the long standing peek and read race for datagram sockets. If you
^1da177e4c3f41 Linus Torvalds 2005-04-16 225 * alter this routine remember it must be re-entrant.
^1da177e4c3f41 Linus Torvalds 2005-04-16 226 *
ea3793ee29d362 Rainer Weikusat 2015-12-06 227 * This function will lock the socket if a skb is returned, so
ea3793ee29d362 Rainer Weikusat 2015-12-06 228 * the caller needs to unlock the socket in that case (usually by
d651983dde41a8 Mauro Carvalho Chehab 2017-05-12 229 * calling skb_free_datagram). Returns NULL with @err set to
ea3793ee29d362 Rainer Weikusat 2015-12-06 230 * -EAGAIN if no data was available or to some other value if an
ea3793ee29d362 Rainer Weikusat 2015-12-06 231 * error was detected.
^1da177e4c3f41 Linus Torvalds 2005-04-16 232 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 233 * * It does not lock socket since today. This function is
^1da177e4c3f41 Linus Torvalds 2005-04-16 234 * * free of race conditions. This measure should/can improve
^1da177e4c3f41 Linus Torvalds 2005-04-16 235 * * significantly datagram socket latencies at high loads,
^1da177e4c3f41 Linus Torvalds 2005-04-16 236 * * when data copying to user space takes lots of time.
^1da177e4c3f41 Linus Torvalds 2005-04-16 237 * * (BTW I've just killed the last cli() in IP/IPv6/core/netlink/packet
^1da177e4c3f41 Linus Torvalds 2005-04-16 238 * * 8) Great win.)
^1da177e4c3f41 Linus Torvalds 2005-04-16 239 * * --ANK (980729)
^1da177e4c3f41 Linus Torvalds 2005-04-16 240 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 241 * The order of the tests when we find no data waiting are specified
^1da177e4c3f41 Linus Torvalds 2005-04-16 242 * quite explicitly by POSIX 1003.1g, don't change them without having
^1da177e4c3f41 Linus Torvalds 2005-04-16 243 * the standard around please.
^1da177e4c3f41 Linus Torvalds 2005-04-16 244 */
ccefe503d27b45 Sabrina Dubroca 2019-08-21 245 struct sk_buff *__skb_try_recv_datagram(struct sock *sk,
ccefe503d27b45 Sabrina Dubroca 2019-08-21 246 struct sk_buff_head *queue,
ccefe503d27b45 Sabrina Dubroca 2019-08-21 247 unsigned int flags,
7c13f97ffde63c Paolo Abeni 2016-11-04 248 void (*destructor)(struct sock *sk,
7c13f97ffde63c Paolo Abeni 2016-11-04 249 struct sk_buff *skb),
fd69c399c7d626 Paolo Abeni 2019-04-08 250 int *off, int *err,
ea3793ee29d362 Rainer Weikusat 2015-12-06 251 struct sk_buff **last)
^1da177e4c3f41 Linus Torvalds 2005-04-16 252 {
ea3793ee29d362 Rainer Weikusat 2015-12-06 @253 struct sk_buff *skb;
738ac1ebb96d02 Herbert Xu 2015-07-13 254 unsigned long cpu_flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 255 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 256 * Caller is allowed not to check sk->sk_err before skb_recv_datagram()
^1da177e4c3f41 Linus Torvalds 2005-04-16 257 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 258 int error = sock_error(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 259
^1da177e4c3f41 Linus Torvalds 2005-04-16 260 if (error)
^1da177e4c3f41 Linus Torvalds 2005-04-16 261 goto no_packet;
^1da177e4c3f41 Linus Torvalds 2005-04-16 262
^1da177e4c3f41 Linus Torvalds 2005-04-16 263 do {
^1da177e4c3f41 Linus Torvalds 2005-04-16 264 /* Again only user level code calls this function, so nothing
^1da177e4c3f41 Linus Torvalds 2005-04-16 265 * interrupt level will suddenly eat the receive_queue.
^1da177e4c3f41 Linus Torvalds 2005-04-16 266 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 267 * Look at current nfs client by the way...
8917a3c0b7d155 David Shwatrz 2010-12-02 268 * However, this function was correct in any case. 8)
^1da177e4c3f41 Linus Torvalds 2005-04-16 269 */
4934b0329f7150 Pavel Emelyanov 2012-02-21 270 spin_lock_irqsave(&queue->lock, cpu_flags);
65101aeca52241 Paolo Abeni 2017-05-16 271 skb = __skb_try_recv_from_queue(sk, queue, flags, destructor,
fd69c399c7d626 Paolo Abeni 2019-04-08 272 off, &error, last);
3f518bf745cbd6 Pavel Emelyanov 2012-02-21 273 spin_unlock_irqrestore(&queue->lock, cpu_flags);
de321ed3847125 Andrey Vagin 2017-05-17 274 if (error)
de321ed3847125 Andrey Vagin 2017-05-17 275 goto no_packet;
65101aeca52241 Paolo Abeni 2017-05-16 276 if (skb)
^1da177e4c3f41 Linus Torvalds 2005-04-16 277 return skb;
2b5cd0dfa38424 Alexander Duyck 2017-03-24 278
2b5cd0dfa38424 Alexander Duyck 2017-03-24 279 if (!sk_can_busy_loop(sk))
2b5cd0dfa38424 Alexander Duyck 2017-03-24 280 break;
2b5cd0dfa38424 Alexander Duyck 2017-03-24 281
2b5cd0dfa38424 Alexander Duyck 2017-03-24 282 sk_busy_loop(sk, flags & MSG_DONTWAIT);
ccefe503d27b45 Sabrina Dubroca 2019-08-21 283 } while (queue->prev != *last);
a5b50476f77a8f Eliezer Tamir 2013-06-10 284
^1da177e4c3f41 Linus Torvalds 2005-04-16 285 error = -EAGAIN;
^1da177e4c3f41 Linus Torvalds 2005-04-16 286
^1da177e4c3f41 Linus Torvalds 2005-04-16 287 no_packet:
^1da177e4c3f41 Linus Torvalds 2005-04-16 288 *err = error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 289 return NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 290 }
ea3793ee29d362 Rainer Weikusat 2015-12-06 291 EXPORT_SYMBOL(__skb_try_recv_datagram);
ea3793ee29d362 Rainer Weikusat 2015-12-06 292
:::::: The code at line 253 was first introduced by commit
:::::: ea3793ee29d3621faf857fa8ef5425e9ff9a756d core: enable more fine-grained datagram reception control
:::::: TO: Rainer Weikusat <rweikusat@mobileactivedefense.com>
:::::: CC: David S. Miller <davem@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: 7243 bytes --]
^ permalink raw reply
* linux-next: manual merge of the net-next tree with the pci tree
From: Stephen Rothwell @ 2019-08-23 2:35 UTC (permalink / raw)
To: David Miller, Networking, Bjorn Helgaas
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Randy Dunlap,
Haiyang Zhang, Saeed Mahameed, Lorenzo Pieralisi
[-- Attachment #1: Type: text/plain, Size: 2216 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got conflicts in:
drivers/pci/Kconfig
drivers/pci/controller/pci-hyperv.c
between commit:
f58ba5e3f686 ("PCI: pci-hyperv: Fix build errors on non-SYSFS config")
44b1ece783ff ("PCI: hv: Detect and fix Hyper-V PCI domain number collision")
from the pci tree and commit:
348dd93e40c1 ("PCI: hv: Add a Hyper-V PCI interface driver for software backchannel interface")
from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/pci/Kconfig
index 232042722261,c313de96a357..000000000000
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@@ -181,7 -181,8 +181,8 @@@ config PCI_LABE
config PCI_HYPERV
tristate "Hyper-V PCI Frontend"
- depends on X86 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN && X86_64
+ depends on X86_64 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN && SYSFS
+ select PCI_HYPERV_INTERFACE
help
The PCI device frontend driver allows the kernel to import arbitrary
PCI devices from a PCI backend to support PCI driver domains.
diff --cc drivers/pci/controller/pci-hyperv.c
index 3a56de6b2ec2,9c93ac2215b7..000000000000
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@@ -2810,9 -3050,11 +3113,14 @@@ static void __exit exit_hv_pci_drv(void
static int __init init_hv_pci_drv(void)
{
+ /* Set the invalid domain number's bit, so it will not be used */
+ set_bit(HVPCI_DOM_INVALID, hvpci_dom_map);
+
+ /* Initialize PCI block r/w interface */
+ hvpci_block_ops.read_block = hv_read_config_block;
+ hvpci_block_ops.write_block = hv_write_config_block;
+ hvpci_block_ops.reg_blk_invalidate = hv_register_block_invalidate;
+
return vmbus_driver_register(&hv_pci_drv);
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH net-next] net/ncsi: update response packet length for GCPS/GNS/GNPTS commands
From: David Miller @ 2019-08-23 2:28 UTC (permalink / raw)
To: benwei; +Cc: sam, netdev, linux-kernel, openbmc
In-Reply-To: <CH2PR15MB3686567EBCBE71B41C5F079AA3AA0@CH2PR15MB3686.namprd15.prod.outlook.com>
From: Ben Wei <benwei@fb.com>
Date: Wed, 21 Aug 2019 22:08:49 +0000
> Update response packet length for the following commands per NC-SI spec
> - Get Controller Packet Statistics
> - Get NC-SI Statistics
> - Get NC-SI Pass-through Statistics command
>
> Signed-off-by: Ben Wei <benwei@fb.com>
Applied, thanks Ben.
^ permalink raw reply
* Re: [PATCH] net/ncsi: Fix the payload copying for the request coming from Netlink
From: David Miller @ 2019-08-23 2:27 UTC (permalink / raw)
To: Justin.Lee1; +Cc: netdev, openbmc, linux-kernel, sam
In-Reply-To: <a94e5fa397a64ae3a676ec11ea09aaba@AUSX13MPS302.AMER.DELL.COM>
From: <Justin.Lee1@Dell.com>
Date: Wed, 21 Aug 2019 21:24:52 +0000
> The request coming from Netlink should use the OEM generic handler.
>
> The standard command handler expects payload in bytes/words/dwords
> but the actual payload is stored in data if the request is coming from Netlink.
>
> Signed-off-by: Justin Lee <justin.lee1@dell.com>
Applied, thank you.
^ permalink raw reply
* Re: [PATCH 2/2] selinux: use netlink_receive hook
From: kbuild test robot @ 2019-08-23 1:54 UTC (permalink / raw)
To: Jeff Vander Stoep
Cc: kbuild-all, netdev, linux-security-module, selinux,
Jeff Vander Stoep
In-Reply-To: <20190821134616.97894-1-jeffv@google.com>
[-- Attachment #1: Type: text/plain, Size: 3307 bytes --]
Hi Jeff,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc5 next-20190822]
[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/Jeff-Vander-Stoep/rtnetlink-gate-MAC-address-with-an-LSM-hook/20190823-071253
config: s390-debug_defconfig (attached as .config)
compiler: s390-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
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/sched.h:12:0,
from include/linux/tracehook.h:46,
from security/selinux/hooks.c:27:
security/selinux/hooks.c: In function 'selinux_netlink_receive':
>> arch/s390/include/asm/current.h:17:17: error: passing argument 1 of 'sock_has_perm' from incompatible pointer type [-Werror=incompatible-pointer-types]
#define current ((struct task_struct *const)S390_lowcore.current_task)
^
security/selinux/hooks.c:5830:23: note: in expansion of macro 'current'
return sock_has_perm(current, sk, NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
^~~~~~~
security/selinux/hooks.c:4422:12: note: expected 'struct sock *' but argument is of type 'struct task_struct *'
static int sock_has_perm(struct sock *sk, u32 perms)
^~~~~~~~~~~~~
security/selinux/hooks.c:5830:32: warning: passing argument 2 of 'sock_has_perm' makes integer from pointer without a cast [-Wint-conversion]
return sock_has_perm(current, sk, NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
^~
security/selinux/hooks.c:4422:12: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct sock *'
static int sock_has_perm(struct sock *sk, u32 perms)
^~~~~~~~~~~~~
security/selinux/hooks.c:5830:9: error: too many arguments to function 'sock_has_perm'
return sock_has_perm(current, sk, NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
^~~~~~~~~~~~~
security/selinux/hooks.c:4422:12: note: declared here
static int sock_has_perm(struct sock *sk, u32 perms)
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/sock_has_perm +17 arch/s390/include/asm/current.h
^1da177e4c3f41 include/asm-s390/current.h Linus Torvalds 2005-04-16 16
^1da177e4c3f41 include/asm-s390/current.h Linus Torvalds 2005-04-16 @17 #define current ((struct task_struct *const)S390_lowcore.current_task)
^1da177e4c3f41 include/asm-s390/current.h Linus Torvalds 2005-04-16 18
:::::: The code at line 17 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: 20136 bytes --]
^ permalink raw reply
* Re: [PATCH 2/2] selinux: use netlink_receive hook
From: kbuild test robot @ 2019-08-23 1:44 UTC (permalink / raw)
To: Jeff Vander Stoep
Cc: kbuild-all, netdev, linux-security-module, selinux,
Jeff Vander Stoep
In-Reply-To: <20190821134616.97894-1-jeffv@google.com>
[-- Attachment #1: Type: text/plain, Size: 3117 bytes --]
Hi Jeff,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc5 next-20190822]
[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/Jeff-Vander-Stoep/rtnetlink-gate-MAC-address-with-an-LSM-hook/20190823-071253
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/sched.h:12:0,
from include/linux/tracehook.h:46,
from security/selinux/hooks.c:27:
security/selinux/hooks.c: In function 'selinux_netlink_receive':
>> arch/x86/include/asm/current.h:18:17: error: passing argument 1 of 'sock_has_perm' from incompatible pointer type [-Werror=incompatible-pointer-types]
#define current get_current()
^
>> security/selinux/hooks.c:5830:23: note: in expansion of macro 'current'
return sock_has_perm(current, sk, NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
^~~~~~~
security/selinux/hooks.c:4422:12: note: expected 'struct sock *' but argument is of type 'struct task_struct *'
static int sock_has_perm(struct sock *sk, u32 perms)
^~~~~~~~~~~~~
>> security/selinux/hooks.c:5830:32: warning: passing argument 2 of 'sock_has_perm' makes integer from pointer without a cast [-Wint-conversion]
return sock_has_perm(current, sk, NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
^~
security/selinux/hooks.c:4422:12: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct sock *'
static int sock_has_perm(struct sock *sk, u32 perms)
^~~~~~~~~~~~~
>> security/selinux/hooks.c:5830:9: error: too many arguments to function 'sock_has_perm'
return sock_has_perm(current, sk, NETLINK_ROUTE_SOCKET__NLMSG_READPRIV);
^~~~~~~~~~~~~
security/selinux/hooks.c:4422:12: note: declared here
static int sock_has_perm(struct sock *sk, u32 perms)
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/sock_has_perm +18 arch/x86/include/asm/current.h
f0766440dda7ac include/asm-x86/current.h Christoph Lameter 2008-05-09 17
c6f5e0acd5d12e arch/x86/include/asm/current.h Brian Gerst 2009-01-19 @18 #define current get_current()
f0766440dda7ac include/asm-x86/current.h Christoph Lameter 2008-05-09 19
:::::: The code at line 18 was first introduced by commit
:::::: c6f5e0acd5d12ee23f701f15889872e67b47caa6 x86-64: Move current task from PDA to per-cpu and consolidate with 32-bit.
:::::: TO: Brian Gerst <brgerst@gmail.com>
:::::: CC: Tejun Heo <tj@kernel.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: 28074 bytes --]
^ permalink raw reply
* Re: [PATCH net-next 07/10] net: dsa: mv88e6xxx: rename port cmode macro
From: Andrew Lunn @ 2019-08-23 1:41 UTC (permalink / raw)
To: Marek Behún
Cc: netdev, Vivien Didelot, Florian Fainelli, Vladimir Oltean
In-Reply-To: <20190821232724.1544-8-marek.behun@nic.cz>
On Thu, Aug 22, 2019 at 01:27:21AM +0200, Marek Behún wrote:
> This is a cosmetic update. We are removing the last underscore from
> macros MV88E6XXX_PORT_STS_CMODE_100BASE_X and
> MV88E6XXX_PORT_STS_CMODE_1000BASE_X. The 2500base-x version does not
> have that underscore. Also PHY_INTERFACE_MODE_ macros do not have it
> there.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH net-next 06/10] net: dsa: mv88e6xxx: add serdes_get_lane method for Topaz family
From: Andrew Lunn @ 2019-08-23 1:40 UTC (permalink / raw)
To: Marek Behún
Cc: netdev, Vivien Didelot, Florian Fainelli, Vladimir Oltean
In-Reply-To: <20190821232724.1544-7-marek.behun@nic.cz>
On Thu, Aug 22, 2019 at 01:27:20AM +0200, Marek Behún wrote:
> The Topaz family has only one SERDES, on port 5, with address 0x15.
> Currently we have MV88E6341_ADDR_SERDES macro used in the
> mv88e6341_serdes_power method. Rename the macro to MV88E6341_PORT5_LANE
> and use the new mv88e6xxx_serdes_get_lane method in
> mv88e6341_serdes_power.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [PATCH net-next 05/10] net: dsa: mv88e6xxx: create chip->info->ops->serdes_get_lane method
From: Andrew Lunn @ 2019-08-23 1:39 UTC (permalink / raw)
To: Marek Behún
Cc: netdev, Vivien Didelot, Florian Fainelli, Vladimir Oltean
In-Reply-To: <20190821232724.1544-6-marek.behun@nic.cz>
On Thu, Aug 22, 2019 at 01:27:19AM +0200, Marek Behún wrote:
> Create a serdes_get_lane() method in the mv88e6xxx operations structure.
> Use it instead of calling the different implementations.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply
* Re: [net-next 4/8] net/mlx5e: Add device out of buffer counter
From: Jakub Kicinski @ 2019-08-23 1:33 UTC (permalink / raw)
To: Saeed Mahameed; +Cc: David S. Miller, netdev@vger.kernel.org, Moshe Shemesh
In-Reply-To: <20190822233514.31252-5-saeedm@mellanox.com>
On Thu, 22 Aug 2019 23:35:52 +0000, Saeed Mahameed wrote:
> From: Moshe Shemesh <moshe@mellanox.com>
>
> Added the following packets drop counter:
> Device out of buffer - counts packets which were dropped due to full
> device internal receive queue.
> This counter will be shown on ethtool as a new counter called
> dev_out_of_buffer.
> The counter is read from FW by command QUERY_VNIC_ENV.
>
> Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Sounds like rx_fifo_errors, no? Doesn't rx_fifo_errors count RX
overruns?
^ permalink raw reply
* [PATCH] [PATCH v3] sock: fix potential memory leak in proto_register()
From: zhanglin @ 2019-08-23 1:14 UTC (permalink / raw)
To: davem
Cc: ast, daniel, kafai, songliubraving, yhs, willemb, edumazet,
deepa.kernel, arnd, dh.herrmann, gnault, netdev, linux-kernel,
bpf, xue.zhihong, wang.yi59, jiang.xuexin, zhanglin
If protocols registered exceeded PROTO_INUSE_NR, prot will be
added to proto_list, but no available bit left for prot in
proto_inuse_idx.
Changes since v2:
* Propagate the error code properly
Signed-off-by: zhanglin <zhang.lin16@zte.com.cn>
---
net/core/sock.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index bc3512f230a3..f39163071384 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3139,16 +3139,17 @@ static __init int net_inuse_init(void)
core_initcall(net_inuse_init);
-static void assign_proto_idx(struct proto *prot)
+static int assign_proto_idx(struct proto *prot)
{
prot->inuse_idx = find_first_zero_bit(proto_inuse_idx, PROTO_INUSE_NR);
if (unlikely(prot->inuse_idx == PROTO_INUSE_NR - 1)) {
pr_err("PROTO_INUSE_NR exhausted\n");
- return;
+ return -ENOSPC;
}
set_bit(prot->inuse_idx, proto_inuse_idx);
+ return 0;
}
static void release_proto_idx(struct proto *prot)
@@ -3157,8 +3158,9 @@ static void release_proto_idx(struct proto *prot)
clear_bit(prot->inuse_idx, proto_inuse_idx);
}
#else
-static inline void assign_proto_idx(struct proto *prot)
+static inline int assign_proto_idx(struct proto *prot)
{
+ return 0;
}
static inline void release_proto_idx(struct proto *prot)
@@ -3207,6 +3209,8 @@ static int req_prot_init(const struct proto *prot)
int proto_register(struct proto *prot, int alloc_slab)
{
+ int ret = -ENOBUFS;
+
if (alloc_slab) {
prot->slab = kmem_cache_create_usercopy(prot->name,
prot->obj_size, 0,
@@ -3243,20 +3247,27 @@ int proto_register(struct proto *prot, int alloc_slab)
}
mutex_lock(&proto_list_mutex);
+ ret = assign_proto_idx(prot);
+ if (ret) {
+ mutex_unlock(&proto_list_mutex);
+ goto out_free_timewait_sock_slab_name;
+ }
list_add(&prot->node, &proto_list);
- assign_proto_idx(prot);
mutex_unlock(&proto_list_mutex);
- return 0;
+ return ret;
out_free_timewait_sock_slab_name:
- kfree(prot->twsk_prot->twsk_slab_name);
+ if (alloc_slab && prot->twsk_prot)
+ kfree(prot->twsk_prot->twsk_slab_name);
out_free_request_sock_slab:
- req_prot_cleanup(prot->rsk_prot);
+ if (alloc_slab) {
+ req_prot_cleanup(prot->rsk_prot);
- kmem_cache_destroy(prot->slab);
- prot->slab = NULL;
+ kmem_cache_destroy(prot->slab);
+ prot->slab = NULL;
+ }
out:
- return -ENOBUFS;
+ return ret;
}
EXPORT_SYMBOL(proto_register);
--
2.17.1
^ permalink raw reply related
* Re: [PATCH net-next v2 0/3] net: dsa: mt7530: Convert to PHYLINK and add support for port 5
From: Andrew Lunn @ 2019-08-23 1:09 UTC (permalink / raw)
To: David Miller
Cc: opensource, sean.wang, vivien.didelot, f.fainelli, matthias.bgg,
netdev, linux-arm-kernel, linux-mediatek, john, linux-mips,
frank-w
In-Reply-To: <20190822.162047.1140525762795777800.davem@davemloft.net>
On Thu, Aug 22, 2019 at 04:20:47PM -0700, David Miller wrote:
> From: René van Dorst <opensource@vdorst.com>
> Date: Wed, 21 Aug 2019 16:45:44 +0200
>
> > 1. net: dsa: mt7530: Convert to PHYLINK API
> > This patch converts mt7530 to PHYLINK API.
> > 2. dt-bindings: net: dsa: mt7530: Add support for port 5
> > 3. net: dsa: mt7530: Add support for port 5
> > These 2 patches adding support for port 5 of the switch.
> >
> > v1->v2:
> > * Mostly phylink improvements after review.
> > rfc -> v1:
> > * Mostly phylink improvements after review.
> > * Drop phy isolation patches. Adds no value for now.
>
> This definitely needs some review before I'll apply it.
That would be Russell.
We should try to improve MAINTAINER so that Russell King gets picked
by the get_maintainer script.
Andrew
^ permalink raw reply
* [PATCH] ncsi-netlink: support sending NC-SI commands over Netlink interface
From: Ben Wei @ 2019-08-23 0:02 UTC (permalink / raw)
To: sam@mendozajonas.com, davem@davemloft.net, netdev@vger.kernel.org,
openbmc@lists.ozlabs.org, Justin.Lee1@Dell.com
Cc: Ben Wei
This patch extends ncsi-netlink command line utility to send NC-SI command to kernel driver
via NCSI_CMD_SEND_CMD command.
New command line option -o (opcode) is used to specify NC-SI command and optional payload.
For example, to send "Get Parameter" command
ncsi-netlink -l 2 -c 0 -p0 -o 0x17
To configure AEN
ncsi-netlink -l 2 -c 0 -p0 -o 8 0 0 0 0 0 0 0 7
Signed-off-by: Ben Wei <benwei@fb.com>
---
ncsi-netlink.c | 162 +++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 157 insertions(+), 5 deletions(-)
diff --git a/ncsi-netlink.c b/ncsi-netlink.c index c46ae76..a06e30e 100644
--- a/ncsi-netlink.c
+++ b/ncsi-netlink.c
@@ -11,10 +11,22 @@
#include <linux/ncsi.h>
//#include "ncsi.h"
+struct ncsi_pkt_hdr {
+ unsigned char mc_id; /* Management controller ID */
+ unsigned char revision; /* NCSI version - 0x01 */
+ unsigned char reserved; /* Reserved */
+ unsigned char id; /* Packet sequence number */
+ unsigned char type; /* Packet type */
+ unsigned char channel; /* Network controller ID */
+ __be16 length; /* Payload length */
+ __be32 reserved1[2]; /* Reserved */
+};
+
struct ncsi_msg {
struct nl_sock *sk;
struct nl_msg *msg;
struct nlmsghdr *hdr;
+ int ret;
};
static void free_ncsi_msg(struct ncsi_msg *msg) @@ -69,6 +81,7 @@ int setup_ncsi_message(struct ncsi_msg *msg, int cmd, int flags)
rc = -1;
goto out;
}
+ msg->ret = 1;
return 0;
out:
@@ -308,10 +321,132 @@ out:
return rc;
}
+static int send_cb(struct nl_msg *msg, void *arg) { #define
+ETHERNET_HEADER_SIZE 16
+
+ struct nlmsghdr *hdr = nlmsg_hdr(msg);
+ struct nlattr *tb[NCSI_ATTR_MAX + 1] = {0};
+ int rc, data_len, i;
+ char *data;
+ int *ret = arg;
+
+ static struct nla_policy ncsi_genl_policy[NCSI_ATTR_MAX + 1] = {
+ [NCSI_ATTR_IFINDEX] = { .type = NLA_U32 },
+ [NCSI_ATTR_PACKAGE_LIST] = { .type = NLA_NESTED },
+ [NCSI_ATTR_PACKAGE_ID] = { .type = NLA_U32 },
+ [NCSI_ATTR_CHANNEL_ID] = { .type = NLA_U32 },
+ [NCSI_ATTR_DATA] = { .type = NLA_BINARY },
+ [NCSI_ATTR_MULTI_FLAG] = { .type = NLA_FLAG },
+ [NCSI_ATTR_PACKAGE_MASK] = { .type = NLA_U32 },
+ [NCSI_ATTR_CHANNEL_MASK] = { .type = NLA_U32 },
+ };
+
+
+ rc = genlmsg_parse(hdr, 0, tb, NCSI_ATTR_MAX, ncsi_genl_policy);
+ if (rc) {
+ fprintf(stderr, "Failed to parse ncsi cmd callback\n");
+ return rc;
+ }
+
+ data_len = nla_len(tb[NCSI_ATTR_DATA]) - ETHERNET_HEADER_SIZE;
+ data = nla_data(tb[NCSI_ATTR_DATA]) + ETHERNET_HEADER_SIZE;
+
+
+ printf("NC-SI Response Payload length = %d\n", data_len);
+ printf("Response Payload:\n");
+ for (i = 0; i < data_len; ++i) {
+ if (i && !(i%4))
+ printf("\n%d: ", 16+i);
+ printf("0x%02x ", *(data+i));
+ }
+ printf("\n");
+
+ // indicating call back has been completed
+ *ret = 0;
+ return 0;
+}
+
+static int run_command_send(int ifindex, int package, int channel,
+ uint8_t type, short payload_len, uint8_t *payload) {
+ struct ncsi_msg msg;
+ struct ncsi_pkt_hdr *hdr;
+ int rc;
+ uint8_t *pData, *pCtrlPktPayload;
+
+ // allocate a contiguous buffer space to hold ncsi message
+ // (header + Control Packet payload)
+ pData = calloc(1, sizeof(struct ncsi_pkt_hdr) + payload_len);
+ if (!pData) {
+ fprintf(stderr, "Failed to allocate buffer for ctrl pkt, %m\n");
+ goto out;
+ }
+ // prepare buffer to be copied to netlink msg
+ hdr = (void *)pData;
+ pCtrlPktPayload = pData + sizeof(struct ncsi_pkt_hdr);
+ memcpy(pCtrlPktPayload, payload, payload_len);
+
+ rc = setup_ncsi_message(&msg, NCSI_CMD_SEND_CMD, 0);
+ if (rc)
+ return -1;
+
+ printf("send cmd, ifindex %d, package %d, channel %d, type 0x%x\n",
+ ifindex, package, channel, type);
+
+ rc = nla_put_u32(msg.msg, NCSI_ATTR_IFINDEX, ifindex);
+ if (rc) {
+ fprintf(stderr, "Failed to add ifindex, %m\n");
+ goto out;
+ }
+
+ if (package >= 0) {
+ rc = nla_put_u32(msg.msg, NCSI_ATTR_PACKAGE_ID, package);
+ if (rc) {
+ fprintf(stderr, "Failed to add package id, %m\n");
+ goto out;
+ }
+ }
+
+ rc = nla_put_u32(msg.msg, NCSI_ATTR_CHANNEL_ID, channel);
+ if (rc)
+ fprintf(stderr, "Failed to add channel, %m\n");
+
+ hdr->type = type; // NC-SI command
+ hdr->length = htons(payload_len); // NC-SI command payload length
+ rc = nla_put(msg.msg, NCSI_ATTR_DATA,
+ sizeof(struct ncsi_pkt_hdr)+payload_len,
+ (void *)pData);
+ if (rc)
+ fprintf(stderr, "Failed to add netlink header, %m\n");
+
+ nl_socket_disable_seq_check(msg.sk);
+ rc = nl_socket_modify_cb(msg.sk, NL_CB_VALID, NL_CB_CUSTOM, send_cb,
+ &(msg.ret));
+
+ rc = nl_send_auto(msg.sk, msg.msg);
+ if (rc < 0) {
+ fprintf(stderr, "Failed to send message, %m\n");
+ goto out;
+ }
+
+ while (msg.ret == 1) {
+ rc = nl_recvmsgs_default(msg.sk);
+ if (rc) {
+ fprintf(stderr, "Failed to rcv msg, rc=%d %m\n", rc);
+ goto out;
+ }
+ }
+
+out:
+ free_ncsi_msg(&msg);
+ return rc;
+}
+
void usage(void)
{
printf( "ncsi-netlink: Send messages to the NCSI driver via Netlink\n"
- "ncsi-netlink [-h] operation [-p PACKAGE] [-c CHANNEL] [-l IFINDEX]\n"
+ "ncsi-netlink [-h] operation [-p PACKAGE] [-c CHANNEL] [-l IFINDEX] [-o cmd [payload]]\n"
"\t--ifindex index Specify the interface index\n"
"\t--package package Package number\n"
"\t--channel channel Channel number (aka. port number)\n"
@@ -326,7 +461,9 @@ void usage(void)
int main(int argc, char *argv[])
{
int rc, operation = -1;
- int package, channel, ifindex;
+ int package, channel, ifindex, opcode;
+ uint8_t payload[2048] = {0};
+ short payload_length = 0, i = 0;
static const struct option long_opts[] = {
{"channel", required_argument, NULL, 'c'},
@@ -336,12 +473,12 @@ int main(int argc, char *argv[])
{"package", required_argument, NULL, 'p'},
{"set", no_argument, NULL, 's'},
{"clear", no_argument, NULL, 'x'},
+ {"cmd", required_argument, NULL, 'o'},
{ NULL, 0, NULL, 0},
};
- static const char short_opts[] = "c:hil:p:sx";
-
- package = channel = ifindex = -1;
+ static const char short_opts[] = "c:hil:p:sxo:";
+ package = channel = ifindex = opcode = -1;
while (true) {
int c = getopt_long(argc, argv, short_opts, long_opts, NULL);
@@ -350,6 +487,17 @@ int main(int argc, char *argv[])
errno = 0;
switch (c) {
+ case 'o':
+ opcode = strtoul(optarg, NULL, 0);
+ if (errno) {
+ fprintf(stderr, "Couldn't parse opcode, %m\n");
+ return -1;
+ }
+ operation = NCSI_CMD_SEND_CMD;
+ payload_length = argc - optind;
+ for (i = 0; i < payload_length; ++i)
+ payload[i] = (int)strtoul(argv[i + optind], NULL, 0);
+ break;
case 'c':
channel = strtoul(optarg, NULL, 0);
if (errno) {
@@ -408,6 +556,10 @@ int main(int argc, char *argv[])
case NCSI_CMD_CLEAR_INTERFACE:
rc = run_command_clear(ifindex);
break;
+ case NCSI_CMD_SEND_CMD:
+ rc = run_command_send(ifindex, package, channel,
+ opcode, payload_length, payload);
+ break;
default:
usage();
return -1;
--
2.17.1
^ permalink raw reply
* Re: [PATCH net-next 6/6] net: dsa: clear VLAN flags for CPU port
From: Vladimir Oltean @ 2019-08-22 23:51 UTC (permalink / raw)
To: Vivien Didelot, netdev; +Cc: davem, f.fainelli, andrew
In-Reply-To: <20190822201323.1292-7-vivien.didelot@gmail.com>
On 8/22/19 11:13 PM, Vivien Didelot wrote:
> When the bridge offloads a VLAN on a slave port, we also need to
> program its dedicated CPU port as a member of the VLAN.
>
> Drivers may handle the CPU port's membership as they want. For example,
> Marvell as a special "Unmodified" mode to pass frames as is through
> such ports.
>
> Even though DSA expects the drivers to handle the CPU port membership,
> they are unlikely to program such VLANs untagged, and certainly not as
> PVID. This patch clears the VLAN flags before programming the CPU port.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> ---
> net/dsa/slave.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/net/dsa/slave.c b/net/dsa/slave.c
> index 8267c156a51a..48df48f76c67 100644
> --- a/net/dsa/slave.c
> +++ b/net/dsa/slave.c
> @@ -332,6 +332,12 @@ static int dsa_slave_vlan_add(struct net_device *dev,
> if (err)
> return err;
>
> + /* We need the dedicated CPU port to be a member of the VLAN as well.
> + * Even though drivers often handle CPU membership in special ways,
> + * CPU ports are likely to be tagged, so clear the VLAN flags.
> + */
> + vlan.flags = 0;
> +
How does this work exactly?
If I run 'sudo bridge vlan add vid 1 dev swp4 pvid untagged', then the
CPU port starts sending VLAN-tagged traffic. I see this in tcpdump on
the DSA master port, but if I tcpdump on swp4, the VLAN tag is removed.
Who is doing that?
> err = dsa_port_vlan_add(dp->cpu_dp, &vlan, trans);
> if (err)
> return err;
>
^ permalink raw reply
* Re: [PATCH net-next 2/6] net: dsa: do not skip -EOPNOTSUPP in dsa_port_vid_add
From: Vladimir Oltean @ 2019-08-22 23:44 UTC (permalink / raw)
To: Vivien Didelot; +Cc: netdev, David S. Miller, Florian Fainelli, Andrew Lunn
In-Reply-To: <20190822194304.GB30912@t480s.localdomain>
On Fri, 23 Aug 2019 at 02:43, Vivien Didelot <vivien.didelot@gmail.com> wrote:
>
> Hi Vladimir,
>
> On Fri, 23 Aug 2019 01:06:58 +0300, Vladimir Oltean <olteanv@gmail.com> wrote:
> > Hi Vivien,
> >
> > On 8/22/19 11:13 PM, Vivien Didelot wrote:
> > > Currently dsa_port_vid_add returns 0 if the switch returns -EOPNOTSUPP.
> > >
> > > This function is used in the tag_8021q.c code to offload the PVID of
> > > ports, which would simply not work if .port_vlan_add is not supported
> > > by the underlying switch.
> > >
> > > Do not skip -EOPNOTSUPP in dsa_port_vid_add but only when necessary,
> > > that is to say in dsa_slave_vlan_rx_add_vid.
> > >
> >
> > Do you know why Florian suppressed -EOPNOTSUPP in 061f6a505ac3 ("net:
> > dsa: Add ndo_vlan_rx_{add, kill}_vid implementation")?
> > I forced a return value of -EOPNOTSUPP here and when I create a VLAN
> > sub-interface nothing breaks, it just says:
> > RTNETLINK answers: Operation not supported
> > which IMO is expected.
>
> I do not know what you mean. This patch does not change the behavior of
> dsa_slave_vlan_rx_add_vid, which returns 0 if -EOPNOTSUPP is caught.
>
Yes, but what's wrong with just forwarding -EOPNOTSUPP?
>
> Thanks,
>
> Vivien
^ permalink raw reply
* Re: [PATCH net-next 2/6] net: dsa: do not skip -EOPNOTSUPP in dsa_port_vid_add
From: Vivien Didelot @ 2019-08-22 23:43 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: netdev, davem, f.fainelli, andrew
In-Reply-To: <f179fa10-3123-d055-1c67-0d24adf3cb08@gmail.com>
Hi Vladimir,
On Fri, 23 Aug 2019 01:06:58 +0300, Vladimir Oltean <olteanv@gmail.com> wrote:
> Hi Vivien,
>
> On 8/22/19 11:13 PM, Vivien Didelot wrote:
> > Currently dsa_port_vid_add returns 0 if the switch returns -EOPNOTSUPP.
> >
> > This function is used in the tag_8021q.c code to offload the PVID of
> > ports, which would simply not work if .port_vlan_add is not supported
> > by the underlying switch.
> >
> > Do not skip -EOPNOTSUPP in dsa_port_vid_add but only when necessary,
> > that is to say in dsa_slave_vlan_rx_add_vid.
> >
>
> Do you know why Florian suppressed -EOPNOTSUPP in 061f6a505ac3 ("net:
> dsa: Add ndo_vlan_rx_{add, kill}_vid implementation")?
> I forced a return value of -EOPNOTSUPP here and when I create a VLAN
> sub-interface nothing breaks, it just says:
> RTNETLINK answers: Operation not supported
> which IMO is expected.
I do not know what you mean. This patch does not change the behavior of
dsa_slave_vlan_rx_add_vid, which returns 0 if -EOPNOTSUPP is caught.
Thanks,
Vivien
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox