Re: [PATCH v2 00/29] [Set 1,2,3] Rid W=1 warnings in Wireless

2020-10-05 Thread Lee Jones
On Tue, 06 Oct 2020, Kalle Valo wrote: > Lee Jones writes: > > > On Thu, 10 Sep 2020, Lee Jones wrote: > > > >> This is a rebased/re-worked set of patches which have been > >> previously posted to the mailing list(s). > >> > >> This set is part of a larger effort attempting to clean-up W=1 > >>

Re: [PATCH net-next v2 0/7] ethtool: allow dumping policies to user space

2020-10-05 Thread Johannes Berg
On Mon, 2020-10-05 at 15:07 -0700, Jakub Kicinski wrote: > Hi! > > This series wires up ethtool policies to ops, so they can be > dumped to user space for feature discovery. > > First patch wires up GET commands, and second patch wires up SETs. > > The policy tables are trimmed to save space and

Re: [PATCH] vdpa/mlx5: should keep avail_index despite device status

2020-10-05 Thread Eli Cohen
On Tue, Oct 06, 2020 at 02:22:15AM -0400, Michael S. Tsirkin wrote: Acked-by: Eli Cohen > On Fri, Oct 02, 2020 at 01:17:00PM -0700, Si-Wei Liu wrote: > > + Eli. > > > > On Thu, Oct 1, 2020 at 2:02 PM Si-Wei Liu wrote: > > > > > > A VM with mlx5 vDPA has below warnings while being reset: > > >

Re: [PATCH net-next 5/6] netlink: add mask validation

2020-10-05 Thread Johannes Berg
On Mon, 2020-10-05 at 15:21 -0700, Jakub Kicinski wrote: > > > Nice, easy & useful, maybe I'll code it up tomorrow. > > > > OK I thought about it a bit more and looked at the code, and it's not > > actually possible to do easily right now, because we can't actually > > point to the bad attribut

[RESEND net-next 6/8] net: sched: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/sched/sch_atm.c | 9 +

[RESEND net-next 4/8] net: mac802154: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/mac802154/main.c | 8 +++-

[RESEND net-next 8/8] net: xfrm: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/xfrm/xfrm_input.c | 7 +++

[RESEND net-next 5/8] net: rds: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/rds/ib_cm.c | 14 ++---

[RESEND net-next 7/8] net: smc: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/smc/smc_cdc.c | 6 +++--- net

[RESEND net-next 2/8] net: ipv4: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/ipv4/tcp_output.c | 8 +++-

[RESEND net-next 3/8] net: mac80211: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/mac80211/ieee80211_i.h | 4 ++

[RESEND net-next 1/8] net: dccp: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/dccp/timer.c | 10 +-

[RESEND net-next 0/8] net: convert tasklets to use new

2020-10-05 Thread Allen Pais
From: Allen Pais Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the net/* drivers to use the new tasklet_setup() API The following series is based on net-next.git(8b0308fe3) Allen Pais (8): net: dccp: c

[PATCH net-next] mptcp: fix infinite loop on recvmsg()/worker() race.

2020-10-05 Thread Paolo Abeni
If recvmsg() and the workqueue race to dequeue the data pending on some subflow, the current mapping for such subflow covers several skbs and some of them have not reached yet the received, either the worker or recvmsg() can find a subflow with the data_avail flag set - since the current mapping is

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-05 Thread Kurt Kanzenbach
On Sun Oct 04 2020, Vladimir Oltean wrote: > On Sun, Oct 04, 2020 at 01:29:08PM +0200, Kurt Kanzenbach wrote: >> +/* Enabling/disabling TX and RX HW timestamping for different PTP messages >> is >> + * not available in the switch. Thus, this function only serves as a check >> if >> + * the user r

Re: [PATCH] vdpa/mlx5: should keep avail_index despite device status

2020-10-05 Thread Michael S. Tsirkin
On Fri, Oct 02, 2020 at 01:17:00PM -0700, Si-Wei Liu wrote: > + Eli. > > On Thu, Oct 1, 2020 at 2:02 PM Si-Wei Liu wrote: > > > > A VM with mlx5 vDPA has below warnings while being reset: > > > > vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11) > > vhost VQ 1 ring restore

[next-next v3 08/10] net: pegasus: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb

[next-next v3 05/10] net: cdc_ncm: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb

[next-next v3 01/10] net: arcnet: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/arc

[next-next v3 02/10] net: caif: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/cai

[next-next v3 09/10] net: r8152: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb

[next-next v3 07/10] net: lan78xx: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb

[next-next v3 10/10] net: rtl8150: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb

[next-next v3 04/10] net: ppp: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ppp

[next-next v3 03/10] net: ifb: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/ifb

[next-next v3 06/10] net: hso: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/usb

[next-next v3 00/10] drivers: net: convert tasklets to use new

2020-10-05 Thread Allen Pais
From: Allen Pais commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts the remaining drivers in net/ to use the new tasklet_setup() API Allen Pais (10): net: arcnet: convert tasklets to use new tasklet_setup() API

Re: [PATCH net-next v6 2/7] net: dsa: Add DSA driver for Hirschmann Hellcreek switches

2020-10-05 Thread Kurt Kanzenbach
Hi Vladimir, thanks for the review. On Sun Oct 04 2020, Vladimir Oltean wrote: > On Sun, Oct 04, 2020 at 01:29:06PM +0200, Kurt Kanzenbach wrote: >> +static int hellcreek_vlan_del(struct dsa_switch *ds, int port, >> + const struct switchdev_obj_port_vlan *vlan) >> +{ >> +

Re: [PATCH net-next 4/4] enetc: Migrate to PHYLINK and PCS_LYNX

2020-10-05 Thread Ioana Ciornei
On Mon, Oct 05, 2020 at 05:28:18PM +0300, Claudiu Manoil wrote: > This is a methodical transition of the driver from phylib > to phylink, following the guidelines from sfp-phylink.rst. > The MAC register configurations based on interface mode > were moved from the probing path to the mac_config() h

Re: [PATCH 1/3] rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff

2020-10-05 Thread Kalle Valo
Chris Chiu writes: > On Mon, Oct 5, 2020 at 11:01 PM Chris Chiu wrote: > > From: Chris Chiu > > The legacy_httxpowerdiff in rtl8192se is pretty much the same as > the legacy_ht_txpowerdiff for other chips. Use the same name to > keep the consistency. > > Signed-off

Re: [PATCH] random32: Restore __latent_entropy attribute on net_rand_state

2020-10-05 Thread Kees Cook
On Tue, Oct 06, 2020 at 04:28:09AM +0200, Willy Tarreau wrote: > Hi Kees, > > On Mon, Oct 05, 2020 at 07:12:29PM -0700, Kees Cook wrote: > > On Fri, Oct 02, 2020 at 05:16:11PM +0200, Thibaut Sautereau wrote: > > > From: Thibaut Sautereau > > > > > > Commit f227e3ec3b5c ("random32: update the net

[PATCH] cxgb4: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/eth

wireless: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais This series converts the remaining drivers to use new tasklet_setup() API. The patches are based on wireless-drivers-next.git Allen Pais (2): ath11k: convert tasklets to use new tasklet_setup() API wireless: mt76: convert tasklets to use new tasklet_setup() API drivers/

[PATCH 1/2] ath11k: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/wir

[PATCH 2/2] wireless: mt76: convert tasklets to use new tasklet_setup() API

2020-10-05 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/net/wir

Re: [PATCH v2 00/29] [Set 1,2,3] Rid W=1 warnings in Wireless

2020-10-05 Thread Kalle Valo
Lee Jones writes: > On Thu, 10 Sep 2020, Lee Jones wrote: > >> This is a rebased/re-worked set of patches which have been >> previously posted to the mailing list(s). >> >> This set is part of a larger effort attempting to clean-up W=1 >> kernel builds, which are currently overwhelmingly riddled

[PATCH v2] net/x25: Fix null-ptr-deref in x25_connect

2020-10-05 Thread Martin Schiller
This fixes a regression for blocking connects introduced by commit 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect"). The x25->neighbour is already set to "NULL" by x25_disconnect() now, while a blocking connect is waiting in x25_wait_for_connection_establishment(). Therefore

Re: [RFC] net: phy: add shutdown hook to struct phy_driver

2020-10-05 Thread Heiner Kallweit
On 05.10.2020 18:00, Florian Fainelli wrote: > > > On 10/5/2020 8:54 AM, Heiner Kallweit wrote: >> On 05.10.2020 17:41, Florian Fainelli wrote: >>> >>> >>> On 10/5/2020 1:53 AM, Jisheng Zhang wrote: On Wed, 30 Sep 2020 13:23:29 -0700 Florian Fainelli wrote: > > On 9/30/2020

Re: linux-next: build failure after merge of the net-next tree

2020-10-05 Thread Stephen Rothwell
Hi Christoph, On Tue, 6 Oct 2020 07:13:01 +0200 Christoph Hellwig wrote: > > On Tue, Oct 06, 2020 at 02:58:47PM +1100, Stephen Rothwell wrote: > > Hi all, > > > > After merging the net-next tree, today's linux-next build (x86_64 > > allmodconfig) failed like this: > > It actually doesn't need

Re: linux-next: build failure after merge of the net-next tree

2020-10-05 Thread Christoph Hellwig
On Tue, Oct 06, 2020 at 02:58:47PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the net-next tree, today's linux-next build (x86_64 > allmodconfig) failed like this: It actually doesn't need that or the two other internal headers. Bjoern has a fixed, and it was supposed to be queued

[PATCH bpf-next v2 2/2] samples/bpf: fix a compilation error with fallthrough marking

2020-10-05 Thread Yonghong Song
Compiling samples/bpf hits an error related to fallthrough marking. ... CC samples/bpf/hbm.o samples/bpf/hbm.c: In function ‘main’: samples/bpf/hbm.c:486:4: error: ‘fallthrough’ undeclared (first use in this function) fallthrough; ^~~ The "fallthrough" is not defi

[PATCH bpf-next v2 1/2] samples/bpf: change Makefile to cope with latest llvm

2020-10-05 Thread Yonghong Song
With latest llvm trunk, bpf programs under samples/bpf directory, if using CORE, may experience the following errors: LLVM ERROR: Cannot select: intrinsic %llvm.preserve.struct.access.index PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. P

Re: [PATCH v4 bpf-next 00/13] mvneta: introduce XDP multi-buffer support

2020-10-05 Thread John Fastabend
Lorenzo Bianconi wrote: > [...] > > > > > In general I see no reason to populate these fields before the XDP > > program runs. Someone needs to convince me why having frags info before > > program runs is useful. In general headers should be preserved and first > > frag already included in the da

Re: [PATCH] rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff

2020-10-05 Thread Joe Perches
On Tue, 2020-10-06 at 11:59 +0800, Chris Chiu wrote: > From: Chris Chiu > > The legacy_httxpowerdiff in rtl8192se is pretty much the same as > the legacy_ht_txpowerdiff for other chips. Use the same name to > keep the consistency. > > Signed-off-by: Chris Chiu > --- > drivers/net/wireless/real

[PATCH] rtlwifi: rtl8192se: remove duplicated legacy_httxpowerdiff

2020-10-05 Thread Chris Chiu
From: Chris Chiu The legacy_httxpowerdiff in rtl8192se is pretty much the same as the legacy_ht_txpowerdiff for other chips. Use the same name to keep the consistency. Signed-off-by: Chris Chiu --- drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c | 2 +- drivers/net/wireless/realtek/rtlwifi

linux-next: build failure after merge of the net-next tree

2020-10-05 Thread Stephen Rothwell
Hi all, After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: net/xdp/xsk_buff_pool.c:7:10: fatal error: linux/dma-noncoherent.h: No such file or directory 7 | #include | ^ Caused by commit 1c1efc2af158 (

Re: [PATCHv3 bpf 3/3] selftest/bpf: test pinning map with reused map fd

2020-10-05 Thread Andrii Nakryiko
On Mon, Oct 5, 2020 at 7:15 PM Hangbin Liu wrote: > > This add a test to make sure that we can still pin maps with > reused map fd. > > Signed-off-by: Hangbin Liu > --- Acked-by: Andrii Nakryiko [...]

Re: [PATCH bpf-next 1/2] samples/bpf: change Makefile to cope with latest llvm

2020-10-05 Thread Yonghong Song
On 10/5/20 12:27 PM, Andrii Nakryiko wrote: On Fri, Oct 2, 2020 at 10:16 PM Yonghong Song wrote: On 10/2/20 9:22 PM, Andrii Nakryiko wrote: On Fri, Oct 2, 2020 at 7:19 PM Yonghong Song wrote: With latest llvm trunk, bpf programs under samples/bpf directory, if using CORE, may experien

Re: [PATCH] random32: Restore __latent_entropy attribute on net_rand_state

2020-10-05 Thread Willy Tarreau
Hi Kees, On Mon, Oct 05, 2020 at 07:12:29PM -0700, Kees Cook wrote: > On Fri, Oct 02, 2020 at 05:16:11PM +0200, Thibaut Sautereau wrote: > > From: Thibaut Sautereau > > > > Commit f227e3ec3b5c ("random32: update the net random state on interrupt > > and activity") broke compilation and was tempo

[PATCHv3 bpf 2/3] libbpf: check if pin_path was set even map fd exist

2020-10-05 Thread Hangbin Liu
Say a user reuse map fd after creating a map manually and set the pin_path, then load the object via libbpf. In libbpf bpf_object__create_maps(), bpf_object__reuse_map() will return 0 if there is no pinned map in map->pin_path. Then after checking if map fd exist, we should also check if pin_path

[PATCHv3 bpf 3/3] selftest/bpf: test pinning map with reused map fd

2020-10-05 Thread Hangbin Liu
This add a test to make sure that we can still pin maps with reused map fd. Signed-off-by: Hangbin Liu --- v3: use CHECK() for bpf_object__open_file() and close map fd on error v2: no update --- .../selftests/bpf/prog_tests/pinning.c| 49 ++- 1 file changed, 48 insertions

[PATCHv3 bpf 1/3] libbpf: close map fd if init map slots failed

2020-10-05 Thread Hangbin Liu
Previously we forgot to close the map fd if bpf_map_update_elem() failed during map slot init, which will leak map fd. Let's move map slot initialization to new function init_map_slots() to simplify the code. And close the map fd if init slot failed. Reported-by: Andrii Nakryiko Acked-by: Andrii

[PATCHv3 bpf 0/3] Fix pining maps after reuse map fd

2020-10-05 Thread Hangbin Liu
When a user reuse map fd after creating a map manually and set the pin_path, then load the object via libbpf. bpf_object__create_maps() will skip pinning map if map fd exist. Fix it by add moving bpf creation to else condition and go on checking map pin_path after that. v3: for selftest: use CHECK

Re: [PATCH] random32: Restore __latent_entropy attribute on net_rand_state

2020-10-05 Thread Kees Cook
On Fri, Oct 02, 2020 at 05:16:11PM +0200, Thibaut Sautereau wrote: > From: Thibaut Sautereau > > Commit f227e3ec3b5c ("random32: update the net random state on interrupt > and activity") broke compilation and was temporarily fixed by Linus in > 83bdc7275e62 ("random32: remove net_rand_state from

[PATCH nf] netfilter: conntrack: connection timeout after re-register

2020-10-05 Thread Francesco Ruggeri
I am sending out this patch mainly to clarify the source of a problem I am seeing. An idle tcp connection is timing out on a 4.19 kernel after conntrack unregister/re-register. By playing with SO_KEEPALIVE setsockopts on the client I can make it timeout in a few seconds. I could not find any releva

Re: [PATCH net-next] net: always dump full packets with skb_dump

2020-10-05 Thread Jacob Keller
On 10/5/2020 7:48 AM, Vladimir Oltean wrote: > Currently skb_dump has a restriction to only dump full packet for the > first 5 socket buffers, then only headers will be printed. Remove this > arbitrary and confusing restriction, which is only documented vaguely > ("up to") in the comments above

Re: [PATCH net-next 1/6] ethtool: wire up get policies to ops

2020-10-05 Thread Jacob Keller
On 10/5/2020 12:33 PM, Johannes Berg wrote: > On Mon, 2020-10-05 at 12:31 -0700, Jakub Kicinski wrote: > >> Yea, I think we're both confused. Agreed with the above. >> >> Are you suggesting: >> >> const struct nla_policy policy[/* no size */] = { >> [HEADER]= NLA_POLICY(...) >>

Re: [PATCH net-next 1/6] ethtool: wire up get policies to ops

2020-10-05 Thread Jacob Keller
On 10/5/2020 12:31 PM, Jakub Kicinski wrote: > On Mon, 05 Oct 2020 21:21:36 +0200 Johannes Berg wrote: But with the difference it seems to me that it'd be possible to get this mixed up? >>> >>> Right, I prefer not to have the unnecessary NLA_REJECTS, so my thinking >>> was - use the

Re: [PATCH 7/9 net-next] xfrm: use dev_sw_netstats_rx_add()

2020-10-05 Thread Herbert Xu
On Mon, Oct 05, 2020 at 10:36:34PM +0200, Fabian Frederick wrote: > use new helper for netstats settings > > Signed-off-by: Fabian Frederick > --- > net/xfrm/xfrm_interface.c | 9 + > 1 file changed, 1 insertion(+), 8 deletions(-) Acked-by: Herbert Xu -- Email: Herbert Xu Home Page:

Re: [PATCH net v2] net/tls: sendfile fails with ktls offload

2020-10-05 Thread Jakub Kicinski
On Tue, 6 Oct 2020 00:13:13 +0530 Rohit Maheshwari wrote: > At first when sendpage gets called, if there is more data, 'more' in > tls_push_data() gets set which later sets pending_open_record_frags, but > when there is no more data in file left, and last time tls_push_data() > gets called, pendin

Re: [MPTCP] [PATCH net-next] mptcp: don't skip needed ack

2020-10-05 Thread Mat Martineau
On Mon, 5 Oct 2020, Paolo Abeni wrote: Currently we skip calling tcp_cleanup_rbuf() when packets are moved into the OoO queue or simply dropped. In both cases we still increment tp->copied_seq, and we should ask the TCP stack to check for ack. Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf

Re: [PATCH 1/9 net-next] net: netdevice.h: sw_netstats_rx_add helper

2020-10-05 Thread Jakub Kicinski
On Mon, 5 Oct 2020 22:34:18 +0200 Fabian Frederick wrote: > +static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned > int len) > +{ > + struct pcpu_sw_netstats *tstats = this_cpu_ptr(dev->tstats); > + > + u64_stats_update_begin(&tstats->syncp); > + tstats->rx_bytes

Re: [PATCH v2 bpf-next] bpf: use raw_spin_trylock() for pcpu_freelist_push/pop in NMI

2020-10-05 Thread Daniel Borkmann
On 10/5/20 8:03 PM, Martin KaFai Lau wrote: On Mon, Oct 05, 2020 at 09:58:38AM -0700, Song Liu wrote: [...] non-NMI pop(): use _lock(); check per cpu lists first; if all per cpu lists are empty, check extralist; if extralist is empty, return NULL. non-NMI pus

[PATCH bpf-next] bpf, doc: Update Andrii's email in MAINTAINERS

2020-10-05 Thread Andrii Nakryiko
Update Andrii Nakryiko's reviewer email to kernel.org account. This optimizes email logistics on my side and makes it less likely for me to miss important patches. Signed-off-by: Andrii Nakryiko --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAI

Re: [PATCH v4 bpf-next 00/13] mvneta: introduce XDP multi-buffer support

2020-10-05 Thread Lorenzo Bianconi
[...] > > In general I see no reason to populate these fields before the XDP > program runs. Someone needs to convince me why having frags info before > program runs is useful. In general headers should be preserved and first > frag already included in the data pointers. If users start parsing fu

Re: [PATCH net-next 5/6] netlink: add mask validation

2020-10-05 Thread Jakub Kicinski
On Mon, 05 Oct 2020 22:12:25 +0200 Johannes Berg wrote: > On Mon, 2020-10-05 at 21:53 +0200, Johannes Berg wrote: > > Hm. I like that idea. > > > > If we have NLMSGERR_ATTR_OFFS we could accompany that with the sub- > > policy for that particular attribute, something like > > > > [NLMSGERR_ATTR_P

[PATCH net-next v2 7/7] ethtool: specify which header flags are supported per command

2020-10-05 Thread Jakub Kicinski
Perform header flags validation through the policy. Only pause command supports ETHTOOL_FLAG_STATS. Create a separate policy to be able to express that in policy dumps to user space. Note that even though the core will validate the header policy, it cannot record multiple layers of attributes and

[PATCH net-next v2 3/7] ethtool: trim policy tables

2020-10-05 Thread Jakub Kicinski
Since ethtool uses strict attribute validation there's no need to initialize all attributes in policy tables. 0 is NLA_UNSPEC which is going to be rejected. Remove the NLA_REJECTs. Similarly attributes above maxattrs are rejected, so there's no need to always size the policy tables to ETHTOOL_A_..

[PATCH net-next v2 6/7] netlink: add mask validation

2020-10-05 Thread Jakub Kicinski
We don't have good validation policy for existing unsigned int attrs which serve as flags (for new ones we could use NLA_BITFIELD32). With increased use of policy dumping having the validation be expressed as part of the policy is important. Add validation policy in form of a mask of supported/vali

[PATCH net-next v2 2/7] ethtool: wire up set policies to ops

2020-10-05 Thread Jakub Kicinski
Similarly to get commands wire up the policies of set commands to get parsing by the core and policy dumps. Signed-off-by: Jakub Kicinski --- net/ethtool/cabletest.c | 24 ++-- net/ethtool/channels.c | 11 +++ net/ethtool/coalesce.c | 11 +++ net/ethtool/deb

[PATCH net-next v2 5/7] netlink: create helpers for checking type is an int

2020-10-05 Thread Jakub Kicinski
There's a number of policies which check if type is a uint or sint. Factor the checking against the list of value sizes to a helper for easier reuse. v2: - new patch Signed-off-by: Jakub Kicinski --- CC: j...@resnulli.us CC: dsah...@gmail.com CC: pa...@netfilter.org --- include/net/netlink.h |

[PATCH net-next v2 1/7] ethtool: wire up get policies to ops

2020-10-05 Thread Jakub Kicinski
Wire up policies for get commands in struct nla_policy of the ethtool family. Make use of genetlink code attr validation and parsing, as well as allow dumping policies to user space. For every ETHTOOL_MSG_*_GET: - add 'ethnl_' prefix to policy name - add extern declaration in net/ethtool/netlink

[PATCH net-next v2 4/7] ethtool: link up ethnl_header_policy as a nested policy

2020-10-05 Thread Jakub Kicinski
To get the most out of parsing by the core, and to allow dumping full policies we need to specify which policy applies to nested attrs. For headers it's ethnl_header_policy. $ sed -i 's@\(ETHTOOL_A_.*HEADER\].*=\) { .type = NLA_NESTED },@\1\n\t\tNLA_POLICY_NESTED(ethnl_header_policy),@' net/ethto

[PATCH net-next v2 0/7] ethtool: allow dumping policies to user space

2020-10-05 Thread Jakub Kicinski
Hi! This series wires up ethtool policies to ops, so they can be dumped to user space for feature discovery. First patch wires up GET commands, and second patch wires up SETs. The policy tables are trimmed to save space and LoC. Next - take care of linking up nested policies for the header (whi

Re: [PATCH 1/1] net/rds: suppress page allocation failure error in recv buffer refill

2020-10-05 Thread Manjunath Patil
Thanks David for your feedback. I will submit v3 of this patch removing the warning. -Manjunath On 10/3/2020 5:26 PM, David Miller wrote: From: Manjunath Patil Date: Fri, 2 Oct 2020 13:05:45 -0700 RDS/IB tries to refill the recv buffer in softirq context using GFP_NOWAIT flag. However alloc

Re: [PATCHv2 bpf 3/3] selftest/bpf: test pinning map with reused map fd

2020-10-05 Thread Andrii Nakryiko
On Sat, Oct 3, 2020 at 1:55 AM Hangbin Liu wrote: > > This add a test to make sure that we can still pin maps with > reused map fd. > > Signed-off-by: Hangbin Liu > --- > .../selftests/bpf/prog_tests/pinning.c| 46 ++- > 1 file changed, 45 insertions(+), 1 deletion(-) > >

Re: [PATCHv2 bpf 2/3] libbpf: check if pin_path was set even map fd exist

2020-10-05 Thread Andrii Nakryiko
On Sat, Oct 3, 2020 at 1:55 AM Hangbin Liu wrote: > > Say a user reuse map fd after creating a map manually and set the > pin_path, then load the object via libbpf. > > In libbpf bpf_object__create_maps(), bpf_object__reuse_map() will > return 0 if there is no pinned map in map->pin_path. Then aft

Re: [PATCH v4 bpf-next 00/13] mvneta: introduce XDP multi-buffer support

2020-10-05 Thread John Fastabend
Jesper Dangaard Brouer wrote: > On Fri, 02 Oct 2020 11:06:12 -0700 > John Fastabend wrote: > > > Lorenzo Bianconi wrote: > > > > Lorenzo Bianconi wrote: > > > > > This series introduce XDP multi-buffer support. The mvneta driver is > > > > > the first to support these new "non-linear" xdp_{buff

Re: [PATCHv2 bpf 1/3] libbpf: close map fd if init map slots failed

2020-10-05 Thread Andrii Nakryiko
On Sat, Oct 3, 2020 at 1:55 AM Hangbin Liu wrote: > > Previously we forgot to close the map fd if bpf_map_update_elem() > failed during map slot init, which will leak map fd. > > Let's move map slot initialization to new function init_map_slots() to > simplify the code. And close the map fd if ini

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-05 Thread Andrew Lunn
> It depends a lot on what portion of the kernel gets enabled for W=1. > > As long as it's only drivers that are actively maintained, and they > make up a fairly small portion of all code, it should not be a problem > to find someone to fix useful warnings. Well, drivers/net/ethernet is around 1.

Re: [PATCH] net: dsa: microchip: fix race condition

2020-10-05 Thread Vladimir Oltean
Hi Christian, On Mon, Oct 05, 2020 at 06:08:29PM +0200, Christian Eggers wrote: > Between queuing the delayed work and finishing the setup of the dsa > ports, the process may sleep in request_module() and the queued work may > be executed prior the initialization of the DSA ports is finished. In

Re: [PATCH v3 net-next 3/3] net: atlantic: implement media detect feature via phy tunables

2020-10-05 Thread Andrew Lunn
On Mon, Oct 05, 2020 at 06:39:39PM +0300, Igor Russkikh wrote: > Mediadetect is another name for the EDPD (energy detect power down). > This feature allows device to save extra power when no link is available. > > PHY goes into the extreme power saving mode and only periodically wakes up > and che

[PATCH 7/9 net-next] xfrm: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- net/xfrm/xfrm_interface.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index eb8181987620d..8f8631eafe784 100644 --- a/net/xfrm/xfrm_inter

[PATCH 8/9 net-next] net: openvswitch: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- net/openvswitch/vport-internal_dev.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index 58a7b8312c289..d8fe66eea206b

[PATCH 9/9 net-next] ipv4: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- net/ipv4/ip_tunnel.c | 8 +--- net/ipv4/ip_vti.c| 9 + 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 0c1f364044715..8b04d1dcfec4e 100644 --

[PATCH 6/9 net-next] ipv6: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- net/ipv6/ip6_vti.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index fac01b80a1040..5f9c4fdc120d6 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti

[PATCH 5/9 net-next] gtp: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- drivers/net/gtp.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index c09fe18c6c52d..030a1a5afe05a 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@

[PATCH 4/9 net-next] bareudp: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- drivers/net/bareudp.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c index 841910f1db655..ff0bea1554f9b 100644 --- a/drivers/net/bareudp.c +++ b

[PATCH 3/9 net-next] geneve: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- drivers/net/geneve.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 974a244f45ba0..d07008a818df6 100644 --- a/drivers/net/geneve.c +++ b/dri

[PATCH 2/9 net-next] vxlan: use dev_sw_netstats_rx_add()

2020-10-05 Thread Fabian Frederick
use new helper for netstats settings Signed-off-by: Fabian Frederick --- drivers/net/vxlan.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index be3bf233a809e..1a557aeba32b4 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/

[PATCH 1/9 net-next] net: netdevice.h: sw_netstats_rx_add helper

2020-10-05 Thread Fabian Frederick
some drivers/network protocols update rx bytes/packets under u64_stats_update_begin/end sequence. Add a specific helper like dev_lstats_add() Signed-off-by: Fabian Frederick --- include/linux/netdevice.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/netdevice.h b

[PATCH 0/9 net-next] drivers/net: add sw_netstats_rx_add helper

2020-10-05 Thread Fabian Frederick
This small patchset creates netstats addition dev_sw_netstats_rx_add() based on dev_lstats_add() and replaces some open coding in both drivers/net and net branches. Fabian Frederick (9): net: netdevice.h: sw_netstats_rx_add helper vxlan: use dev_sw_netstats_rx_add() geneve: use dev_sw_netsta

Re: [GIT] Networking

2020-10-05 Thread pr-tracker-bot
The pull request you sent on Sun, 04 Oct 2020 22:07:55 -0700 (PDT): > git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git refs/heads/master has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/165563c05088467e7e0ba382c5bdb04b6cbf0013 Thank you! -- Deet-doot-dot,

Re: [PATCH net-next 5/6] netlink: add mask validation

2020-10-05 Thread Johannes Berg
On Mon, 2020-10-05 at 21:53 +0200, Johannes Berg wrote: > On Mon, 2020-10-05 at 12:40 -0700, Jakub Kicinski wrote: > > > > I would totally support doing that here in the general validation code, > > > but (again) don't really think NLMSGERR_ATTR_COOKIE is an appropriate > > > attribute for it. > >

Re: [PATCH net-next 11/15] sctp: add udphdr to overhead when udp_port is set

2020-10-05 Thread Michael Tuexen
> On 5. Oct 2020, at 21:01, Marcelo Ricardo Leitner > wrote: > > On Sat, Oct 03, 2020 at 08:24:34PM +0800, Xin Long wrote: >> On Sat, Oct 3, 2020 at 7:23 PM Xin Long wrote: >>> >>> On Sat, Oct 3, 2020 at 4:12 PM Xin Long wrote: On Sat, Oct 3, 2020 at 12:08 PM Marcelo Ricardo Leitne

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-05 Thread Arnd Bergmann
On Mon, Oct 5, 2020 at 9:49 PM Andrew Lunn wrote: > > > Sorry, to be more specific about my concern; I like the idea of > > exporting the W=* flags, then selectively applying them via > > subdir-ccflags-y. I don't like the idea of supporting W=1 as defined > > at a precise point in time via multi

Re: [PATCH] net: dsa: microchip: fix race condition

2020-10-05 Thread Florian Fainelli
On 10/5/2020 9:08 AM, Christian Eggers wrote: Between queuing the delayed work and finishing the setup of the dsa ports, the process may sleep in request_module() and the queued work may be executed prior the initialization of the DSA ports is finished. In ksz_mib_read_work(), a NULL dereferen

Re: [PATCH net-next 5/6] netlink: add mask validation

2020-10-05 Thread Johannes Berg
On Mon, 2020-10-05 at 12:40 -0700, Jakub Kicinski wrote: > > I would totally support doing that here in the general validation code, > > but (again) don't really think NLMSGERR_ATTR_COOKIE is an appropriate > > attribute for it. > > Hm. Perhaps we can do a partial policy dump into the extack? Hm

Re: [PATCH net-next 1/6] ethtool: wire up get policies to ops

2020-10-05 Thread Jakub Kicinski
On Mon, 05 Oct 2020 21:46:02 +0200 Johannes Berg wrote: > On Mon, 2020-10-05 at 12:41 -0700, Jakub Kicinski wrote: > > > > Now you can freely add any attributes, and, due to strict validation, > > > anything not specified in the policy will be rejected, whether by being > > > out of range (> maxat

Re: [PATCH net-next v2 1/2] Makefile.extrawarn: Add symbol for W=1 warnings for today

2020-10-05 Thread Andrew Lunn
> Sorry, to be more specific about my concern; I like the idea of > exporting the W=* flags, then selectively applying them via > subdir-ccflags-y. I don't like the idea of supporting W=1 as defined > at a precise point in time via multiple date specific symbols. If > someone adds something to W=

  1   2   3   >