Re: [RFC v3] net: sched: implement TCQ_F_CAN_BYPASS for lockless qdisc

2021-03-22 Thread Ahmad Fatoum
Hi, On 22.03.21 10:09, Yunsheng Lin wrote: > Currently pfifo_fast has both TCQ_F_CAN_BYPASS and TCQ_F_NOLOCK > flag set, but queue discipline by-pass does not work for lockless > qdisc because skb is always enqueued to qdisc even when the qdisc > is empty, see __dev_xmit_skb(). > > This patch cal

Re: [Patch bpf-next v6 08/12] udp: implement ->read_sock() for sockmap

2021-03-22 Thread Yunsheng Lin
On 2021/3/23 8:38, Cong Wang wrote: > From: Cong Wang > > This is similar to tcp_read_sock(), except we do not need > to worry about connections, we just need to retrieve skb > from UDP receive queue. > > Cc: John Fastabend > Cc: Daniel Borkmann > Cc: Jakub Sitnicki > Cc: Lorenz Bauer > Sign

Re: [PATCH] octeontx2-af: cn10k: Few mundane typos fixed

2021-03-22 Thread Randy Dunlap
On 3/22/21 9:28 PM, Bhaskar Chowdhury wrote: > > s/preceeds/precedes/ .two different places > s/rsponse/response/ > s/cetain/certain/ > s/precison/precision/ > > Signed-off-by: Bhaskar Chowdhury > --- > drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 10 +- > 1 file changed, 5 i

Re: [PATCH] perf tools: Trivial spelling fixes

2021-03-22 Thread Randy Dunlap
On 3/22/21 9:46 PM, Bhaskar Chowdhury wrote: > > s/succeded/succeeded/ five different places > s/revsions/revisions/ > > Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap > --- > tools/perf/util/header.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > >

Re: [net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device()

2021-03-22 Thread Calvin Johnson
On Fri, Mar 19, 2021 at 11:21:15AM +, Daniel Thompson wrote: > On Wed, Mar 17, 2021 at 02:15:20PM +0530, Calvin Johnson wrote: > > Hi Daniel, > > > > On Tue, Mar 16, 2021 at 07:17:19PM +, Daniel Thompson wrote: > > > On Thu, Mar 11, 2021 at 11:49:59AM +0530, Calvin Johnson wrote: > > > > R

Re: [PATCH bpf-next 02/15] bpf: btf: Support parsing extern func

2021-03-22 Thread Martin KaFai Lau
On Sat, Mar 20, 2021 at 10:18:36AM -0700, Andrii Nakryiko wrote: > > From test_ksyms.c: > > [22] DATASEC '.ksyms' size=0 vlen=5 > > type_id=12 offset=0 size=1 > > type_id=13 offset=0 size=1 > > > > For extern, does it make sense for the libbpf to assign 0 to > > both var offset and size s

[PATCH] perf tools: Trivial spelling fixes

2021-03-22 Thread Bhaskar Chowdhury
s/succeded/succeeded/ five different places s/revsions/revisions/ Signed-off-by: Bhaskar Chowdhury --- tools/perf/util/header.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 20effdff76ce..97a0e

[PATCH] brcmfmac: A typo fix

2021-03-22 Thread Bhaskar Chowdhury
s/revsion/revision/ Signed-off-by: Bhaskar Chowdhury --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.h i

[PATCH] octeontx2-af: cn10k: Few mundane typos fixed

2021-03-22 Thread Bhaskar Chowdhury
s/preceeds/precedes/ .two different places s/rsponse/response/ s/cetain/certain/ s/precison/precision/ Signed-off-by: Bhaskar Chowdhury --- drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Richard Cochran
On Mon, Mar 22, 2021 at 08:36:26AM -0700, Vinicius Costa Gomes wrote: > After a long time, a couple of internal misunderstandings, fixing some > typos in the delay adjustment constants and better error handling, this > one shot method is working well. > > I will propose a new version, implementing

Re: [Patch bpf-next v6 02/12] skmsg: introduce a spinlock to protect ingress_msg

2021-03-22 Thread Cong Wang
On Mon, Mar 22, 2021 at 6:25 PM Yunsheng Lin wrote: > > On 2021/3/23 8:37, Cong Wang wrote: > > +static inline struct sk_msg *sk_psock_next_msg(struct sk_psock *psock, > > +struct sk_msg *msg) > > +{ > > + struct sk_msg *ret; > > Nit: > Use msg inste

Re: [PATCH v5 07/11] vdpa: Support transferring virtual addressing during DMA mapping

2021-03-22 Thread Jason Wang
在 2021/3/15 下午1:37, Xie Yongji 写道: This patch introduces an attribute for vDPA device to indicate whether virtual address can be used. If vDPA device driver set it, vhost-vdpa bus driver will not pin user page and transfer userspace virtual address instead of physical address during DMA mapping

Re: [PATCH v5 06/11] vdpa: factor out vhost_vdpa_pa_map()

2021-03-22 Thread Jason Wang
在 2021/3/15 下午1:37, Xie Yongji 写道: The upcoming patch is going to support VA mapping. So let's factor out the logic of PA mapping firstly to make the code more readable. Suggested-by: Jason Wang Signed-off-by: Xie Yongji Acked-by: Jason Wang While at it, I think it's better to factor ou

Re: [PATCH v5 03/11] vhost-vdpa: protect concurrent access to vhost device iotlb

2021-03-22 Thread Jason Wang
在 2021/3/15 下午1:37, Xie Yongji 写道: Use vhost_dev->mutex to protect vhost device iotlb from concurrent access. Fixes: 4c8cf318("vhost: introduce vDPA-based backend") Signed-off-by: Xie Yongji Acked-by: Jason Wang Please cc stable for next version. Thanks --- drivers/vhost/vdpa.c | 6

Re: [RFC 2/7] ath10k: Add support to process rx packet in thread

2021-03-22 Thread Ben Greear
On 3/22/21 6:20 PM, Brian Norris wrote: On Mon, Mar 22, 2021 at 4:58 PM Ben Greear wrote: On 7/22/20 6:00 AM, Felix Fietkau wrote: On 2020-07-22 14:55, Johannes Berg wrote: On Wed, 2020-07-22 at 14:27 +0200, Felix Fietkau wrote: I'm considering testing a different approach (with mt76 initia

[PATCH bpf-next v2 2/2] bpf: selftests: add tests for batched ops in LPM trie maps

2021-03-22 Thread Pedro Tammela
From: Pedro Tammela Uses the already existing infrastructure for testing batched ops. The testing code is essentially the same, with minor tweaks for this use case. Suggested-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela --- .../map_tests/lpm_trie_map_batch_ops.c (new) | 158

[PATCH bpf-next v2 0/2] add support for batched ops in LPM trie

2021-03-22 Thread Pedro Tammela
The patch itself is straightforward thanks to the infrastructure that is already in-place. The tests follows the other '*_map_batch_ops' tests with minor tweaks. v1 -> v2: Fixes for checkpatch warnings Pedro Tammela (2): bpf: add support for batched operations in LPM trie maps bpf: selftests

[PATCH bpf-next v2 1/2] bpf: add support for batched ops in LPM trie maps

2021-03-22 Thread Pedro Tammela
From: Pedro Tammela Suggested-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela --- kernel/bpf/lpm_trie.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/bpf/lpm_trie.c b/kernel/bpf/lpm_trie.c index cec792a17e5f..1b7b8a6f34ee 100644 --- a/kernel/bpf/lpm_trie.c +++ b/kernel/bpf/lp

Re: [PATCHv2 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-22 Thread Hangbin Liu
On Thu, Mar 18, 2021 at 03:19:47PM +0100, Toke Høiland-Jørgensen wrote: > Hangbin Liu writes: > > > On Wed, Mar 17, 2021 at 01:03:02PM +0100, Toke Høiland-Jørgensen wrote: > >> FYI, this no longer applies to bpf-next due to Björn's refactor in > >> commit: ee75aef23afe ("bpf, xdp: Restructure red

Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-22 Thread Randy Dunlap
On 3/22/21 6:05 PM, Alex Elder wrote: > It is possible for a 32 bit x86 build to use a 64 bit DMA address. > > There are two remaining spots where the IPA driver does a modulo > operation to check alignment of a DMA address, and under certain > conditions this can lead to a build error on i386 (at

Re: [PATCH v2 net 2/3] net: dsa: don't advertise 'rx-vlan-filter' if VLAN filtering not global

2021-03-22 Thread Florian Fainelli
On 3/20/2021 3:59 PM, Vladimir Oltean wrote: > From: Vladimir Oltean > > The blamed patch has removed the driver's ability to return -EOPNOTSUPP > in the .port_vlan_add method when called from .ndo_vlan_rx_add_vid > (unmassaged by DSA, -EOPNOTSUPP is a hard error for vlan_vid_add). > But we ha

[PATCH] net: can: Remove duplicate include of regmap.h

2021-03-22 Thread Wan Jiabing
linux/regmap.h has been included at line 13, so remove the duplicate one at line 14. Signed-off-by: Wan Jiabing --- drivers/net/can/m_can/tcan4x5x.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/can/m_can/tcan4x5x.h b/drivers/net/can/m_can/tcan4x5x.h index c66da829b795..e62c030

[PATCH] net: ethernet: Remove duplicate include of vhca_event.h

2021-03-22 Thread Wan Jiabing
vhca_event.h has been included at line 4, so remove the duplicate one at line 8. Signed-off-by: Wan Jiabing --- drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/hw_table.c b/drivers/net/ethernet/

[PATCH] net/smc: Simplify the return expression

2021-03-22 Thread zuoqilin1
From: zuoqilin Simplify the return expression of smc_ism_signal_shutdown(). Signed-off-by: zuoqilin --- net/smc/smc_ism.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c index 9c6e958..c3558cc 100644 --- a/net/smc/smc_ism.c +++ b/net

[PATCH] net: ethernet: indir_table.h is included twice

2021-03-22 Thread Wan Jiabing
indir_table.h has been included at line 41, so remove the duplicate one at line 43. Signed-off-by: Wan Jiabing --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-22 Thread Andrew Lunn
> > I don't even see a need for this. The offset should be within one 1/2 > page, of > > one bank. So offset >= 0 and <= 127. Length is also > 0 and > > <- 127. And offset+length is <= 127. > > I like the clean approach, but... How do you request low memory? Duh! I got my conditions wrong. Too

Re: [Patch bpf-next v6 02/12] skmsg: introduce a spinlock to protect ingress_msg

2021-03-22 Thread Yunsheng Lin
On 2021/3/23 8:37, Cong Wang wrote: > From: Cong Wang > > Currently we rely on lock_sock to protect ingress_msg, > it is too big for this, we can actually just use a spinlock > to protect this list like protecting other skb queues. > > __tcp_bpf_recvmsg() is still special because of peeking, > i

RE: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-22 Thread Don Bollinger
> Subject: Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to > dump arbitrary EEPROM data > > > > +#define ETH_MODULE_EEPROM_PAGE_LEN 256 > > > > Sorry to keep raising issues, but I think you want to make this > > constant 128. > > Yes, i also think the KAPI should be limite

Re: [RFC 2/7] ath10k: Add support to process rx packet in thread

2021-03-22 Thread Brian Norris
On Mon, Mar 22, 2021 at 4:58 PM Ben Greear wrote: > On 7/22/20 6:00 AM, Felix Fietkau wrote: > > On 2020-07-22 14:55, Johannes Berg wrote: > >> On Wed, 2020-07-22 at 14:27 +0200, Felix Fietkau wrote: > >> > >>> I'm considering testing a different approach (with mt76 initially): > >>> - Add a mac80

[PATCH net-next] net: ipa: avoid 64-bit modulus

2021-03-22 Thread Alex Elder
It is possible for a 32 bit x86 build to use a 64 bit DMA address. There are two remaining spots where the IPA driver does a modulo operation to check alignment of a DMA address, and under certain conditions this can lead to a build error on i386 (at least). The alignment checks we're doing are f

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-22 Thread Andrew Lunn
> +static int eeprom_prepare_data(const struct ethnl_req_info *req_base, > +struct ethnl_reply_data *reply_base, > +struct genl_info *info) > +{ > + struct eeprom_reply_data *reply = MODULE_EEPROM_REPDATA(reply_base); > + struct eeprom

[Patch bpf-next v6 12/12] selftests/bpf: add a test case for udp sockmap

2021-03-22 Thread Cong Wang
From: Cong Wang Add a test case to ensure redirection between two UDP sockets work. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- .../selftests/bpf/prog_tests/sockmap_listen.c | 140 ++ .../selftests/bpf/progs/test_s

[Patch bpf-next v6 10/12] udp: implement udp_bpf_recvmsg() for sockmap

2021-03-22 Thread Cong Wang
From: Cong Wang We have to implement udp_bpf_recvmsg() to replace the ->recvmsg() to retrieve skmsg from ingress_msg. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/ipv4/udp_bpf.c | 64

[Patch bpf-next v6 11/12] sock_map: update sock type checks for UDP

2021-03-22 Thread Cong Wang
From: Cong Wang Now UDP supports sockmap and redirection, we can safely update the sock type checks for it accordingly. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- net/core/sock_map.c | 5 - 1 file changed, 4 insertions(+), 1

[Patch bpf-next v6 09/12] skmsg: extract __tcp_bpf_recvmsg() and tcp_bpf_wait_data()

2021-03-22 Thread Cong Wang
From: Cong Wang Although these two functions are only used by TCP, they are not specific to TCP at all, both operate on skmsg and ingress_msg, so fit in net/core/skmsg.c very well. And we will need them for non-TCP, so rename and move them to skmsg.c and export them to modules. Cc: John Fastabe

[Patch bpf-next v6 06/12] sock_map: introduce BPF_SK_SKB_VERDICT

2021-03-22 Thread Cong Wang
From: Cong Wang Reusing BPF_SK_SKB_STREAM_VERDICT is possible but its name is confusing and more importantly we still want to distinguish them from user-space. So we can just reuse the stream verdict code but introduce a new type of eBPF program, skb_verdict. Users are not allowed to set stream_v

[Patch bpf-next v6 08/12] udp: implement ->read_sock() for sockmap

2021-03-22 Thread Cong Wang
From: Cong Wang This is similar to tcp_read_sock(), except we do not need to worry about connections, we just need to retrieve skb from UDP receive queue. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/net/udp.h | 2 ++ ne

[Patch bpf-next v6 03/12] skmsg: introduce skb_send_sock() for sock_map

2021-03-22 Thread Cong Wang
From: Cong Wang We only have skb_send_sock_locked() which requires callers to use lock_sock(). Introduce a variant skb_send_sock() which locks on its own, callers do not need to lock it any more. This will save us from adding a ->sendmsg_locked for each protocol. To reuse the code, pass function

[Patch bpf-next v6 05/12] skmsg: use rcu work for destroying psock

2021-03-22 Thread Cong Wang
From: Cong Wang The RCU callback sk_psock_destroy() only queues work psock->gc, so we can just switch to rcu work to simplify the code. Cc: John Fastabend Cc: Daniel Borkmann Cc: Jakub Sitnicki Cc: Lorenz Bauer Signed-off-by: Cong Wang --- include/linux/skmsg.h | 5 + net/core/skmsg.c

[Patch bpf-next v6 07/12] sock: introduce sk->sk_prot->psock_update_sk_prot()

2021-03-22 Thread Cong Wang
From: Cong Wang Currently sockmap calls into each protocol to update the struct proto and replace it. This certainly won't work when the protocol is implemented as a module, for example, AF_UNIX. Introduce a new ops sk->sk_prot->psock_update_sk_prot(), so each protocol can implement its own way

[Patch bpf-next v6 04/12] skmsg: avoid lock_sock() in sk_psock_backlog()

2021-03-22 Thread Cong Wang
From: Cong Wang We do not have to lock the sock to avoid losing sk_socket, instead we can purge all the ingress queues when we close the socket. Sending or receiving packets after orphaning socket makes no sense. We do purge these queues when psock refcnt reaches zero but here we want to purge t

[Patch bpf-next v6 02/12] skmsg: introduce a spinlock to protect ingress_msg

2021-03-22 Thread Cong Wang
From: Cong Wang Currently we rely on lock_sock to protect ingress_msg, it is too big for this, we can actually just use a spinlock to protect this list like protecting other skb queues. __tcp_bpf_recvmsg() is still special because of peeking, it still has to use lock_sock. Cc: John Fastabend C

[Patch bpf-next v6 01/12] skmsg: lock ingress_skb when purging

2021-03-22 Thread Cong Wang
From: Cong Wang Currently we purge the ingress_skb queue only when psock refcnt goes down to 0, so locking the queue is not necessary, but in order to be called during ->close, we have to lock it here. Cc: John Fastabend Cc: Daniel Borkmann Cc: Lorenz Bauer Acked-by: Jakub Sitnicki Signed-of

[Patch bpf-next v6 00/12] sockmap: introduce BPF_SK_SKB_VERDICT and support UDP

2021-03-22 Thread Cong Wang
From: Cong Wang We have thousands of services connected to a daemon on every host via AF_UNIX dgram sockets, after they are moved into VM, we have to add a proxy to forward these communications from VM to host, because rewriting thousands of them is not practical. This proxy uses an AF_UNIX socke

Re: [PATCH net-next] net: set initial device refcount to 1

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 22 Mar 2021 11:21:45 -0700 you wrote: > From: Eric Dumazet > > When adding CONFIG_PCPU_DEV_REFCNT, I forgot that the > initial net device refcount was 0. > > When CONFIG_PCPU_DEV_REFCNT is not set, this means > t

Re: [PATCH net-next 01/10] netfilter: flowtable: separate replace, destroy and stats to different workqueues

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 23 Mar 2021 00:56:19 +0100 you wrote: > From: Oz Shlomo > > Currently the flow table offload replace, destroy and stats work items are > executed on a single workqueue. As such, DESTROY and STATS commands may > b

Re: [PATCH net] net: dsa: don't assign an error value to tag_ops

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 22 Mar 2021 15:26:50 -0500 you wrote: > Use a temporary variable to hold the return value from > dsa_tag_driver_get() instead of assigning it to dst->tag_ops. Leaving > an error value in dst->tag_ops can result in defere

Re: [PATCH] isdn: capi: fix mismatched prototypes

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 22 Mar 2021 17:44:29 +0100 you wrote: > From: Arnd Bergmann > > gcc-11 complains about a prototype declaration that is different > from the function definition: > > drivers/isdn/capi/kcapi.c:724:44: error: argument 2

Re: [net 1/6] net/mlx5: Add back multicast stats for uplink representor

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (refs/heads/master): On Mon, 22 Mar 2021 13:25:19 -0700 you wrote: > From: Huy Nguyen > > The multicast counter got removed from uplink representor due to the > cited patch. > > Fixes: 47c97e6b10a1 ("net/mlx5e: Fix multicast counter not up-to-da

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-22 Thread Andrew Lunn
> > +#define ETH_MODULE_EEPROM_PAGE_LEN 256 > > Sorry to keep raising issues, but I think you want to make this constant > 128. Yes, i also think the KAPI should be limited to returning a maximum of a 1/2 page per call. > > +#define MODULE_EEPROM_MAX_OFFSET (257 * > > ETH_MODULE_EEPROM_PAGE_LEN)

Re: [PATCH] bpf: avoid old-style declaration warnings

2021-03-22 Thread KP Singh
On Mon, Mar 22, 2021 at 10:52 PM Arnd Bergmann wrote: > > From: Arnd Bergmann > > gcc -Wextra wants type modifiers in the normal order: > > kernel/bpf/bpf_lsm.c:70:1: error: 'static' is not at beginning of declaration > [-Werror=old-style-declaration] >70 | const static struct bpf_func_proto

Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation

2021-03-22 Thread Alex Elder
On 3/22/21 5:56 PM, Andrew Lunn wrote: The solution is to create a user space tool inside the drivers/net/ipa directory that will link with the kernel source files and will perform all the basic one-time checks I want to make. Hi Alex Have you found any other driver doing this? Where do they

Re: [RFC 2/7] ath10k: Add support to process rx packet in thread

2021-03-22 Thread Ben Greear
On 7/22/20 6:00 AM, Felix Fietkau wrote: On 2020-07-22 14:55, Johannes Berg wrote: On Wed, 2020-07-22 at 14:27 +0200, Felix Fietkau wrote: I'm considering testing a different approach (with mt76 initially): - Add a mac80211 rx function that puts processed skbs into a list instead of handing th

Re: [PATCH net-next] net: set initial device refcount to 1

2021-03-22 Thread David Miller
From: David Miller Date: Mon, 22 Mar 2021 16:55:26 -0700 (PDT) > From: Eric Dumazet > Date: Mon, 22 Mar 2021 11:21:45 -0700 > > This hunk: >> @@ -10682,6 +10682,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, >> const char *name, >> dev->pcpu_refcnt = alloc_percpu(int); >>

[PATCH net-next 10/10] netfilter: nftables: update table flags from the commit phase

2021-03-22 Thread Pablo Neira Ayuso
Do not update table flags from the preparation phase. Store the flags update into the transaction, then update the flags from the commit phase. Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_tables.h | 9 ++--- net/netfilter/nf_tables_api.c | 31 --

[PATCH net-next 08/10] netfilter: flowtable: call dst_check() to fall back to classic forwarding

2021-03-22 Thread Pablo Neira Ayuso
In case the route is stale, pass up the packet to the classic forwarding path for re-evaluation and schedule this flow entry for removal. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_flow_table_ip.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/net/ne

[PATCH net-next 07/10] netfilter: flowtable: fast NAT functions never fail

2021-03-22 Thread Pablo Neira Ayuso
Simplify existing fast NAT routines by returning void. After the skb_try_make_writable() call consolidation, these routines cannot ever fail. Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_flow_table.h | 12 +-- net/netfilter/nf_flow_table_core.c| 41 +++ net/netfilter/n

[PATCH net-next 05/10] netfilter: flowtable: move skb_try_make_writable() before NAT in IPv4

2021-03-22 Thread Pablo Neira Ayuso
For consistency with the IPv6 flowtable datapath and to make sure the skbuff is writable right before the NAT header updates. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_flow_table_ip.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/nf_flow_ta

[PATCH net-next 06/10] netfilter: flowtable: move FLOW_OFFLOAD_DIR_MAX away from enumeration

2021-03-22 Thread Pablo Neira Ayuso
This allows to remove the default case which should not ever happen and that was added to avoid gcc warnings on unhandled FLOW_OFFLOAD_DIR_MAX enumeration case. Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_flow_table.h | 2 +- net/netfilter/nf_flow_table_core.c| 4 net/

[PATCH net-next 09/10] netfilter: flowtable: refresh timeout after dst and writable checks

2021-03-22 Thread Pablo Neira Ayuso
Refresh the timeout (and retry hardware offload) once the skbuff dst is confirmed to be current and after the skbuff is made writable. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_flow_table_ip.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/netfilter/n

[PATCH net-next 04/10] netfilter: flowtable: consolidate skb_try_make_writable() call

2021-03-22 Thread Pablo Neira Ayuso
Fetch the layer 4 header size to be mangled by NAT when building the tuple, then use it to make writable the network and the transport headers. After this update, the NAT routines now assumes that the skbuff area is writable. Do the pointer refetch only after the single skb_try_make_writable() call

[PATCH net-next 03/10] netfilter: conntrack: Remove unused variable declaration

2021-03-22 Thread Pablo Neira Ayuso
From: YueHaibing commit e97c3e278e95 ("tproxy: split off ipv6 defragmentation to a separate module") left behind this. Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/ne

[PATCH net-next 02/10] netfilter: Fix fall-through warnings for Clang

2021-03-22 Thread Pablo Neira Ayuso
From: "Gustavo A. R. Silva" In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Florian Westphal S

[PATCH net-next 01/10] netfilter: flowtable: separate replace, destroy and stats to different workqueues

2021-03-22 Thread Pablo Neira Ayuso
From: Oz Shlomo Currently the flow table offload replace, destroy and stats work items are executed on a single workqueue. As such, DESTROY and STATS commands may be backloged after a burst of REPLACE work items. This scenario can bloat up memory and may cause active connections to age. Instatia

[PATCH net-next 00/10] Netfilter updates for net-next

2021-03-22 Thread Pablo Neira Ayuso
Hi, The following batch contains Netfilter updates for net-next: 1) Split flowtable workqueues per events, from Oz Shlomo. 2) fall-through warnings for clang, from Gustavo A. R. Silva 3) Remove unused declaration in conntrack, from YueHaibing. 4) Consolidate skb_try_make_writable() in flowtabl

Re: [PATCH net-next] net: set initial device refcount to 1

2021-03-22 Thread David Miller
From: Eric Dumazet Date: Mon, 22 Mar 2021 11:21:45 -0700 > From: Eric Dumazet > > When adding CONFIG_PCPU_DEV_REFCNT, I forgot that the > initial net device refcount was 0. > > When CONFIG_PCPU_DEV_REFCNT is not set, this means > the first dev_hold() triggers an illegal refcount > operation (a

[PATCH v4 net-next 11/11] net: ocelot: replay switchdev events when joining bridge

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean The premise of this change is that the switchdev port attributes and objects offloaded by ocelot might have been missed when we are joining an already existing bridge port, such as a bonding interface. The patch pulls these switchdev attributes and objects from the bridge,

[PATCH v4 net-next 07/11] net: dsa: pass extack to dsa_port_{bridge,lag}_join

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean This is a pretty noisy change that was broken out of the larger change for replaying switchdev attributes and objects at bridge join time, which is when these extack objects are actually used. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobia

[PATCH v4 net-next 09/11] net: dsa: sync up switchdev objects and port attributes when joining the bridge

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean If we join an already-created bridge port, such as a bond master interface, then we can miss the initial switchdev notifications emitted by the bridge for this port, while it wasn't offloaded by anybody. Signed-off-by: Vladimir Oltean --- net/dsa/dsa_priv.h | 3 +++ net/

[PATCH v4 net-next 10/11] net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean Similar to the DSA situation, ocelot supports LAG offload but treats this scenario improperly: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 We do the same thing as we do there, which is to simulate a 'br

[PATCH v4 net-next 08/11] net: dsa: inherit the actual bridge port flags at join time

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean DSA currently assumes that the bridge port starts off with this constellation of bridge port flags: - learning on - unicast flooding on - multicast flooding on - broadcast flooding on just by virtue of code copy-pasta from the bridge layer (new_nbp). This was a simple enou

[PATCH v4 net-next 06/11] net: dsa: call dsa_port_bridge_join when joining a LAG that is already in a bridge

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean DSA can properly detect and offload this sequence of operations: ip link add br0 type bridge ip link add bond0 type bond ip link set swp0 master bond0 ip link set bond0 master br0 But not this one: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0

[PATCH v4 net-next 05/11] net: bridge: add helper to replay VLANs installed on port

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean Currently this simple setup with DSA: ip link add br0 type bridge vlan_filtering 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 will not work because the bridge has created the PVID in br_add_if -> nbp_vlan_init, and it has notifie

[PATCH v4 net-next 03/11] net: bridge: add helper to replay port and host-joined mdb entries

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean I have a system with DSA ports, and udhcpcd is configured to bring interfaces up as soon as they are created. I create a bridge as follows: ip link add br0 type bridge As soon as I create the bridge and udhcpcd brings it up, I also have avahi which automatically starts se

[PATCH v4 net-next 02/11] net: bridge: add helper to retrieve the current ageing time

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute is only emitted from: sysfs/ioctl/netlink -> br_set_ageing_time -> __set_ageing_time therefore not at bridge port creation time, so: (a) switchdev drivers have to hardcode the initial value for the address ageing ti

[PATCH v4 net-next 04/11] net: bridge: add helper to replay port and local fdb entries

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean When a switchdev port starts offloading a LAG that is already in a bridge and has an FDB entry pointing to it: ip link set bond0 master br0 bridge fdb add dev bond0 00:01:02:03:04:05 master static ip link set swp0 master bond0 the switchdev driver will have no idea that th

[PATCH v4 net-next 01/11] net: bridge: add helper for retrieving the current bridge port STP state

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean It may happen that we have the following topology with DSA or any other switchdev driver with LAG offload: ip link add br0 type bridge stp_state 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 ip link set swp1 master bond0 STP decid

[PATCH v4 net-next 00/11] Better support for sandwiched LAGs with bridge and DSA

2021-03-22 Thread Vladimir Oltean
From: Vladimir Oltean Changes in v4: - Added missing EXPORT_SYMBOL_GPL - Using READ_ONCE(fdb->dst) - Split patches into (a) adding the bridge helpers (b) making DSA use them - br_mdb_replay went back to the v1 approach where it allocated memory in atomic context - Created a br_switchdev_mdb_pop

Re: [PATCH net-next 0/6] dpaa2-switch: offload bridge port flags to device

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Mon, 22 Mar 2021 22:58:53 +0200 you wrote: > From: Ioana Ciornei > > Add support for offloading bridge port flags to the switch. With this > patch set, the learning, broadcast flooding and unknown ucast/mcast > floodi

Re: [PATCH v4 0/3] net: dsa: lantiq: add support for xRX300 and xRX330

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Mon, 22 Mar 2021 21:37:14 +0100 you wrote: > Changed since v3: > * fixed last compilation warning > > Changed since v2: > * fixed compilation warnings > * removed example bindings for xrx330 > *

Re: [PATCH net-next 00/18][pull request] 100GbE Intel Wired LAN Driver Updates 2021-03-22

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Mon, 22 Mar 2021 13:32:26 -0700 you wrote: > This series contains updates to ice and iavf drivers. > > Haiyue Wang says: > > The Intel E810 Series supports a programmable pipeline for a domain > specific protocols cla

Re: [PATCH net] net: ipconfig: ic_dev can be NULL in ic_close_devs

2021-03-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 22 Mar 2021 02:26:37 +0200 you wrote: > From: Vladimir Oltean > > ic_close_dev contains a generalization of the logic to not close a > network interface if it's the host port for a DSA switch. This logic is > disguised

Re: [PATCH v3 2/3] net: ethernet: actions: Add Actions Semi Owl Ethernet MAC driver

2021-03-22 Thread Andrew Lunn
> +static void owl_emac_set_multicast(struct net_device *netdev, int count) > +{ > + struct owl_emac_priv *priv = netdev_priv(netdev); > + struct netdev_hw_addr *ha; > + int index = 0; > + > + if (count <= 0) { > + priv->mcaddr_list.count = 0; > + return; > +

Re: [PATCH net] net: dsa: don't assign an error value to tag_ops

2021-03-22 Thread Florian Fainelli
On 3/22/2021 1:26 PM, George McCollister wrote: > Use a temporary variable to hold the return value from > dsa_tag_driver_get() instead of assigning it to dst->tag_ops. Leaving > an error value in dst->tag_ops can result in deferencing an invalid > pointer when a deferred switch configuration ha

Re: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-22 Thread Ingo Molnar
* Martin Sebor wrote: > > I.e. the real workaround might be to turn off the > > -Wstringop-overread-warning, > > until GCC-11 gets fixed? > > In GCC 10 -Wstringop-overread is a subset of -Wstringop-overflow. > GCC 11 breaks it out as a separate warning to make it easier to > control. Both wa

Re: [RFC net-next 1/2] dt-bindings: ethernet-controller: create a type for PHY interface modes

2021-03-22 Thread Marek Behún
On Mon, 22 Mar 2021 22:11:04 +0100 Andrew Lunn wrote: > On Mon, Mar 22, 2021 at 08:49:58PM +0100, Marek Behún wrote: > > In order to be able to define a property describing an array of PHY > > interface modes, we need to change the current scalar > > `phy-connection-type`, which lists the possibl

Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation

2021-03-22 Thread Andrew Lunn
> The solution is to create a user space tool inside the > drivers/net/ipa directory that will link with the kernel > source files and will perform all the basic one-time checks > I want to make. Hi Alex Have you found any other driver doing this? Where do they keep there code? Could this be a

Re: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-22 Thread Arnd Bergmann
On Mon, Mar 22, 2021 at 11:09 PM Martin Sebor wrote: > On 3/22/21 2:29 PM, Ingo Molnar wrote: > > * Arnd Bergmann wrote: > > > > I.e. the real workaround might be to turn off the > > -Wstringop-overread-warning, > > until GCC-11 gets fixed? > > In GCC 10 -Wstringop-overread is a subset of -Wstri

Re: [RFC PATCH v2 net-next 14/16] net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge

2021-03-22 Thread Vladimir Oltean
On Mon, Mar 22, 2021 at 04:04:01PM +0800, DENG Qingfang wrote: > On Fri, Mar 19, 2021 at 6:49 PM Vladimir Oltean wrote: > > Why would you even want to look at the source net device for forwarding? > > I'd say that if dp->bridge_dev is NULL in the xmit function, you certainly > > want to bypass add

Re: [PATCH v2 00/10] Rid W=1 warnings from OF

2021-03-22 Thread Rob Herring
On Thu, Mar 18, 2021 at 4:40 AM Lee Jones wrote: > > This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnings. > > v2: > - Provided some descriptions to exported functions > > Lee Jones (10): > of: d

Re: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-22 Thread Martin Sebor
On 3/22/21 2:29 PM, Ingo Molnar wrote: * Arnd Bergmann wrote: From: Arnd Bergmann gcc-11 warns about using string operations on pointers that are defined at compile time as offsets from a NULL pointer. Unfortunately that also happens on the result of fix_to_virt(), which is a compile-time c

[PATCH] bpf: avoid old-style declaration warnings

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann gcc -Wextra wants type modifiers in the normal order: kernel/bpf/bpf_lsm.c:70:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 70 | const static struct bpf_func_proto bpf_bprm_opts_set_proto = { | ^ kernel/bpf/bpf_lsm.c:91:1:

[PATCH net-next] iwlwifi: fix old-style-declaration warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann The correct order is 'static const', not 'const static', as seen from make W=1: drivers/net/wireless/intel/iwlwifi/mvm/rfi.c:14:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] Fixes: 21254908cbe9 ("iwlwifi: mvm: add RFI-M support") Sign

Re: [PATCH v3 bpf-next 06/17] libbpf: xsk: use bpf_link

2021-03-22 Thread Toke Høiland-Jørgensen
Maciej Fijalkowski writes: > Currently, if there are multiple xdpsock instances running on a single > interface and in case one of the instances is terminated, the rest of > them are left in an inoperable state due to the fact of unloaded XDP > prog from interface. > > Consider the scenario below

Re: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

2021-03-22 Thread Arnd Bergmann
On Mon, Mar 22, 2021 at 9:29 PM Ingo Molnar wrote: > * Arnd Bergmann wrote: > > From: Arnd Bergmann > This is indeed rather ugly - and the other patch that removes a debug > check seems counterproductive as well. > > Do we know how many genuine bugs -Wstringop-overread-warning has > caught or i

Re: [PATCH 1/2] neighbour: allow referenced neighbours to be removed

2021-03-22 Thread Thadeu Lima de Souza Cascardo
On Wed, Mar 17, 2021 at 05:42:00PM -0600, David Ahern wrote: > On 3/17/21 12:53 PM, Thadeu Lima de Souza Cascardo wrote: > > During forced garbage collection, neighbours with more than a reference are > > not removed. It's possible to DoS the neighbour table by using ARP spoofing > > in such a way

Re: [RFC net-next 1/2] dt-bindings: ethernet-controller: create a type for PHY interface modes

2021-03-22 Thread Andrew Lunn
On Mon, Mar 22, 2021 at 08:49:58PM +0100, Marek Behún wrote: > In order to be able to define a property describing an array of PHY > interface modes, we need to change the current scalar > `phy-connection-type`, which lists the possible PHY interface modes, to > an array of length 1 (otherwise we w

[PATCH v3 bpf-next 11/17] selftests: xsk: refactor teardown/bidi test cases and testapp_validate

2021-03-22 Thread Maciej Fijalkowski
Currently, there is a testapp_sockets() that acts like a wrapper around testapp_validate() and it is called for bidi and teardown test types. Other test types call testapp_validate() directly. Split testapp_sockets() onto two separate functions so a bunch of bidi specific logic can be moved there

[PATCH v3 bpf-next 12/17] selftests: xsk: remove sync_mutex_tx and atomic var

2021-03-22 Thread Maciej Fijalkowski
Although thread_common_ops() are called in both Tx and Rx threads, testapp_validate() will not spawn Tx thread until Rx thread signals that it has finished its initialization via condition variable. Therefore, locking in thread_common_ops is not needed and furthermore Tx thread does not have to sp

[PATCH v3 bpf-next 10/17] selftests: xsk: remove Tx synchronization resources

2021-03-22 Thread Maciej Fijalkowski
Tx thread needs to be started after the Rx side is fully initialized so that packets are not xmitted until xsk Rx socket is ready to be used. It can be observed that atomic variable spinning_tx is not checked from Rx side in any way, so thread_common_ops can be modified to only address the spinnin

  1   2   3   4   >