[PATCH v2 net-next 6/7] net: atlantic: remove check for boot code survivability before reset request

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov This patch removes unnecessary check for boot code survivability before reset request. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.c| 8 1 file changed, 8 deletions(-) diff --git a/d

[PATCH v2 net-next 7/7] net: atlantic: unify MAC generation

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov This patch unifies invalid MAC address handling with other drivers. Basically we've switched to using standard APIs (is_valid_ether_addr / eth_hw_addr_random) where possible. It's worth noting that some of engineering Aquantia NICs might be provisioned with a partially zer

[PATCH v2 net-next 5/7] net: atlantic: remove hw_atl_b0_hw_rss_set call from A2 code

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov No need to call hw_atl_b0_hw_rss_set from hw_atl2_hw_rss_set Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c| 4 ++-- .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.h| 9 - drive

[PATCH v2 net-next 2/7] net: atlantic: minor MACSec code cleanup

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov This patch fixes a couple of minor merge issues found in macsec_api.c after corresponding patch series has been applied. These are not real bugs, so pushing to net-next. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atla

[PATCH v2 net-next 4/7] net: atlantic: remove TPO2 check from A0 code

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov TPO2 was introduced in B0 only, no reason to check for it in A0 code. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 net-next 3/7] net: atlantic: rename AQ_NIC_RATE_2GS to AQ_NIC_RATE_2G5

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov This patch changes the constant name to a more logical "2G5" (for 2.5G speeds). Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/aq_common.h| 11 ++- .../net/ethernet/aquantia/atlantic/aq_ethtool.c | 2 +-

[PATCH v2 net-next 1/7] net: atlantic: use __packed instead of the full expansion.

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov This patches fixes the review comment made by Jakub Kicinski in the "net: atlantic: A2 support" patch series. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.h| 4 ++-- 1 file changed, 2 inser

[PATCH v2 net-next 0/7] net: atlantic: driver updates

2020-05-08 Thread Igor Russkikh
From: Mark Starovoytov This patch series contains several minor cleanups for the previously submitted series. We also add Marvell copyrights on newly touched files. v2: * accommodated review comments related to the last patch in series (MAC generation) v1: https://patchwork.ozlabs.org/cove

Re: linux-next boot error: WARNING: suspicious RCU usage in ipmr_get_table

2020-05-08 Thread Amol Grover
On Thu, May 07, 2020 at 06:26:01AM +1000, Stephen Rothwell wrote: > Hi all, > > On Thu, 7 May 2020 06:16:35 +1000 Stephen Rothwell > wrote: > > > > Hi Qian, > > > > On Tue, 28 Apr 2020 09:56:59 -0400 Qian Cai wrote: > > > > > > > On Apr 28, 2020, at 4:57 AM, Dmitry Vyukov wrote: > > > >

Re: [PATCH net v2 0/2] Fix 88x3310 leaving power save mode

2020-05-08 Thread Greg Kroah-Hartman
On Fri, May 08, 2020 at 10:38:16PM +0100, Russell King - ARM Linux admin wrote: > On Fri, May 08, 2020 at 11:32:39PM +0200, Matteo Croce wrote: > > On Wed, Apr 15, 2020 at 1:48 AM David Miller wrote: > > > > > > From: Russell King - ARM Linux admin > > > Date: Tue, 14 Apr 2020 20:47:53 +0100 > >

Re: [EXT] [PATCH 09/15] qed: use new module_firmware_crashed()

2020-05-08 Thread Igor Russkikh
> This makes use of the new module_firmware_crashed() to help > annotate when firmware for device drivers crash. When firmware > crashes devices can sometimes become unresponsive, and recovery > sometimes requires a driver unload / reload and in the worst cases > a reboot. > > Using a taint flag

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Markus Elfring
> While at it, rename a label in order to be slightly more informative and > split some too long lines. Would you like to add the tag “Fixes” to the change description? … > +++ b/drivers/net/ethernet/natsemi/macsonic.c > @@ -506,10 +506,14 @@ static int mac_sonic_platform_probe(struct > platfor

Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Yonghong Song
On 5/8/20 10:30 PM, Alexei Starovoitov wrote: On 5/8/20 9:18 PM, Yonghong Song wrote: On 5/8/20 12:44 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq

Re: [PATCH v2] netprio_cgroup: Fix unlimited memory leak of v2 cgroups

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 11:32:10 +0800 Zefan Li wrote: > If systemd is configured to use hybrid mode which enables the use of > both cgroup v1 and v2, systemd will create new cgroup on both the default > root (v2) and netprio_cgroup hierarchy (v1) for a new session and attach > task to the two cgroups.

Re: [PATCH net] net: ipv4: really enforce backoff for redirects

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:28:34 +0200 Paolo Abeni wrote: > In commit b406472b5ad7 ("net: ipv4: avoid mixed n_redirects and > rate_tokens usage") I missed the fact that a 0 'rate_tokens' will > bypass the backoff algorithm. > > Since rate_tokens is cleared after a redirect silence, and never > increme

Re: [PATCH net-next] net: ipa: Remove ipa_endpoint_stop{,_rx_dma} again

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 12:41:33 -0700 Nathan Chancellor wrote: > When building arm64 allyesconfig: > > drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_stop_rx_dma': > drivers/net/ipa/ipa_endpoint.c:1274:13: error: 'IPA_ENDPOINT_STOP_RX_SIZE' > undeclared (first use in this function) > driv

Re: [PATCH][V2] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 00:14:47 +0100 Colin King wrote: > From: Colin Ian King > > Currently the value for 'off' is computed using a multiplication and > a couple of statements later off is being incremented by len and > this value is never read. Clean up the code by removing the > multiplication a

Re: [PATCH] cnic: remove redundant assignment to variable ret

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 23:40:26 +0100 Colin King wrote: > From: Colin Ian King > > The variable ret is being assigned with a value that is never read, > the assignment is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Applied, thank you!

Re: [PATCH] net/atheros: remove redundant assignment to variable size

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 23:33:21 +0100 Colin King wrote: > From: Colin Ian King > > The variable size is being assigned with a value that is never read, > the assignment is redundant and cab be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Applied, thank you!

Re: [PATCH] net: lio_core: remove redundant assignment to variable tx_done

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 23:58:10 +0100 Colin King wrote: > From: Colin Ian King > > The variable tx_done is being assigned with a value that is never read > as the function returns a few statements later. The assignment is > redundant and can be removed. > > Addresses-Coverity: ("Unused value") > S

Re: [PATCH net-next 0/4] r8169: sync few functionalities with vendor driver

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 23:28:51 +0200 Heiner Kallweit wrote: > Add few helpers (with names copied from vendor drivers) to make clearer > what the respective code is doing. In addition improve reset preparation > for chips from RTL8168g. Applied, thank you!

Re: [PATCH net-next] ipv6: use DST_NOCOUNT in ip6_rt_pcpu_alloc()

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 07:34:14 -0700 Eric Dumazet wrote: > We currently have to adjust ipv6 route gc_thresh/max_size depending > on number of cpus on a server, this makes very little sense. > > If the kernels sets /proc/sys/net/ipv6/route/gc_thresh to 1024 > and /proc/sys/net/ipv6/route/max_size to

Re: [PATCH -next] net: dsa: sja1105: remove set but not used variable 'prev_time'

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 20:00:55 +0800 Samuel Zou wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/dsa/sja1105/sja1105_vl.c:468:6: warning: variable ‘prev_time’ set > but not used [-Wunused-but-set-variable] > u32 prev_time = 0; > ^ > > Reported-by: Hulk Robot

Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Alexei Starovoitov
On 5/8/20 9:18 PM, Yonghong Song wrote: On 5/8/20 12:44 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/t

Re: [PATCH net-next] net: dsa: vsc73xx: convert to devm_platform_ioremap_resource

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 10:11:14 + Wei Yongjun wrote: > Use the helper function that wraps the calls to platform_get_resource() > and devm_ioremap_resource() together. > > Signed-off-by: Wei Yongjun Applied, thank you!

Re: [PATCH bpf-next v3 18/21] tools/bpftool: add bpf_iter support for bptool

2020-05-08 Thread Yonghong Song
On 5/8/20 12:51 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Currently, only one command is supported bpftool iter pin It will pin the trace/iter bpf program in the object file to the where should be on a bpffs mount. For example, $ bpftool it

Re: [PATCH net-next] ieee802154: 6lowpan: remove unnecessary comparison

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 17:09:43 +0200 Stefan Schmidt wrote: >On 08.05.20 05:52, Yang Yingliang wrote: > > The type of dispatch is u8 which is always '<=' 0xff, so the > > dispatch <= 0xff is always true, we can remove this comparison. > > > > Reported-by: Hulk Robot > > Signed-off-by: Yang Yingliang

Re: [PATCH net-next] octeontx2-vf: Fix error return code in otx2vf_probe()

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 02:15:19 + Wei Yongjun wrote: > Fix to return negative error code -ENOMEM from the alloc failed error > handling case instead of 0, as done elsewhere in this function. > > Fixes: 3184fb5ba96e ("octeontx2-vf: Virtual function driver support") > Reported-by: Hulk Robot > Sign

[PATCH] document danger of '-j REJECT'ing of '-m state INVALID' packets

2020-05-08 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This appears to be a common, but hard to debug, misconfiguration. Signed-off-by: Maciej Żenczykowski --- extensions/libip6t_REJECT.man | 15 +++ extensions/libipt_REJECT.man | 15 +++ 2 files changed, 30 insertions(+) diff --git a/extensions/

Re: [PATCH net-next] net/dst: use a smaller percpu_counter batch for dst entries accounting

2020-05-08 Thread Jakub Kicinski
On Thu, 7 May 2020 18:58:10 -0700 Eric Dumazet wrote: > percpu_counter_add() uses a default batch size which is quite big > on platforms with 256 cpus. (2*256 -> 512) > > This means dst_entries_get_fast() can be off by +/- 2*(nr_cpus^2) > (131072 on servers with 256 cpus) > > Reduce the batch si

Re: [PATCH] cnic: remove redundant assignment to variable ret

2020-05-08 Thread Michael Chan
On Fri, May 8, 2020 at 3:40 PM Colin King wrote: > > From: Colin Ian King > > The variable ret is being assigned with a value that is never read, > the assignment is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Reviewed-by: Michael Chan

Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Michael Chan
On Fri, May 8, 2020 at 7:31 PM Joe Perches wrote: > > On Fri, 2020-05-08 at 18:48 -0700, Jakub Kicinski wrote: > > On Sat, 9 May 2020 00:31:03 +0100 Colin Ian King wrote: > > > > My preference would be for > > > > > > > > { > > > > int i; > > > > u32 off = 0; > > > > > > > > for (i = 0; i <

[PATCH] bpfilter: document build requirements for bpfilter_umh

2020-05-08 Thread Valdis Klētnieks
It's not intuitively obvious that bpfilter_umh is a statically linked binary. Mention the toolchain requirement in the Kconfig help, so people have an easier time figuring out what's needed. Signed-off-by: Valdis Kletnieks diff --git a/net/bpfilter/Kconfig b/net/bpfilter/Kconfig index fed9290e3b

[PATCH 12/15] ath10k: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

Re: linux-next 20200506 - build failure with net/bpfilter/bpfilter_umh

2020-05-08 Thread Valdis Klētnieks
On Sat, 09 May 2020 12:45:22 +0900, Masahiro Yamada said: > > LD [U] net/bpfilter/bpfilter_umh > > /usr/bin/ld: cannot find -lc > > collect2: error: ld returned 1 exit status > > make[2]: *** [scripts/Makefile.userprogs:36: net/bpfilter/bpfilter_umh] > > Error 1 > > make[1]: *** [scripts/Makef

[PATCH 00/15] net: taint when the device driver firmware crashes

2020-05-08 Thread Luis Chamberlain
Device driver firmware can crash, and sometimes, this can leave your system in a state which makes the device or subsystem completely useless. Detecting this by inspecting /proc/sys/kernel/tainted instead of scraping some magical words from the kernel log, which is driver specific, is much easier.

[PATCH 01/15] taint: add module firmware crash taint support

2020-05-08 Thread Luis Chamberlain
Device driver firmware can crash, and sometimes, this can leave your system in a state which makes the device or subsystem completely useless. Detecting this by inspecting /proc/sys/kernel/tainted instead of scraping some magical words from the kernel log, which is driver specific, is much easier.

[PATCH 10/15] soc: qcom: ipa: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 08/15] ehea: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 03/15] bnx2x: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 11/15] wimax/i2400m: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 07/15] cxgb4: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 09/15] qed: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 04/15] bnxt: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 06/15] liquidio: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 15/15] mwl8k: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 13/15] ath6kl: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 05/15] bna: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 14/15] brcm80211: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

[PATCH 02/15] ethernet/839: use new module_firmware_crashed()

2020-05-08 Thread Luis Chamberlain
This makes use of the new module_firmware_crashed() to help annotate when firmware for device drivers crash. When firmware crashes devices can sometimes become unresponsive, and recovery sometimes requires a driver unload / reload and in the worst cases a reboot. Using a taint flag allows us to an

Re: [PATCH bpf-next v3 13/21] bpf: add bpf_seq_printf and bpf_seq_write helpers

2020-05-08 Thread Yonghong Song
On 5/8/20 12:44 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Two helpers bpf_seq_printf and bpf_seq_write, are added for writing data to the seq_file buffer. bpf_seq_printf supports common format string flag/width/type fields so at least I can get identic

[PATCH net v2] hinic: fix a bug of ndo_stop

2020-05-08 Thread Luo bin
if some function in ndo_stop interface returns failure because of hardware fault, must go on excuting rest steps rather than return failure directly, otherwise will cause memory leak.And bump the timeout for SET_FUNC_STATE to ensure that cmd won't return failure when hw is busy. Otherwise hw may st

[PATCH net-next v2] hinic: add three net_device_ops of vf

2020-05-08 Thread Luo bin
adds ndo_set_vf_rate/ndo_set_vf_spoofchk/ndo_set_vf_link_state to configure netdev of virtual function Signed-off-by: Luo bin --- .../net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 29 ++ .../net/ethernet/huawei/hinic/hinic_hw_dev.c | 35 ++- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 21 +

Re: [PATCH v2] net: Protect INET_ADDR_COOKIE on 32-bit architectures

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 14:04:57 +0200 Stephen Kitt wrote: > Commit c7228317441f ("net: Use a more standard macro for > INET_ADDR_COOKIE") added a __deprecated marker to the cookie name on > 32-bit architectures, with the intent that the compiler would flag > uses of the name. However since commit 771c

Re: linux-next 20200506 - build failure with net/bpfilter/bpfilter_umh

2020-05-08 Thread Masahiro Yamada
On Fri, May 8, 2020 at 2:22 PM Valdis Klētnieks wrote: > > My kernel build came to a screeching halt with: > > CHECK net/bpfilter/bpfilter_kern.c > CC [M] net/bpfilter/bpfilter_kern.o > CC [U] net/bpfilter/main.o > LD [U] net/bpfilter/bpfilter_umh > /usr/bin/ld: cannot find -lc > coll

[PATCH v2] netprio_cgroup: Fix unlimited memory leak of v2 cgroups

2020-05-08 Thread Zefan Li
If systemd is configured to use hybrid mode which enables the use of both cgroup v1 and v2, systemd will create new cgroup on both the default root (v2) and netprio_cgroup hierarchy (v1) for a new session and attach task to the two cgroups. If the task does some network thing then the v2 cgroup can

[PATCH] netprio_cgroup: Fix unlimited memory leak of v2 cgroup

2020-05-08 Thread Zefan Li
If systemd is configured to use hybrid mode which enables the use of both cgroup v1 and v2, systemd will create new cgroup on both the default root (v2) and netprio_cgroup hierarchy (v1) for a new session and attach task to the two cgroups. If the task does some network thing then the v2 cgroup can

Re: [PATCH bpf-next v3 08/21] bpf: implement common macros/helpers for target iterators

2020-05-08 Thread Yonghong Song
On 5/8/20 12:07 PM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:40 PM Yonghong Song wrote: Macro DEFINE_BPF_ITER_FUNC is implemented so target can define an init function to capture the BTF type which represents the target. The bpf_iter_meta is a structure holding meta data, common to

Re: [PATCH net-next v1] hinic: add three net_device_ops of vf

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 10:56:55 +0800 luobin (L) wrote: > >> - if (!HINIC_IS_VF(nic_dev->hwdev->hwif)) > >> - /* Wait up to 3 sec between port enable to link state */ > >> - msleep(3000); > > Why is this no longer needed? > > ---When phsical port links up, hw will notify this event

Re: [RFC PATCH v3 12/14] perf metricgroup: order event groups by size

2020-05-08 Thread Andi Kleen
> > I'm not sure if size is that great an heuristic. The dedup algorithm should > > work in any case even if you don't order by size, right? > > Consider two metrics: > - metric 1 with events {A,B} > - metric 2 with events {A,B,C,D} > If the list isn't sorted then as the matching takes the first

Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Joe Perches
On Fri, 2020-05-08 at 18:48 -0700, Jakub Kicinski wrote: > On Sat, 9 May 2020 00:31:03 +0100 Colin Ian King wrote: > > > My preference would be for > > > > > > { > > > int i; > > > u32 off = 0; > > > > > > for (i = 0; i < TG3_SD_NUM_RECS; i++) { > > > tg3_ape_scratchpad_read(tp, (

Re: cgroup pointed by sock is leaked on mode switch

2020-05-08 Thread Yang Yingliang
On 2020/5/6 15:51, Zefan Li wrote: On 2020/5/6 10:16, Zefan Li wrote: On 2020/5/6 9:50, Yang Yingliang wrotee: +cc lize...@huawei.com On 2020/5/6 0:06, Tejun Heo wrote: Hello, Yang. On Sat, May 02, 2020 at 06:27:21PM +0800, Yang Yingliang wrote: I find the number nr_dying_descendants is i

Re: [PATCH net-next v3 21/33] virtio_net: add XDP frame size in two code paths

2020-05-08 Thread Jason Wang
On 2020/5/8 下午7:10, Jesper Dangaard Brouer wrote: The virtio_net driver is running inside the guest-OS. There are two XDP receive code-paths in virtio_net, namely receive_small() and receive_mergeable(). The receive_big() function does not support XDP. In receive_small() the frame size is avai

Re: [PATCH net-next v1] hinic: add three net_device_ops of vf

2020-05-08 Thread luobin (L)
Will fix. Thanks for your review. On 2020/5/9 5:36, Jakub Kicinski wrote: On Thu, 7 May 2020 18:21:19 + Luo bin wrote: + return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, +HINIC_COMM_CMD_HWCTXT_SET, +&hw_ioct

Re: [PATCH net v1] hinic: fix a bug of ndo_stop

2020-05-08 Thread luobin (L)
The two modified points are relevant. We bump the timeout for SET_FUNC_STATE to ensure that cmd won't return failure when hw is busy. Otherwise hw may stomp host memory if we free memory regardless of the return value of SET_FUNC_STATE. I will mention the timeout changes in the commit messa

Re: [PATCH] umh: fix memory leak on execve failure

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 00:14:22 +0200 Vincent Minet wrote: > If a UMH process created by fork_usermode_blob() fails to execute, > a pair of struct file allocated by umh_pipe_setup() will leak. > > Under normal conditions, the caller (like bpfilter) needs to manage the > lifetime of the UMH and its tw

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 11:57:44 +1000 (AEST) Finn Thain wrote: > On Fri, 8 May 2020, Jakub Kicinski wrote: > > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > > Only macsonic has been compile tested. I don't have the needed setup to > > > compile xtsonic > > > > Well, we gotta do

Re: pull-request: bpf 2020-05-09

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 01:05:27 +0200 Daniel Borkmann wrote: > Hi David, > > The following pull-request contains BPF updates for your *net* tree. > > We've added 4 non-merge commits during the last 9 day(s) which contain > a total of 4 files changed, 11 insertions(+), 6 deletions(-). > > The main c

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Finn Thain
On Fri, 8 May 2020, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > > Only macsonic has been compile tested. I don't have the needed setup to > > compile xtsonic > > Well, we gotta do that before we apply the patch :S > I've compiled xtsonic.c with this

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > @@ -527,8 +531,9 @@ static int mac_sonic_platform_remove(struct > platform_device *pdev) > struct sonic_local* lp = netdev_priv(dev); > > unregister_netdev(dev); > - dma_free_coherent(lp->device, SIZEOF_SONIC_DESC *

Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Jakub Kicinski
On Sat, 9 May 2020 00:31:03 +0100 Colin Ian King wrote: > > My preference would be for > > > > { > > int i; > > u32 off = 0; > > > > for (i = 0; i < TG3_SD_NUM_RECS; i++) { > > tg3_ape_scratchpad_read(tp, (u32 *)ocir, off, TC3_OCIR_LEN); > > > > if (ocir->sign

Re: [PATCH net] dpaa2-eth: prevent array underflow in update_cls_rule()

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 17:37:20 +0300 Dan Carpenter wrote: > The "location" is controlled by the user via the ethtool_set_rxnfc() > function. This update_cls_rule() function checks for array overflows > but it doesn't check if the value is negative. I have changed the type > to unsigned to prevent ar

Re: [PATCH net-next] nfp: abm: fix error return code in nfp_abm_vnic_alloc()

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 07:27:35 + Wei Yongjun wrote: > Fix to return negative error code -ENOMEM from the kzalloc() error > handling case instead of 0, as done elsewhere in this function. > > Fixes: 174ab544e3bc ("nfp: abm: add cls_u32 offload for simple band > classification") > Reported-by: Hul

Re: [PATCH bpf-next v3 05/21] bpf: implement bpf_seq_read() for bpf iterator

2020-05-08 Thread Yonghong Song
On 5/8/20 11:52 AM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:39 PM Yonghong Song wrote: bpf iterator uses seq_file to provide a lossless way to transfer data to user space. But we want to call bpf program after all objects have been traversed, and bpf program may write additional da

Re: [PATCH net] r8169: re-establish support for RTL8401 chip version

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 08:24:14 +0200 Heiner Kallweit wrote: > r8169 never had native support for the RTL8401, however it reportedly > worked with the fallback to RTL8101e [0]. Therefore let's add this > as an explicit assignment. > > [0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956868 > > F

Re: [PATCH bpf-next v3 03/21] bpf: support bpf tracing/iter programs for BPF_LINK_CREATE

2020-05-08 Thread Yonghong Song
On 5/8/20 11:24 AM, Andrii Nakryiko wrote: On Wed, May 6, 2020 at 10:41 PM Yonghong Song wrote: Given a bpf program, the step to create an anonymous bpf iterator is: - create a bpf_iter_link, which combines bpf program and the target. In the future, there could be more information r

Re: [PATCH] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-08 Thread Yunsheng Lin
On 2020/5/8 21:01, Andrew Lunn wrote: > On Fri, May 08, 2020 at 01:08:13PM +0530, Sunil Kovvuri wrote: >> On Fri, May 8, 2020 at 11:00 AM Kevin Hao wrote: >>> >>> On Fri, May 08, 2020 at 10:18:27AM +0530, Sunil Kovvuri wrote: On Fri, May 8, 2020 at 9:43 AM Kevin Hao wrote: > > In the

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:25:57 +0200 Christophe JAILLET wrote: > Only macsonic has been compile tested. I don't have the needed setup to > compile xtsonic Well, we gotta do that before we apply the patch :S Does the driver actually depend on some platform stuff, or can we do this: diff --git a/dr

Re: [PATCH v2] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-08 Thread Kevin Hao
On Fri, May 08, 2020 at 05:38:33PM -0700, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:49:53 +0800 Kevin Hao wrote: > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > > index f1d2dea90a8c..612d33207326 100644

Re: [RFC PATCH v3 06/14] perf evsel: fix 2 memory leaks

2020-05-08 Thread Andi Kleen
On Thu, May 07, 2020 at 10:36:21PM -0700, Ian Rogers wrote: > If allocated, perf_pkg_mask and metric_events need freeing. All these patches at the beginning look like straight forward bug fixes and are really independent of the new features. For them Reviewed-by: Andi Kleen > > Signed-off-by:

Re: [RFC PATCH v3 13/14] perf metricgroup: remove duped metric group events

2020-05-08 Thread Andi Kleen
> static struct evsel *find_evsel_group(struct evlist *perf_evlist, > struct expr_parse_ctx *pctx, > + bool has_constraint, > struct evsel **metric_events, >

Re: [PATCH v2] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:49:53 +0800 Kevin Hao wrote: > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > index f1d2dea90a8c..612d33207326 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > +++

Re: [RFC PATCH v3 12/14] perf metricgroup: order event groups by size

2020-05-08 Thread Andi Kleen
On Thu, May 07, 2020 at 10:36:27PM -0700, Ian Rogers wrote: > When adding event groups to the group list, insert them in size order. > This performs an insertion sort on the group list. By placing the > largest groups at the front of the group list it is possible to see if a > larger group contains

Re: [RFC PATCH v3 01/14] perf parse-events: expand add PMU error/verbose messages

2020-05-08 Thread Andi Kleen
This seems like a independent bug fix and should probably be pushed independently of the rest. Perhaps add a Fixes: tag. Reviewed-by: Andi Kleen On Thu, May 07, 2020 at 10:36:16PM -0700, Ian Rogers wrote: > On a CPU like skylakex an uncore_iio_0 PMU may alias with > uncore_iio_free_running_0.

Re: [PATCH net-next 3/5] net: mvpp2: cls: Use RSS contexts to handle RSS tables

2020-05-08 Thread Matteo Croce
On Thu, Apr 23, 2020 at 7:00 PM Russell King - ARM Linux admin wrote: > > On Tue, Apr 14, 2020 at 01:43:02AM +0200, Matteo Croce wrote: > > On Tue, Apr 14, 2020 at 1:21 AM Maxime Chevallier > > wrote: > > > > > > The PPv2 controller has 8 RSS tables that are shared across all ports on > > > a giv

Re: [RFC PATCH v3 00/14] Share events between metrics

2020-05-08 Thread Andi Kleen
On Thu, May 07, 2020 at 10:36:15PM -0700, Ian Rogers wrote: > Metric groups contain metrics. Metrics create groups of events to > ideally be scheduled together. Often metrics refer to the same events, > for example, a cache hit and cache miss rate. Using separate event > groups means these metrics

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-08 Thread Jeremy Linton
On 5/8/20 6:42 PM, Andrew Lunn wrote: On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote: Hi, On 5/8/20 3:27 PM, Andrew Lunn wrote: There is a very small number of devices where the vendor messed up, and did not put valid contents in the ID registers. In such cases, we can read the

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-08 Thread Andrew Lunn
On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote: > Hi, > > On 5/8/20 3:27 PM, Andrew Lunn wrote: > > > > There is a very small number of devices where the vendor messed up, > > > > and did not put valid contents in the ID registers. In such cases, we > > > > can read the IDs from dev

[PATCH] net-icmp: make icmp{,v6} (ping) sockets available to all by default

2020-05-08 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This makes 'ping' 'ping6' and icmp based traceroute no longer require any suid or file capabilities. These sockets have baked long enough that the restriction to make them unusable by default is no longer necessary. The concerns were around exploits. However there are

Re: [PATCH bpf-next v5 0/4] bpf: allow any port in bpf_bind helper

2020-05-08 Thread Daniel Borkmann
On 5/8/20 7:46 PM, Stanislav Fomichev wrote: We want to have a tighter control on what ports we bind to in the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means connect() becomes slightly more expensive. The series goes like this: 1. selftests: move existing helpers that make it easy to create

Re: [PATCH] net/mlx5: Replace zero-length array with flexible-array

2020-05-08 Thread Jakub Kicinski
On Thu, 7 May 2020 13:59:35 -0500 Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: >

Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Colin Ian King
On 09/05/2020 00:21, Joe Perches wrote: > On Fri, 2020-05-08 at 23:53 +0100, Colin King wrote: >> From: Colin Ian King >> >> Currently the value for 'off' is computed using a multiplication and >> a couple of statements later off is being incremented by len and >> this value is never read. Clean

Re: [PATCH] net/sonic: Fix some resource leaks in error handling paths

2020-05-08 Thread Finn Thain
On Fri, 8 May 2020, Christophe JAILLET wrote: > A call to 'dma_alloc_coherent()' is hidden in > 'sonic_alloc_descriptors()'. > > This is correctly freed in the remove function, but not in the error > handling path of the probe function. Fix it and add the missing > 'dma_free_coherent()' call

Re: [PATCH 0/2] Backport to 4.19 - sctp: fully support memory accounting

2020-05-08 Thread David Miller
From: Ashwin H Date: Fri, 8 May 2020 17:24:40 + > Could you please let me know why this is not applicable to 4.19 ? No, I cannot. I only handle the most recent two -stable releases, and 4.19 is beyond that. Thank you.

Re: [PATCH] net: tg3: tidy up loop, remove need to compute off with a multiply

2020-05-08 Thread Joe Perches
On Fri, 2020-05-08 at 23:53 +0100, Colin King wrote: > From: Colin Ian King > > Currently the value for 'off' is computed using a multiplication and > a couple of statements later off is being incremented by len and > this value is never read. Clean up the code by removing the > multiplication a

[PATCH v2 bpf-next 3/3] selftest/bpf: add BPF triggering benchmark

2020-05-08 Thread Andrii Nakryiko
It is sometimes desirable to be able to trigger BPF program from user-space with minimal overhead. sys_enter would seem to be a good candidate, yet in a lot of cases there will be a lot of noise from syscalls triggered by other processes on the system. So while searching for low-overhead alternativ

[PATCH v2 bpf-next 0/3] Add benchmark runner and few benchmarks

2020-05-08 Thread Andrii Nakryiko
Add generic benchmark runner framework which simplifies writing various performance benchmarks in a consistent fashion. This framework will be used in follow up patches to test performance of perf buffer and ring buffer as well. Patch #1 adds generic runner implementation and atomic counter bench

[PATCH v2 bpf-next 2/3] selftest/bpf: fmod_ret prog and implement test_overhead as part of bench

2020-05-08 Thread Andrii Nakryiko
Add fmod_ret BPF program to existing test_overhead selftest. Also re-implement user-space benchmarking part into benchmark runner to compare results. Results with ./bench are consistently somewhat lower than test_overhead's, but relative performance of various types of BPF programs stay consisten

[PATCH v2 bpf-next 1/3] selftests/bpf: add benchmark runner infrastructure

2020-05-08 Thread Andrii Nakryiko
While working on BPF ringbuf implementation, testing, and benchmarking, I've developed a pretty generic and modular benchmark runner, which seems to be generically useful, as I've already used it for one more purpose (testing fastest way to trigger BPF program, to minimize overhead of in-kernel cod

Re: [PATCH v4] net: tcp: fix rx timestamp behavior for tcp_recvmsg

2020-05-08 Thread Jakub Kicinski
On Fri, 8 May 2020 19:58:46 + Kelly Littlepage wrote: > From: Kelly Littlepage > > The stated intent of the original commit is to is to "return the timestamp > corresponding to the highest sequence number data returned." The current > implementation returns the timestamp for the last byte of

  1   2   3   4   >