[PATCH net-next v2 0/3] devlink: Introduce PCI PF, VF ports and attributes

2019-07-05 Thread Parav Pandit
This patchset carry forwards the work initiated in [1] and discussion futher concluded at [2]. To improve visibility of representor netdevice, its association with PF or VF, physical port, two new devlink port flavours are added as PCI PF and PCI VF ports. A sample eswitch view can be seen below,

[PATCH net-next v2 3/3] net/mlx5e: Register devlink ports for physical link, PCI PF, VFs

2019-07-05 Thread Parav Pandit
Register devlink port of physical port, PCI PF and PCI VF flavour for each PF, VF when a given devlink instance is in switchdev mode. Implement ndo_get_devlink_port callback API to make use of registered devlink ports. This eliminates ndo_get_phys_port_name() and ndo_get_port_parent_id() callbacks

[PATCH net-next v2 2/3] devlink: Introduce PCI VF port flavour and port attribute

2019-07-05 Thread Parav Pandit
In an eswitch, PCI VF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with VF, and its representor netdevice, introduce a PCI VF port flavour. When devlink port flavour is PCI VF, fill up PCI VF attributes of the

[PATCH net-next v2 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-05 Thread Parav Pandit
In an eswitch, PCI PF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with PF and a representor netdevice, introduce a PCI PF port flavour and port attriute. When devlink port flavour is PCI PF, fill up PCI PF at

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
Hello Willem, On Mon, Jul 01, 2019 at 11:12:06AM -0400, Willem de Bruijn wrote: > On Mon, Jul 1, 2019 at 6:05 AM Antoine Tenart > wrote: > > > void ocelot_deinit(struct ocelot *ocelot) > > { > > + struct ocelot_port *port; > > + struct ocelot_skb *entry; > > + struct list_hea

Re: bug: tpacket_snd can cause data corruption

2019-07-05 Thread Frank de Brabander
On 05-07-19 00:59, Willem de Bruijn wrote: Can you reproduce the issue when running the modified test in a network namespace (./in_netns.sh ./txring_overwrite)? But even when running the test with ./in_netns.sh it shows "wrong pattern", this time without length mismatches: wrong pattern: 0x62

[PATCH net-next] nfp: tls: fix error return code in nfp_net_tls_add()

2019-07-05 Thread Wei Yongjun
Fix to return negative error code -EINVAL from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/netronome/nfp/crypto/tls.c | 1 + 1 file changed, 1 inserti

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
2019-07-04 22:49 UTC-0700 ~ Y Song > On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet > wrote: >> >> Add a new "bpftool prog run" subcommand to run a loaded program on input >> data (and possibly with input context) passed by the user. >> >> Print output data (and output context if relevant) into a

RE: [EXT] Re: [PATCH net-next v2 4/4] qed*: Add devlink support for configuration attributes.

2019-07-05 Thread Sudarsana Reddy Kalluru
> -Original Message- > From: Jakub Kicinski > Sent: Friday, July 5, 2019 3:38 AM > To: Sudarsana Reddy Kalluru > Cc: da...@davemloft.net; netdev@vger.kernel.org; Michal Kalderon > ; Ariel Elior ; Jiri Pirko > > Subject: [EXT] Re: [PATCH net-next v2 4/4] qed*: Add devlink support for > co

[PATCH 4/7] ipsec: select crypto ciphers for xfrm_algo

2019-07-05 Thread Steffen Klassert
From: Arnd Bergmann kernelci.org reports failed builds on arc because of what looks like an old missed 'select' statement: net/xfrm/xfrm_algo.o: In function `xfrm_probe_algs': xfrm_algo.c:(.text+0x1e8): undefined reference to `crypto_has_ahash' I don't see this in randconfig builds on other arc

[PATCH 3/7] xfrm: fix sa selector validation

2019-07-05 Thread Steffen Klassert
From: Nicolas Dichtel After commit b38ff4075a80, the following command does not work anymore: $ ip xfrm state add src 10.125.0.2 dst 10.125.0.1 proto esp spi 34 reqid 1 \ mode tunnel enc 'cbc(aes)' 0xb0abdba8b782ad9d364ec81e3a7d82a1 auth-trunc \ 'hmac(sha1)' 0xe26609ebd00acb6a4d51fca13e49ea78

[PATCH 5/7] xfrm: remove a duplicated assignment

2019-07-05 Thread Steffen Klassert
From: Cong Wang Fixes: 30846090a746 ("xfrm: policy: add sequence count to sync with hash resize") Cc: Florian Westphal Cc: Steffen Klassert Signed-off-by: Cong Wang Signed-off-by: Steffen Klassert --- net/xfrm/xfrm_policy.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/xfrm/xfrm

[PATCH 6/7] xfrm: policy: fix bydst hlist corruption on hash rebuild

2019-07-05 Thread Steffen Klassert
From: Florian Westphal syzbot reported following spat: BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:221 BUG: KASAN: use-after-free in hlist_del_rcu include/linux/rculist.h:455 BUG: KASAN: use-after-free in xfrm_hash_rebuild+0xa0d/0x1000 net/xfrm/xfrm_policy.c:1318 Wr

[PATCH 7/7] xfrm interface: fix memory leak on creation

2019-07-05 Thread Steffen Klassert
From: Nicolas Dichtel The following commands produce a backtrace and return an error but the xfrm interface is created (in the wrong netns): $ ip netns add foo $ ip netns add bar $ ip -n foo netns set bar 0 $ ip -n foo link add xfrmi0 link-netnsid 0 type xfrm dev lo if_id 23 RTNETLINK answers: In

[PATCH 1/7] xfrm: Fix xfrm sel prefix length validation

2019-07-05 Thread Steffen Klassert
From: Anirudh Gupta Family of src/dst can be different from family of selector src/dst. Use xfrm selector family to validate address prefix length, while verifying new sa from userspace. Validated patch with this command: ip xfrm state add src 1.1.6.1 dst 1.1.6.2 proto esp spi 4260196 \ reqid 20

pull request (net): ipsec 2019-07-05

2019-07-05 Thread Steffen Klassert
1) Fix xfrm selector prefix length validation for inter address family tunneling. From Anirudh Gupta. 2) Fix a memleak in pfkey. From Jeremy Sowden. 3) Fix SA selector validation to allow empty selectors again. From Nicolas Dichtel. 4) Select crypto ciphers for xfrm_algo, this fix

[PATCH 2/7] af_key: fix leaks in key_pol_get_resp and dump_sp.

2019-07-05 Thread Steffen Klassert
From: Jeremy Sowden In both functions, if pfkey_xfrm_policy2msg failed we leaked the newly allocated sk_buff. Free it on error. Fixes: 55569ce256ce ("Fix conversion between IPSEC_MODE_xxx and XFRM_MODE_xxx.") Reported-by: syzbot+4f0529365f7f2208d...@syzkaller.appspotmail.com Signed-off-by: Jere

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
Hello Eric, On Mon, Jul 01, 2019 at 05:54:41PM +0200, Eric Dumazet wrote: > On 7/1/19 8:12 AM, Willem de Bruijn wrote: > > On Mon, Jul 1, 2019 at 6:05 AM Antoine Tenart > > wrote: > >> > >> void ocelot_deinit(struct ocelot *ocelot) > >> { > >> + struct ocelot_port *port; > >> + stru

Re: [PATCH net-next 01/16] qlge: Remove irq_cnt

2019-07-05 Thread Benjamin Poirier
On 2019/06/26 13:21, Manish Chopra wrote: > > In msix mode there's no need to explicitly disable completion interrupts, > > they > > are reliably auto-masked, according to my observations. > > I tested this on two QLE8142 adapters. > > > > Do you have reason to believe this might not always be th

[PATCH 6/9] xfrm: remove type and offload_type map from xfrm_state_afinfo

2019-07-05 Thread Steffen Klassert
From: Florian Westphal Only a handful of xfrm_types exist, no need to have 512 pointers for them. Reduces size of afinfo struct from 4k to 120 bytes on 64bit platforms. Also, the unregister function doesn't need to return an error, no single caller does anything useful with it. Just place a WA

[PATCH 9/9] xfrm: remove get_mtu indirection from xfrm_type

2019-07-05 Thread Steffen Klassert
From: Florian Westphal esp4_get_mtu and esp6_get_mtu are exactly the same, the only difference is a single sizeof() (ipv4 vs. ipv6 header). Merge both into xfrm_state_mtu() and remove the indirection. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h

[PATCH 7/9] xfrm: fix bogus WARN_ON with ipv6

2019-07-05 Thread Steffen Klassert
From: Florian Westphal net/xfrm/xfrm_input.c:378:17: warning: this statement may fall through [-Wimplicit-fallthrough=] skb->protocol = htons(ETH_P_IPV6); ... the fallthrough then causes a bogus WARN_ON(). Reported-by: Stephen Rothwell Fixes: 4c203b0454b ("xfrm: remove eth_proto value from xf

[PATCH 3/9] xfrm: remove init_flags indirection from xfrm_state_afinfo

2019-07-05 Thread Steffen Klassert
From: Florian Westphal There is only one implementation of this function; just call it directly. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 1 - net/ipv4/xfrm4_state.c | 8 net/xfrm/xfrm_state.c | 17 +++-- 3 files chan

pull request (net-next): ipsec-next 2019-07-05

2019-07-05 Thread Steffen Klassert
1) A lot of work to remove indirections from the xfrm code. From Florian Westphal. 2) Fix a WARN_ON with ipv6 that triggered because of a forgotten break statement. From Florian Westphal. 3) Remove xfrmi_init_net, it is not needed. From Li RongQing. Please pull or let me know if there

[PATCH 2/9] xfrm: remove init_temprop indirection from xfrm_state_afinfo

2019-07-05 Thread Steffen Klassert
From: Florian Westphal same as previous patch: just place this in the caller, no need to have an indirection for a structure initialization. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 4 net/ipv4/xfrm4_state.c | 16 net/

[PATCH 5/9] xfrm: remove eth_proto value from xfrm_state_afinfo

2019-07-05 Thread Steffen Klassert
From: Florian Westphal xfrm_prepare_input needs to lookup the state afinfo backend again to fetch the address family ethernet protocol value. There are only two address families, so a switch statement is simpler. While at it, use u8 for family and proto and remove the owner member -- its not use

[PATCH 4/9] xfrm: remove state and template sort indirections from xfrm_state_afinfo

2019-07-05 Thread Steffen Klassert
From: Florian Westphal No module dependency, placing this in xfrm_state.c avoids need for an indirection. This also removes the state spinlock -- I don't see why we would need to hold it during sorting. This in turn allows to remove the 'net' argument passed to xfrm_tmpl_sort. Last, remove the

[PATCH 8/9] xfrm: remove empty xfrmi_init_net

2019-07-05 Thread Steffen Klassert
From: Li RongQing Pointer members of an object with static storage duration, if not explicitly initialized, will be initialized to a NULL pointer. The net namespace API checks if this pointer is not NULL before using it, it are safe to remove the function. Signed-off-by: Li RongQing Signed-off-

[PATCH 1/9] xfrm: remove init_tempsel indirection from xfrm_state_afinfo

2019-07-05 Thread Steffen Klassert
From: Florian Westphal Simple initialization, handle it in the caller. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert --- include/net/xfrm.h | 2 -- net/ipv4/xfrm4_state.c | 19 -- net/ipv6/xfrm6_state.c | 21 net/xfrm/xfrm_state.c | 56

[PATCH v3 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-05 Thread Benedikt Spranger
Document DSA tagged and VLAN based switch configuration by showcases. Signed-off-by: Benedikt Spranger Reviewed-by: Andrew Lunn --- .../networking/dsa/configuration.rst | 292 ++ Documentation/networking/dsa/index.rst| 1 + 2 files changed, 293 insertions(+)

[PATCH v3 0/2] Document the configuration of b53

2019-07-05 Thread Benedikt Spranger
this is the third round to document the configuration of a b53 supported switch. Thanks for the comments. Regards Bene Spranger v3..v2: - fix a typo - improve b53 configuration in DSA_TAG_PROTO_NONE showcase. - grade up from RFC to patch for mainline inclusion. v1..v2: - split out generic p

[PATCH v3 2/2] Documentation: net: dsa: b53: Describe b53 configuration

2019-07-05 Thread Benedikt Spranger
Document the different needs of documentation for the b53 driver. Signed-off-by: Benedikt Spranger --- Documentation/networking/dsa/b53.rst | 183 + Documentation/networking/dsa/index.rst | 1 + 2 files changed, 184 insertions(+) create mode 100644 Documentation/netw

[net-next, PATCH, v3] net: netsec: Sync dma for device on buffer allocation

2019-07-05 Thread Ilias Apalodimas
Quoting Arnd, We have to do a sync_single_for_device /somewhere/ before the buffer is given to the device. On a non-cache-coherent machine with a write-back cache, there may be dirty cache lines that get written back after the device DMA's data into it (e.g. from a previous memset from before the b

[PATCH] selftests: txring_overwrite: fix incorrect test of mmap() return value

2019-07-05 Thread Frank de Brabander
If mmap() fails it returns MAP_FAILED, which is defined as ((void *) -1). The current if-statement incorrectly tests if *ring is NULL. Signed-off-by: Frank de Brabander --- tools/testing/selftests/net/txring_overwrite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/te

Re: [net-next, PATCH, v3] net: netsec: Sync dma for device on buffer allocation

2019-07-05 Thread Jesper Dangaard Brouer
On Fri, 5 Jul 2019 13:47:47 +0300 Ilias Apalodimas wrote: > Quoting Arnd, > We have to do a sync_single_for_device /somewhere/ before the > buffer is given to the device. On a non-cache-coherent machine with > a write-back cache, there may be dirty cache lines that get written back > after the d

[PATCHv2] tools bpftool: Fix json dump crash on powerpc

2019-07-05 Thread Jiri Olsa
On Thu, Jul 04, 2019 at 01:42:10PM -0700, Jakub Kicinski wrote: > On Thu, 4 Jul 2019 10:58:56 +0200, Jiri Olsa wrote: > > Michael reported crash with by bpf program in json mode on powerpc: > > > > # bpftool prog -p dump jited id 14 > > [{ > > "name": "0xda9aa760", > >

Re: i.mx6ul with DSA in multi chip addressing mode - no MDIO access

2019-07-05 Thread Benjamin Beckmeyer
>> &mdio0 { >> interrupt-parent = <&gpio1>; >> interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; >> >> switch0: switch0@2 { >> compatible = "marvell,mv88e6190"; >> reg = <2>; >> pinctrl-0 = <&pinctrl_gpios>; >> reset-gpios

[PATCH net-next] MAINTAINERS: Add page_pool maintainer entry

2019-07-05 Thread Jesper Dangaard Brouer
In this release cycle the number of NIC drivers using page_pool will likely reach 4 drivers. It is about time to add a maintainer entry. Add myself. Signed-off-by: Jesper Dangaard Brouer --- MAINTAINERS |7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS ind

[PATCH net-next V2] MAINTAINERS: Add page_pool maintainer entry

2019-07-05 Thread Jesper Dangaard Brouer
In this release cycle the number of NIC drivers using page_pool will likely reach 4 drivers. It is about time to add a maintainer entry. Add myself and Ilias. Signed-off-by: Jesper Dangaard Brouer --- V2: Ilias also volunteered to co-maintain over IRC MAINTAINERS |8 1 file chang

Re: [PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-05 Thread Antoine Tenart
Hi Andrew, On Mon, Jul 01, 2019 at 03:52:14PM +0200, Andrew Lunn wrote: > On Mon, Jul 01, 2019 at 12:03:20PM +0200, Antoine Tenart wrote: > > One additional register range needs to be described within the Ocelot > > device tree node: the PTP. This patch documents the binding needed to do > > so. >

Request for backport of 96125bf9985a75db00496dd2bc9249b777d2b19b

2019-07-05 Thread Loganaden Velvindron
Hi folks, I read the guidelines for LTS/stable. https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html Although this is not a bugfix, I am humbly submitting a request so that commit id -- 96125bf9985a75db00496dd2bc9249b777d2b19b Allow 0.0.0.0/8 as a valid address range -- is ba

Re: NEIGH: BUG, double timer add, state is 8

2019-07-05 Thread David Ahern
On 7/4/19 3:59 PM, Marek Majkowski wrote: > I found a way to hit an obscure BUG in the > net/core/neighbour.c:neigh_add_timer(), by piping two carefully > crafted messages into AF_NETLINK socket. > > https://github.com/torvalds/linux/blob/v5.2-rc7/net/core/neighbour.c#L259 > > if (unlikely(mo

Re: [net-next 14/14] net/mlx5e: Add kTLS TX HW offload support

2019-07-05 Thread Tariq Toukan
On 7/4/2019 11:12 PM, Jakub Kicinski wrote: > On Thu, 4 Jul 2019 18:16:15 +, Saeed Mahameed wrote: >> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c >> b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c >> index 483d321d2151..6854f132d505 100644 >> --- a/drivers/net/ethern

Re: [PATCH bpf-next v3] libbpf: add xsk_ring_prod__nb_free() function

2019-07-05 Thread Daniel Borkmann
On 07/03/2019 02:52 PM, Eelco Chaudron wrote: > When an AF_XDP application received X packets, it does not mean X > frames can be stuffed into the producer ring. To make it easier for > AF_XDP applications this API allows them to check how many frames can > be added into the ring. > > Signed-off-b

Re: i.mx6ul with DSA in multi chip addressing mode - no MDIO access

2019-07-05 Thread Andrew Lunn
On Fri, Jul 05, 2019 at 02:41:43PM +0200, Benjamin Beckmeyer wrote: > >> &mdio0 { > >> interrupt-parent = <&gpio1>; > >> interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; > >> > >> switch0: switch0@2 { > >> compatible = "marvell,mv88e6190"; > >> reg = <2>

Re: [PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-05 Thread Andrew Lunn
On Fri, Jul 05, 2019 at 03:30:16PM +0200, Antoine Tenart wrote: > Hi Andrew, > > On Mon, Jul 01, 2019 at 03:52:14PM +0200, Andrew Lunn wrote: > > On Mon, Jul 01, 2019 at 12:03:20PM +0200, Antoine Tenart wrote: > > > One additional register range needs to be described within the Ocelot > > > device

Re: [PATCH net-next v6 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-05 Thread Roman Mashak
John Hurley writes: > Add a new series of selftests to verify the functionality of act_mpls in > TC. > > Signed-off-by: John Hurley > Reviewed-by: Simon Horman > Acked-by: Jakub Kicinski > --- > tools/testing/selftests/tc-testing/config | 1 + > .../tc-testing/tc-tests/actions/mpls

[PATCH net-next 11/12] net/mlx5e: Introduce a fenced NOP WQE posting function

2019-07-05 Thread Tariq Toukan
Similar to the existing mlx5e_post_nop(), but marks a fence in the WQE control segment. Added as a separate new function to not hurt the performance of the common case. To be used in a downstream patch of the series. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed

[PATCH net-next 04/12] net/mlx5: Accel, Add core TLS support for the Connect-X family

2019-07-05 Thread Tariq Toukan
Add support for the new TLS implementation of the Connect-X family. Introduce a new compilation flag MLX5_TLS for it. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/Kconfig| 13 +- .../net/ethernet/me

[PATCH net-next 03/12] net/mlx5: Add crypto library to support create/destroy encryption key

2019-07-05 Thread Tariq Toukan
Encryption key create / destroy is done via CREATE_GENERAL_OBJECT / DESTROY_GENERAL_OBJECT commands. To be used in downstream patches by TLS API wrappers, to configure the TIS context with the encryption key. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahame

[PATCH net-next 10/12] net/mlx5e: Re-work TIS creation functions

2019-07-05 Thread Tariq Toukan
Let the EN TIS creation function (mlx5e_create_tis) be responsible for applying common mdev related fields. Other specific fields must be set by the caller and passed within the inbox. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed --- drivers/net/etherne

[PATCH net-next 01/12] net/mlx5: Accel, Expose accel wrapper for IPsec FPGA function

2019-07-05 Thread Tariq Toukan
Do not directly call fpga version of IPsec function from main.c. Wrap it by an accel version, and call the wrapper. This will allow deprecating the FPGA IPsec stubs in downstream patch. Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed --- drivers/net/ether

[PATCH net-next 06/12] net/mlx5e: Tx, Enforce L4 inline copy when needed

2019-07-05 Thread Tariq Toukan
When ctrl->tisn field exists, this indicates an operation (HW offload) on the TCP payload. For such WQEs, inline the headers up to L4. This is in preparation for kTLS HW offload support, added in a downstream patch. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethe

[PATCH net-next 09/12] net/mlx5e: Tx, Unconstify SQ stop room

2019-07-05 Thread Tariq Toukan
Use an SQ field for stop_room, and use the larger value only if TLS is supported. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 14 ++ drivers/net/ethernet/m

[PATCH net-next 08/12] net/mlx5e: Tx, Don't implicitly assume SKB-less wqe has one WQEBB

2019-07-05 Thread Tariq Toukan
From: Eran Ben Elisha When polling a CQE of an SKB-less WQE, don't assume it consumed only one WQEBB. Use wi->num_wqebbs directly instead. In the downstream patch, SKB-less WQEs might have more the one WQEBB, thus this change is needed. Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan

[PATCH net-next 02/12] net/mlx5: Kconfig, Better organize compilation flags

2019-07-05 Thread Tariq Toukan
Always contain all acceleration functions declarations in 'accel' files, independent to the flags setting. For this, introduce new flags CONFIG_FPGA_{IPSEC/TLS} and use stubs where needed. This obsoletes the need for stubs in 'fpga' files. Remove them. Also use the new flags in Makefile, to decid

[PATCH net-next 05/12] net/mlx5e: Move helper functions to a new txrx datapath header

2019-07-05 Thread Tariq Toukan
Take datapath helper functions to a new header file en/txrx.h. Signed-off-by: Tariq Toukan Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 102 - drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 163 +

[PATCH net-next 07/12] net/mlx5e: Tx, Make SQ WQE fetch function type generic

2019-07-05 Thread Tariq Toukan
Change mlx5e_sq_fetch_wqe to be agnostic to the Work Queue Element (WQE) type. Before this patch, it was specific for struct mlx5e_tx_wqe. In order to allow the change, the function now returns the generic void pointer, and gets the WQE size to do the zero memset. Signed-off-by: Tariq Toukan Sig

[PATCH net-next 12/12] net/mlx5e: Add kTLS TX HW offload support

2019-07-05 Thread Tariq Toukan
Add support for transmit side kernel-TLS acceleration. Offload the crypto encryption to HW. Per TLS connection: - Use a separate TIS to maintain the HW context. - Use a separate encryption key. - Maintain static and progress HW contexts by posting the proper WQEs at creation time, or upon resync

[PATCH net-next 00/12] mlx5 TLS TX HW offload support

2019-07-05 Thread Tariq Toukan
Hi Dave, This series from Eran and me, adds TLS TX HW offload support to the mlx5 driver. This offloads the kTLS encryption process from kernel to the Mellanox NIC, saving CPU cycles and improving utilization. Upon a new TLS connection request, driver is responsible to create a dedicated HW con

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-05 Thread David Ahern
On 7/4/19 1:24 PM, David Miller wrote: > From: Ido Schimmel > Date: Thu, 4 Jul 2019 19:26:38 +0300 > >> Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer >> or an error pointer, but the code currently checks that the pointer is >> not NULL. > ... >> @@ -447,7 +447,7 @@ st

Re: [selftests/bpf] 6135bdd95f: kernel_selftests.bpf.test_offload.py.fail

2019-07-05 Thread Andrii Nakryiko
On Fri, Jul 5, 2019 at 12:43 AM kernel test robot wrote: > > FYI, we noticed the following commit (built with gcc-7): > > commit: 6135bdd95f26fe417db4e46d1e517de41e0ab9c1 ("[PATCH v2 bpf-next 4/4] > selftests/bpf: convert legacy BPF maps to BTF-defined ones") > url: > https://github.com/0day-ci/

Re: [PATCH v3 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-05 Thread Florian Fainelli
On 7/5/2019 2:57 AM, Benedikt Spranger wrote: > Document DSA tagged and VLAN based switch configuration by showcases. > > Signed-off-by: Benedikt Spranger > Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v3 2/2] Documentation: net: dsa: b53: Describe b53 configuration

2019-07-05 Thread Florian Fainelli
On 7/5/2019 2:57 AM, Benedikt Spranger wrote: > Document the different needs of documentation for the b53 driver. > > Signed-off-by: Benedikt Spranger Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Y Song
On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet wrote: > > 2019-07-04 22:49 UTC-0700 ~ Y Song > > On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet > > wrote: > >> > >> Add a new "bpftool prog run" subcommand to run a loaded program on input > >> data (and possibly with input context) passed by the us

Re: [PATCH rdma-next v5 00/17] Statistics counter support

2019-07-05 Thread Jason Gunthorpe
On Tue, Jul 02, 2019 at 01:02:29PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Changelog: > v4 -> v5: > * Patch #6 and #14 - consolidated many counter release functions, >removed mutex lock protection from dealloc_counter() call >and simplified kref_put/kref_get operations

[PATCH v5 bpf-next 1/4] libbpf: capture value in BTF type info for BTF-defined map defs

2019-07-05 Thread Andrii Nakryiko
Change BTF-defined map definitions to capture compile-time integer values as part of BTF type definition, to avoid split of key/value type information and actual type/size/flags initialization for maps. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- tools/lib/bpf

[PATCH v5 bpf-next 0/4] capture integers in BTF type info for map defs

2019-07-05 Thread Andrii Nakryiko
This patch set implements an update to how BTF-defined maps are specified. The change is in how integer attributes, e.g., type, max_entries, map_flags, are specified: now they are captured as part of map definition struct's BTF type information (using array dimension), eliminating the need for comp

[PATCH v5 bpf-next 2/4] selftests/bpf: add __uint and __type macro for BTF-defined maps

2019-07-05 Thread Andrii Nakryiko
Add simple __uint and __type macro that hide details of how type and integer values are captured in BTF-defined maps. Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- tools/testing/selftests/bpf/bpf_helpers.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t

[PATCH v5 bpf-next 4/4] selftests/bpf: convert legacy BPF maps to BTF-defined ones

2019-07-05 Thread Andrii Nakryiko
Convert selftests that were originally left out and new ones added recently to consistently use BTF-defined maps. Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- .../selftests/bpf/progs/get_cgroup_id_kern.c | 26 ++--- tools/testi

[PATCH v5 bpf-next 3/4] selftests/bpf: convert selftests using BTF-defined maps to new syntax

2019-07-05 Thread Andrii Nakryiko
Convert all the existing selftests that are already using BTF-defined maps to use new syntax (with no static data initialization). Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song --- tools/testing/selftests/bpf/progs/bpf_flow.c | 28 +++ .../testing/selftests/bpf

Re: [RFC net-next] net: dsa: add support for MC_DISABLED attribute

2019-07-05 Thread Vivien Didelot
Hi Ido, On Sun, 23 Jun 2019 07:09:52 +, Ido Schimmel wrote: > > Russell, Ido, Florian, so far I understand that a multicast-unaware > > bridge must flood unknown traffic everywhere (CPU included); > > and a multicast-aware bridge must only flood its ports if their > > mcast_flood is on, and k

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
2019-07-05 08:42 UTC-0700 ~ Y Song > On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet > wrote: >> >> 2019-07-04 22:49 UTC-0700 ~ Y Song >>> On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet >>> wrote: Add a new "bpftool prog run" subcommand to run a loaded program on input data (and pos

[PATCH net-next] net: openvswitch: use netif_ovs_is_port() instead of opencode

2019-07-05 Thread Taehee Yoo
Use netif_ovs_is_port() function instead of open code. This patch doesn't change logic. Signed-off-by: Taehee Yoo --- net/openvswitch/dp_notify.c| 2 +- net/openvswitch/vport-netdev.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/openvswitch/dp_notify.c b/net

[PATCH net-next] net: openvswitch: do not update max_headroom if new headroom is equal to old headroom

2019-07-05 Thread Taehee Yoo
When a vport is deleted, the maximum headroom size would be changed. If the vport which has the largest headroom is deleted, the new max_headroom would be set. But, if the new headroom size is equal to the old headroom size, updating routine is unnecessary. Signed-off-by: Taehee Yoo --- net/open

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

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 08:26:25 +, Wei Yongjun wrote: > Fix to return negative error code -EINVAL from the error handling > case instead of 0, as done elsewhere in this function. > > Fixes: 1f35a56cf586 ("nfp: tls: add/delete TLS TX connections") > Signed-off-by: Wei Yongjun Acked-by: Jakub Kici

RE: [net-next 1/3] ice: Initialize and register platform device to provide RDMA

2019-07-05 Thread Saleem, Shiraz
> Subject: Re: [net-next 1/3] ice: Initialize and register platform device to > provide > RDMA > > On Thu, Jul 04, 2019 at 12:48:29PM +, Jason Gunthorpe wrote: > > On Thu, Jul 04, 2019 at 02:42:47PM +0200, Greg KH wrote: > > > On Thu, Jul 04, 2019 at 12:37:33PM +, Jason Gunthorpe wrote: >

Re: [PATCH net-next 1/8] Documentation/bindings: net: ocelot: document the PTP bank

2019-07-05 Thread Antoine Tenart
Hi Andrew, On Fri, Jul 05, 2019 at 04:45:17PM +0200, Andrew Lunn wrote: > On Fri, Jul 05, 2019 at 03:30:16PM +0200, Antoine Tenart wrote: > > > > I'm not sure about this: optional properties means some parts of the h/w > > can be missing or not wired. It's not the case here, it's "optional" in >

RE: [rdma 14/16] RDMA/irdma: Add ABI definitions

2019-07-05 Thread Saleem, Shiraz
> Subject: Re: [rdma 14/16] RDMA/irdma: Add ABI definitions > > On Thu, Jul 04, 2019 at 10:40:21AM +0300, Leon Romanovsky wrote: > > On Wed, Jul 03, 2019 at 07:12:57PM -0700, Jeff Kirsher wrote: > > > From: Mustafa Ismail > > > > > > Add ABI definitions for irdma. > > > > > > Signed-off-by: Musta

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Richard Cochran
On Mon, Jul 01, 2019 at 12:03:27PM +0200, Antoine Tenart wrote: > +void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64 *ts) > +{ > + /* Read current PTP time to get seconds */ > + u32 val = ocelot_read_rix(ocelot, PTP_PIN_CFG, TOD_ACC_PIN); This register is protected by o

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Y Song
On Fri, Jul 5, 2019 at 9:03 AM Quentin Monnet wrote: > > 2019-07-05 08:42 UTC-0700 ~ Y Song > > On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet > > wrote: > >> > >> 2019-07-04 22:49 UTC-0700 ~ Y Song > >>> On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet > >>> wrote: > > Add a new "bpftoo

Re: [PATCH net-next 8/8] net: mscc: PTP Hardware Clock (PHC) support

2019-07-05 Thread Antoine Tenart
Hello Richard, On Fri, Jul 05, 2019 at 09:47:36AM -0700, Richard Cochran wrote: > On Mon, Jul 01, 2019 at 12:03:27PM +0200, Antoine Tenart wrote: > > > +void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64 *ts) > > +{ > > + /* Read current PTP time to get seconds */ > > + u32

Re: [rdma 14/16] RDMA/irdma: Add ABI definitions

2019-07-05 Thread Jason Gunthorpe
On Fri, Jul 05, 2019 at 04:42:19PM +, Saleem, Shiraz wrote: > > Subject: Re: [rdma 14/16] RDMA/irdma: Add ABI definitions > > > > On Thu, Jul 04, 2019 at 10:40:21AM +0300, Leon Romanovsky wrote: > > > On Wed, Jul 03, 2019 at 07:12:57PM -0700, Jeff Kirsher wrote: > > > > From: Mustafa Ismail >

Re: [PATCHv2] tools bpftool: Fix json dump crash on powerpc

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 14:10:31 +0200, Jiri Olsa wrote: > Michael reported crash with by bpf program in json mode on powerpc: > > # bpftool prog -p dump jited id 14 > [{ > "name": "0xda9aa760", > "insns": [{ > "pc": "0x0", > "operation": "nop

Re: [PATCHv2] tools bpftool: Fix json dump crash on powerpc

2019-07-05 Thread Quentin Monnet
2019-07-05 10:24 UTC-0700 ~ Jakub Kicinski > On Fri, 5 Jul 2019 14:10:31 +0200, Jiri Olsa wrote: >> Michael reported crash with by bpf program in json mode on powerpc: >> >> # bpftool prog -p dump jited id 14 >> [{ >> "name": "0xda9aa760", >> "insns": [{ >>

Re: loss of connectivity after enabling vlan_filtering

2019-07-05 Thread Vivien Didelot
On Sun, 30 Jun 2019 01:23:02 +0200, vto...@googlemail.com wrote: > A simple soul might infer that mv88e6xxx includes MV88E6060, at least > that happened to me apparently (being said simpleton). I agree that is confusing, that is why I don't like the 'xxx' naming convention in general, found in man

Re: NEIGH: BUG, double timer add, state is 8

2019-07-05 Thread Lorenzo Bianconi
On Jul 05, David Ahern wrote: > On 7/4/19 3:59 PM, Marek Majkowski wrote: > > I found a way to hit an obscure BUG in the > > net/core/neighbour.c:neigh_add_timer(), by piping two carefully > > crafted messages into AF_NETLINK socket. > > > > https://github.com/torvalds/linux/blob/v5.2-rc7/net/core

Re: [PATCH rdma-next 0/2] DEVX VHCA tunnel support

2019-07-05 Thread Jason Gunthorpe
On Mon, Jul 01, 2019 at 09:14:00PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Hi, > > Those two patches introduce VHCA tunnel mechanism to DEVX interface > needed for Bluefield SOC. See extensive commit messages for more > information. > > Thanks > > Max Gurtovoy (2): > net/ml

Re: [PATCH bpf-next] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
2019-07-05 10:08 UTC-0700 ~ Y Song > On Fri, Jul 5, 2019 at 9:03 AM Quentin Monnet > wrote: >> >> 2019-07-05 08:42 UTC-0700 ~ Y Song >>> On Fri, Jul 5, 2019 at 1:21 AM Quentin Monnet >>> wrote: 2019-07-04 22:49 UTC-0700 ~ Y Song > On Thu, Jul 4, 2019 at 1:58 AM Quentin Monnet >>>

[PATCH bpf-next v2] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Quentin Monnet
Add a new "bpftool prog run" subcommand to run a loaded program on input data (and possibly with input context) passed by the user. Print output data (and output context if relevant) into a file or into the console. Print return value and duration for the test run into the console. A "repeat" arg

[PATCH bpf-next 1/3] include/bpf.h: Remove map_insert_ctx() stubs

2019-07-05 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen When we changed the device and CPU maps to use linked lists instead of bitmaps, we also removed the need for the map_insert_ctx() helpers to keep track of the bitmaps inside each map. However, it seems I forgot to remove the function definitions stubs, so remove those

[PATCH bpf-next 2/3] xdp: Refactor devmap allocation code for reuse

2019-07-05 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen The subsequent patch to add a new devmap sub-type can re-use much of the initialisation and allocation code, so refactor it into separate functions. Signed-off-by: Toke Høiland-Jørgensen --- kernel/bpf/devmap.c | 137 +++

[PATCH bpf-next 0/3] xdp: Add devmap_hash map type

2019-07-05 Thread Toke Høiland-Jørgensen
This series adds a new map type, devmap_hash, that works like the existing devmap type, but using a hash-based indexing scheme. This is useful for the use case where a devmap is indexed by ifindex (for instance for use with the routing table lookup helper). For this use case, the regular devmap nee

[PATCH bpf-next 3/3] xdp: Add devmap_hash map type for looking up devices by hashed index

2019-07-05 Thread Toke Høiland-Jørgensen
From: Toke Høiland-Jørgensen A common pattern when using xdp_redirect_map() is to create a device map where the lookup key is simply ifindex. Because device maps are arrays, this leaves holes in the map, and the map has to be sized to fit the largest ifindex, regardless of how many devices actual

Re: [PATCH bpf-next v2] tools: bpftool: add "prog run" subcommand to test-run programs

2019-07-05 Thread Y Song
On Fri, Jul 5, 2019 at 10:54 AM Quentin Monnet wrote: > > Add a new "bpftool prog run" subcommand to run a loaded program on input > data (and possibly with input context) passed by the user. > > Print output data (and output context if relevant) into a file or into > the console. Print return val

[net-next] net: fib_rules: do not flow dissect local packets

2019-07-05 Thread Petar Penkov
Rules matching on loopback iif do not need early flow dissection as the packet originates from the host. Stop counting such rules in fib_rule_requires_fldissect Signed-off-by: Petar Penkov --- include/net/fib_rules.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include

[PATCH] coallocate socket_wq with socket itself

2019-07-05 Thread Al Viro
socket->wq is assign-once, set when we are initializing both struct socket it's in and struct socket_wq it points to. As the matter of fact, the only reason for separate allocation was the ability to RCU-delay freeing of socket_wq. RCU-delaying the freeing of socket itself gets rid of that need,

[PATCH] sockfs: switch to ->free_inode()

2019-07-05 Thread Al Viro
we do have an RCU-delayed part there already (freeing the wq), so it's not like the pipe situation; moreover, it might be worth considering coallocating wq with the rest of struct sock_alloc. ->sk_wq in struct sock would remain a pointer as it is, but the object it normally points to would be coall

Re: [PATCH net-next v2 1/3] devlink: Introduce PCI PF port flavour and port attribute

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 02:37:09 -0500, Parav Pandit wrote: > @@ -38,14 +38,24 @@ struct devlink { > char priv[0] __aligned(NETDEV_ALIGN); > }; > > +struct devlink_port_pci_pf_attrs { > + u16 pf; /* Associated PCI PF for this port. */ > +}; > + > struct devlink_port_attrs { > u8 set

Re: [EXT] Re: [PATCH net-next v2 4/4] qed*: Add devlink support for configuration attributes.

2019-07-05 Thread Jakub Kicinski
On Fri, 5 Jul 2019 08:22:41 +, Sudarsana Reddy Kalluru wrote: > > On Thu, 4 Jul 2019 06:20:11 -0700, Sudarsana Reddy Kalluru wrote: > > > This patch adds implementation for devlink callbacks for reading and > > > configuring the device attributes. > > > > > > Signed-off-by: Sudarsana Reddy Ka

  1   2   >