Re: Re: [Bug] net/ipv6: skb_over_panic in mld_newpack

2018-12-04 Thread Benjamin Poirier
On 2018/12/04 11:52, Nicolas Belouin wrote: > On 03/12 07:59, Eric Dumazet wrote: > > > > > > On 12/03/2018 07:20 AM, Nicolas Belouin wrote: > > > Hi, > > > I ran into a panic while adding an interface to a bridge with a vxlan > > > interface already attached to it, as it seems related mtu=9000.

[PATCH net 2/3] flex_array: support flex_array_resize

2018-12-04 Thread Xin Long
This function can dynamically change total_nr_elements of a flex_array, and keep the old elements of the same memory. Returns 0 if it succeeds. Note that it won't do any memory allocation or shrinking for elements, which should be only done by flex_array_prealloc and flex_array_shrink.

[PATCH net 3/3] sctp: fa_resize sctp stream instead of redo fa_alloc

2018-12-04 Thread Xin Long
Now when doing 4-shakehand or adding new streams, sctp has to allocate new memory for asoc->stream and copy the old stream's information from the old asoc->stream to the new one. It also cause the stream pointers to change, by which a panic was even caused due to stream->out_curr's change. To fix

[PATCH net 1/3] flex_array: make FLEX_ARRAY_BASE_SIZE the same value of FLEX_ARRAY_PART_SIZE

2018-12-04 Thread Xin Long
This patch is to separate the base data memory from struct flex_array and save it into a page. With this change, total_nr_elements of a flex_array can grow or shrink without having the old element's memory changed when the new size of the flex_arry crosses FLEX_ARRAY_BASE_SIZE, which will be added

[PATCH net 0/3] net: add support for flex_array_resize in flex_array

2018-12-04 Thread Xin Long
Without the support for the total_nr_elements's growing or shrinking dynamically, flex_array is not that 'flexible'. Like when users want to change the size, they have to redo flex_array_alloc and copy all the elements from the old to the new one. The worse thing is every element's memory gets

Re: [PATCH bpf-next 2/7] ppc: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*

2018-12-04 Thread Sandipan Das
Hi Jiong, On 05/12/18 2:25 AM, Jiong Wang wrote: > This patch implements code-gen for BPF_ALU | BPF_ARSH | BPF_*. > > Cc: Naveen N. Rao > Cc: Sandipan Das > Signed-off-by: Jiong Wang > --- [...] > diff --git a/arch/powerpc/net/bpf_jit_comp64.c > b/arch/powerpc/net/bpf_jit_comp64.c > index

[net-next 3/7] net/mlx5e: Move modify tirs hash functionality

2018-12-04 Thread Saeed Mahameed
From: Aya Levin Move modify tirs hash functionality (mlx5e_modify_tirs_hash) from en_ethtool.c to en_main.c. This allows future use of this fuctionality from en_fs_ethtool.c, while keeping current convention: en_ethtool.c doesn't have an API. There is no functional change here. Signed-off-by:

[net-next 4/7] net/mlx5e: Refactor TIR configuration function

2018-12-04 Thread Saeed Mahameed
From: Aya Levin Refactor mlx5e_build_indir_tir_ctx_hash for better code re-use. TIR stands for Transport Interface Receive, which is responsible for all transport related operations on the receive side. Added a static array with TIR default configuration values. This separates configuration

[net-next 7/7] net/mlx5e: Improve ethtool private-flags code structure

2018-12-04 Thread Saeed Mahameed
From: Tariq Toukan Refactor the code of private-flags setter. Replace consecutive calls to mlx5e_handle_pflag with a loop that uses a preset set of parameters. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 17 ++---

[net-next 6/7] net/mlx5e: ethtool, Support user configuration for RX hash fields

2018-12-04 Thread Saeed Mahameed
From: Aya Levin Enable user configuration of RX hash fields that are used for traffic spreading into RX queues. User can change built-in RSS (Receive Side Scaling) profiles on the following traffic types: UDP4, UDP6, TCP4 and TCP6. This configuration effects both outer and inner headers. Added

[net-next 5/7] net/mlx5e: Move RSS params to a dedicated struct

2018-12-04 Thread Saeed Mahameed
From: Aya Levin Remove RSS params from params struct under channels, and introduce a new struct with RSS configuration params under priv struct. There is no functional change here. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed ---

[net-next 2/7] net/mlx5e: Cleanup unused defines

2018-12-04 Thread Saeed Mahameed
From: Gal Pressman Remove couple of defines that are no longer used. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h

[net-next 1/7] net/mlx5e: Remove trailing space of tx_pause ethtool counter name

2018-12-04 Thread Saeed Mahameed
tx_pause_storm_warning_events ethtool counter name has a trailing space, remove it. Signed-off-by: Saeed Mahameed Reviewed-by: Eran Ben Elisha --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[pull request][net-next 0/7] Mellanox, mlx5e updates 2018-12-04

2018-12-04 Thread Saeed Mahameed
Hi Dave, The following series is for mlx5e netdevice driver, it adds ethtool support for RX hash fields configuration and some misc updates, please see tag log below. Please pull and let me know if there's any problem. Thanks, Saeed. --- The following changes since commit

[PATCH net-next RFC 7/7] bnxt_en: Add bnxt_en initial port params table and register it

2018-12-04 Thread Vasundhara Volam
Register devlink_port with devlink and create initial port params table for bnxt_en. The table consists of a generic parameter: wake-on-lan: Enables Wake on Lan for this port when magic packet is received with this port's MAC address using ACPI pattern. If enabled, the controller asserts a wake

[PATCH net-next RFC 0/7] Add configuration parameters support for devlink_port

2018-12-04 Thread Vasundhara Volam
This patchset adds support for configuration parameters setting through devlink_port. Each device registers supported configuration parameters table. The user can retrieve data on these parameters by "devlink port param show" command and can set new value to a parameter by "devlink port param

[PATCH net-next RFC 6/7] devlink: Add a boolean generic port parameter

2018-12-04 Thread Vasundhara Volam
wake-on-lan - Enables Wake on Lan for this port when magic packet is received with this port's MAC address using ACPI pattern. If enabled, the controller asserts a wake pin upon reception of WoL packet. ACPI (Advanced Configuration and Power Interface) is an industry specification for the

[PATCH net-next RFC 5/7] devlink: Add devlink notifications support for port params

2018-12-04 Thread Vasundhara Volam
Add notification call for devlink port param set, register and unregister functions. Add devlink_port_param_value_changed() function to enable the driver notify devlink on value change. Driver should use this function after value was changed on any configuration mode part to driverinit. Cc: Jiri

[PATCH net-next RFC 4/7] devlink: Add support for get/set driverinit value for devlink_port

2018-12-04 Thread Vasundhara Volam
Add support for "driverinit" configuration mode value for devlink_port configuration parameters. Two additional functions added to help the driver get/set the value from/to devlink: devlink_port_param_driverinit_value_set() and devlink_port_param_driverinit_value_get(). Also, move the common code

[PATCH net-next RFC 3/7] devlink: Add port param set command

2018-12-04 Thread Vasundhara Volam
Add port param set command to set the value for a parameter. Value can be set to any of the supported configuration modes. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam --- include/uapi/linux/devlink.h | 1 + net/core/devlink.c | 41 ++--- 2

[PATCH net-next RFC 2/7] devlink: Add port param get command

2018-12-04 Thread Vasundhara Volam
Add port param get command which gets data per parameter. It also has option to dump the parameters data per port. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam --- include/uapi/linux/devlink.h | 2 + net/core/devlink.c | 102 --- 2 files

[PATCH net-next RFC 1/7] devlink: Add devlink_param for port register and unregister

2018-12-04 Thread Vasundhara Volam
Add functions to register and unregister for the driver supported configuration parameters table per port. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam --- include/net/devlink.h | 29 +++ net/core/devlink.c| 130 ++ 2 files

Re: [PATCH net 2/2] net/mlx4_en: Fix build break when CONFIG_INET is off

2018-12-04 Thread Cong Wang
On Sun, Dec 2, 2018 at 4:37 AM Tariq Toukan wrote: > > From: Saeed Mahameed > > MLX4_EN depends on NETDEVICES, ETHERNET and INET Kconfigs. > Make sure they are listed in MLX4_EN Kconfig dependencies. > > This fixes the following build break: > > drivers/net/ethernet/mellanox/mlx4/en_rx.c:582:18:

Re: [PATCH net 1/2] net/mlx4_en: Change min MTU size to ETH_MIN_MTU

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 9:06 AM Eric Dumazet wrote: > > > > On 12/04/2018 08:59 AM, David Laight wrote: > > Where does 68 come from? > > Min IPv4 MTU per RFC791 > What's wrong with using IPV4_MIN_MTU instead of 68 even in just comment?

Re: [PATCH net-next] tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT

2018-12-04 Thread David Miller
From: Eric Dumazet Date: Tue, 4 Dec 2018 07:58:17 -0800 > TCP_NOTSENT_LOWAT socket option or sysctl was added in linux-3.12 > as a step to enable bigger tcp sndbuf limits. > > It works reasonably well, but the following happens : > > Once the limit is reached, TCP stack generates > an

Re: [PATCH v2 2/2] net: mvpp2: fix phylink handling of invalid PHY modes

2018-12-04 Thread David Miller
From: Baruch Siach Date: Tue, 4 Dec 2018 16:03:53 +0200 > The .validate phylink callback should empty the supported bitmap when > the interface mode is invalid. > > Cc: Maxime Chevallier > Cc: Antoine Tenart > Reported-by: Russell King > Signed-off-by: Baruch Siach Applied.

Re: [PATCH v2 1/2] net: mvpp2: fix detection of 10G SFP modules

2018-12-04 Thread David Miller
From: Baruch Siach Date: Tue, 4 Dec 2018 16:03:52 +0200 > The mvpp2_phylink_validate() relies on the interface field of > phylink_link_state to determine valid link modes. However, when called > from phylink_sfp_module_insert() this field in not initialized. The > default switch case then

Re: [PATCH v2 net-next] ip6_tunnel: Adding support of mapping rules for MAP-E tunnel

2018-12-04 Thread David Miller
From: Felix Jia Date: Mon, 3 Dec 2018 16:39:31 +1300 > +int > +ip6_get_addrport(struct iphdr *iph, __be32 *saddr4, __be32 *daddr4, > + __be16 *sport4, __be16 *dport4, __u8 *proto, int *icmperr) > +{ This looks like something the flow dissector can do alreayd, please look into

Re: [PATCH mlx5-next 4/4] net/mlx5: Move flow counters data structures from flow steering header

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 6:05 PM Saeed Mahameed wrote: > > After the following flow counters API refactoring: > ("net/mlx5: Use flow counter IDs and not the wrapping cache object") > flow counters private data structures mlx5_fc_cache and mlx5_fc are > redundantly exposed in fs_core.h, they have

Re: [PATCH mlx5-next 2/4] net/mlx5: Use helper to get CQE opcode

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 6:06 PM Saeed Mahameed wrote: > > +static inline u8 get_cqe_opcode(struct mlx5_cqe64 *cqe) Make it const please.

Re: [PATCH net-next V2 0/2] net/sched: act_tunnel_key: support key-less tunnels

2018-12-04 Thread David Miller
From: Or Gerlitz Date: Sun, 2 Dec 2018 14:55:19 +0200 > This short series from Adi Nissim allows to support key-less tunnels > by the tc tunnel key actions, which is needed for some GRE use-cases. > > changes from V0: > - addresses build warning spotted by kbuild, make sure to always init >

Re: [PATCH 1/2] net: linkwatch: send change uevent on link changes

2018-12-04 Thread David Miller
From: Jouke Witteveen Date: Sat, 1 Dec 2018 17:00:21 +0100 > Make it easy for userspace to respond to acquisition/loss of carrier. > The uevent is picked up by udev and, on systems with systemd, the > device unit of the interface announces a configuration reload. > > Signed-off-by: Jouke

Re: [PATCH net] rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices

2018-12-04 Thread David Miller
From: Eric Dumazet Date: Tue, 4 Dec 2018 09:40:35 -0800 > kmsan was able to trigger a kernel-infoleak using a gre device [1] > > nlmsg_populate_fdb_fill() has a hard coded assumption > that dev->addr_len is ETH_ALEN, as normally guaranteed > for ARPHRD_ETHER devices. > > A similar issue was

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-12-04 Thread Cong Wang
On Tue, Nov 27, 2018 at 10:10 PM Cong Wang wrote: > > When an ethernet frame is padded to meet the minimum ethernet frame > size, the padding octets are not covered by the hardware checksum. > Fortunately the padding octets are ususally zero's, which don't affect > checksum. However, we have a

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 4:59 PM Saeed Mahameed wrote: > > Cong, you are missing some important details, hardware can only parse a > handful of protocols IP/TCP/UDP some tunneling like vxlan,GRE, etc.. > but for complicated protocols and new generic tunneling protocols, > which the hardware wasn't

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 5:06 PM Saeed Mahameed wrote: > > Hi Cong, sorry to hear that, i will take your patch evaluate and test > personally, will do the needed changes and post it later. Please don't. I am withdrawing my SoB too. To avoid any legal issues, please speak to a legal expert before

Re: [Patch net] mlx5: check for malformed packets

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 5:16 PM Saeed Mahameed wrote: > Please understand that RX data path is really sensitive and we are > trying to find the optimal fix of any issue here, sorry for any > inconvenience. I am sorry for sending out this patch, I am certain that it wastes a lot of your time. The

[PATCH mlx5-next 1/4] net/mlx5: When fetching CQEs return CQE instead of void pointer

2018-12-04 Thread Saeed Mahameed
From: Daniel Jurgens The function is only used to retrieve CQEs, use the proper type as the return value. Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/wq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH mlx5-next 0/4] mlx5 core CQE API and misc updates

2018-12-04 Thread Saeed Mahameed
Hi This patchset is for mlx5-next shared branch, and will be applied there once the review is done. Patches 1,2,3 are trivial improvements to CQE API 1. return CQE pointer instead of void pointer in get_cqe function 2. helper function for retrieving the CQE opcode, used in rdma and netdev Patch

[PATCH mlx5-next 3/4] IB/mlx5: Use helper to get CQE opcode

2018-12-04 Thread Saeed Mahameed
From: Tariq Toukan Use the new helper that extracts the opcode from a CQE (completion queue entry) structure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/infiniband/hw/mlx5/cq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH mlx5-next 4/4] net/mlx5: Move flow counters data structures from flow steering header

2018-12-04 Thread Saeed Mahameed
After the following flow counters API refactoring: ("net/mlx5: Use flow counter IDs and not the wrapping cache object") flow counters private data structures mlx5_fc_cache and mlx5_fc are redundantly exposed in fs_core.h, they have nothing to do with flow steering core and they are private to

[PATCH mlx5-next 2/4] net/mlx5: Use helper to get CQE opcode

2018-12-04 Thread Saeed Mahameed
From: Tariq Toukan Introduce and use a helper that extracts the opcode from a CQE (completion queue entry) structure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 10 +-

Re: [PATCH mlx5-next 2/2] mlx5: extend PTP gettime function to read system clock

2018-12-04 Thread Saeed Mahameed
On Mon, 2018-12-03 at 13:59 +0100, Miroslav Lichvar wrote: > Read the system time right before and immediately after reading the > low > register of the internal timer. This adds support for the > PTP_SYS_OFFSET_EXTENDED ioctl. > > Cc: Richard Cochran > Cc: Saeed Mahameed > Signed-off-by:

Re: [Patch net] mlx5: check for malformed packets

2018-12-04 Thread Saeed Mahameed
On Tue, 2018-12-04 at 12:21 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 11:33 AM Saeed Mahameed > wrote: > > On Sat, Dec 1, 2018 at 12:38 PM Cong Wang > > wrote: > > > is_last_ethertype_ip() is used to check IP/IPv6 protocol before > > > parsing IP/IPv6 headers. > > > > > > But

Re: [sky2 driver] 88E8056 PCI-E Gigabit Ethernet Controller not working after suspend

2018-12-04 Thread Laurent Bigonville
Le 30/11/18 à 12:16, Laurent Bigonville a écrit : Le 10/10/18 à 21:09, Stephen Hemminger a écrit : On Wed, 10 Oct 2018 03:16:40 +0200 Laurent Bigonville wrote: Le 9/10/18 à 22:09, Stephen Hemminger a écrit : On Tue, 9 Oct 2018 19:30:30 +0200 Laurent Bigonville wrote: Hello, On my desktop

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-12-04 Thread Saeed Mahameed
On Tue, 2018-12-04 at 12:50 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 11:21 AM Saeed Mahameed > wrote: > > we are still working on it. > > No, I give up. > > Sorry for wasting time. Let's save everyone's time by discarding it!! > :) Hi Cong, sorry to hear that, i will take your patch

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Saeed Mahameed
On Tue, 2018-12-04 at 12:35 -0800, Cong Wang wrote: > On Tue, Dec 4, 2018 at 11:17 AM Saeed Mahameed > wrote: > > On Mon, Dec 3, 2018 at 11:52 PM Eric Dumazet > > wrote: > > > On Mon, Dec 3, 2018 at 11:30 PM Cong Wang < > > > xiyou.wangc...@gmail.com> wrote: > > > > On Mon, Dec 3, 2018 at 11:08

Re: [PATCH net-next v2 0/3] net: bridge: convert multicast to generic rhashtable

2018-12-04 Thread David Miller
From: Nikolay Aleksandrov Date: Wed, 5 Dec 2018 01:45:16 +0200 > On a related note I saw Paul's call_rcu patches hit, so I'll wait for those > to go in and will rebase on top of them before sending the v3 as the bridge > change will have a conflict with this set. They aren't going in via my

Re: [PATCH net 2/2] neighbour: BUG_ON() writing before skb->head in neigh_hh_output()

2018-12-04 Thread Stefano Brivio
On Tue, 4 Dec 2018 16:26:05 -0800 Eric Dumazet wrote: > > + /* skb_push() won't panic if we have room for the unaligned size > > only */ > > + BUG_ON(skb_headroom(skb) < hh_alen); > > > > What about avoiding the panic and instead call kfree_skb() ? > > if

[PATCH net 0/2] Fix slab out-of-bounds on insufficient headroom for IPv6 packets

2018-12-04 Thread Stefano Brivio
Patch 1/2 fixes a slab out-of-bounds occurring with short SCTP packets over IPv4 over L2TP over IPv6 on a configuration with relatively low HEADER_MAX. Patch 2/2 makes sure we panic in neigh_hh_output() instead of silently writing before the allocated buffer in case the headroom is enough for the

[PATCH net 2/2] neighbour: BUG_ON() writing before skb->head in neigh_hh_output()

2018-12-04 Thread Stefano Brivio
While skb_push() makes the kernel panic if the skb headroom is less than the unaligned hardware header size in neigh_hh_output(), it will proceed silently in case we copy more than that because of alignment. In the case fixed by the previous patch, "ipv6: Check available headroom in ip6_xmit()

[PATCH net 1/2] ipv6: Check available headroom in ip6_xmit() even without options

2018-12-04 Thread Stefano Brivio
Even if we send an IPv6 packet without options, MAX_HEADER might not be enough to account for the additional headroom required by alignment of hardware headers. On a configuration without HYPERV_NET, WLAN, AX25, and with IPV6_TUNNEL, sending short SCTP packets over IPv4 over L2TP over IPv6, we

Re: [PATCH bpf-next 1/7] mips: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_X

2018-12-04 Thread Paul Burton
Hi Jiong, On Tue, Dec 04, 2018 at 03:55:16PM -0500, Jiong Wang wrote: > Jitting of BPF_K is supported already, but not BPF_X. This patch complete > the support for the latter on both MIPS and microMIPS. > > Cc: Paul Burton > Cc: linux-m...@vger.kernel.org > Signed-off-by: Jiong Wang > --- >

Re: [PATCH net-next v2 0/3] net: bridge: convert multicast to generic rhashtable

2018-12-04 Thread Nikolay Aleksandrov
On 12/4/18 5:01 PM, Nikolay Aleksandrov wrote: > Hi, > The current bridge multicast code uses a custom rhashtable > implementation which predates the generic rhashtable API. Patch 01 > converts it to use the generic kernel rhashtable which simplifies the > code a lot and removes duplicated

Re: [PATCH bpf-next 2/3] bpf: add BPF_PROG_TEST_RUN support for flow dissector

2018-12-04 Thread Stanislav Fomichev
On 12/04, Song Liu wrote: > On Mon, Dec 3, 2018 at 3:08 PM Stanislav Fomichev wrote: > > > > On 12/03, Song Liu wrote: > > > On Mon, Dec 3, 2018 at 11:00 AM Stanislav Fomichev > > > wrote: > > > > > > > > The input is packet data, the output is struct bpf_flow_key. This should > > > > make it

Re: [PATCH bpf-next v2 4/5] net/flow_dissector: correctly cap nhoff and thoff in case of BPF

2018-12-04 Thread Stanislav Fomichev
On 12/04, Song Liu wrote: > On Mon, Dec 3, 2018 at 8:01 PM Stanislav Fomichev wrote: > > > > We want to make sure that the following condition holds: > > 0 <= nhoff <= thoff <= skb->len > > > > BPF program can set out-of-bounds nhoff and thoff, which is dangerous, see > > recent commit

Re: [PATCH bpf-next v2 3/5] selftests/bpf: use thoff instead of nhoff in BPF flow dissector

2018-12-04 Thread Stanislav Fomichev
On 12/04, Song Liu wrote: > On Mon, Dec 3, 2018 at 8:01 PM Stanislav Fomichev wrote: > > > > We are returning thoff from the flow dissector, not the nhoff. Pass > > thoff along with nhoff to the bpf program (initially thoff == nhoff) > > and expect flow dissector amend/return thoff, not nhoff. >

Re: [PATCH bpf-next 2/3] bpf: add BPF_PROG_TEST_RUN support for flow dissector

2018-12-04 Thread Song Liu
On Mon, Dec 3, 2018 at 3:08 PM Stanislav Fomichev wrote: > > On 12/03, Song Liu wrote: > > On Mon, Dec 3, 2018 at 11:00 AM Stanislav Fomichev wrote: > > > > > > The input is packet data, the output is struct bpf_flow_key. This should > > > make it easy to test flow dissector programs without

Re: [PATCH bpf-next v2 4/5] net/flow_dissector: correctly cap nhoff and thoff in case of BPF

2018-12-04 Thread Song Liu
On Mon, Dec 3, 2018 at 8:01 PM Stanislav Fomichev wrote: > > We want to make sure that the following condition holds: > 0 <= nhoff <= thoff <= skb->len > > BPF program can set out-of-bounds nhoff and thoff, which is dangerous, see > recent commit d0c081b49137 ("flow_dissector: properly cap thoff

Re: [PATCH bpf-next v2 3/5] selftests/bpf: use thoff instead of nhoff in BPF flow dissector

2018-12-04 Thread Song Liu
On Mon, Dec 3, 2018 at 8:01 PM Stanislav Fomichev wrote: > > We are returning thoff from the flow dissector, not the nhoff. Pass > thoff along with nhoff to the bpf program (initially thoff == nhoff) > and expect flow dissector amend/return thoff, not nhoff. > > This avoids confusion, when by the

Re: [PATCH iproute2 v3] iproute2: Installation errors without libmnl

2018-12-04 Thread Stephen Hemminger
On Mon, 3 Dec 2018 12:13:06 +0100 Emeric Dupont wrote: > When performing make install in iproute2 (current git master), > if $(HAVE_MNL) is not selected, some Makefiles try to call > install with an empty target, which causes a non-critical make error. > > Signed-off-by: Emeric

[tip:core/rcu] smsc: Replace spin_is_locked() with lockdep

2018-12-04 Thread tip-bot for Lance Roy
Commit-ID: 97eeebea894283c290ead6694b76f575e7654773 Gitweb: https://git.kernel.org/tip/97eeebea894283c290ead6694b76f575e7654773 Author: Lance Roy AuthorDate: Thu, 4 Oct 2018 23:45:42 -0700 Committer: Paul E. McKenney CommitDate: Mon, 12 Nov 2018 09:06:22 -0800 smsc: Replace

Re: [PATCH iproute2 1/2] libnetlink: Process further iovs on no error

2018-12-04 Thread Stephen Hemminger
On Tue, 4 Dec 2018 16:07:41 + Petr Machata wrote: > When no error is reported in the first iov, do not prematurely return, > but process further iovs. This fixes batch processing. > > Fixes: c60389e4f9ea ("libnetlink: fix leak and using unused memory on error") > Signed-off-by: Petr Machata

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 1:16 PM Eric Dumazet wrote: > > Erm I never suggested to get rid of CHECKSUM_COMPLETE... > My suggestion was to reorder the mlx5 logic to match mlx4 one. > > CHECKSUM_COMPLETE is very nice _when_/_if_ the NIC is unable to > fully dissect a packet and validate L4, as a

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Eric Dumazet
On 12/04/2018 12:35 PM, Cong Wang wrote: > On Tue, Dec 4, 2018 at 11:17 AM Saeed Mahameed > wrote: >> >> On Mon, Dec 3, 2018 at 11:52 PM Eric Dumazet wrote: >>> >>> On Mon, Dec 3, 2018 at 11:30 PM Cong Wang wrote: On Mon, Dec 3, 2018 at 11:08 PM Eric Dumazet wrote: > > The

Re: [PATCH net] sctp: frag_point sanity check

2018-12-04 Thread Marcelo Ricardo Leitner
On Tue, Dec 04, 2018 at 03:56:33PM -0500, Neil Horman wrote: > On Tue, Dec 04, 2018 at 05:52:02PM -0200, Marcelo Ricardo Leitner wrote: > > On Tue, Dec 04, 2018 at 02:39:46PM -0500, Neil Horman wrote: > > > On Tue, Dec 04, 2018 at 08:27:41PM +0100, Jakub Audykowicz wrote: > > > > If for some

Re: [PATCH net] sctp: frag_point sanity check

2018-12-04 Thread Neil Horman
On Tue, Dec 04, 2018 at 05:52:02PM -0200, Marcelo Ricardo Leitner wrote: > On Tue, Dec 04, 2018 at 02:39:46PM -0500, Neil Horman wrote: > > On Tue, Dec 04, 2018 at 08:27:41PM +0100, Jakub Audykowicz wrote: > > > If for some reason an association's fragmentation point is zero, > > >

[PATCH bpf-next 7/7] selftests: bpf: update testcases for BPF_ALU | BPF_ARSH

2018-12-04 Thread Jiong Wang
"arsh32 on imm" and "arsh32 on reg" now are accepted. Also added two new testcases to make sure arsh32 won't be treated as arsh64 during interpretation or JIT code-gen for which case the high bits will be moved into low halve that the testcases could catch them. Reviewed-by: Jakub Kicinski

[PATCH bpf-next 2/7] ppc: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*

2018-12-04 Thread Jiong Wang
This patch implements code-gen for BPF_ALU | BPF_ARSH | BPF_*. Cc: Naveen N. Rao Cc: Sandipan Das Signed-off-by: Jiong Wang --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/net/bpf_jit.h| 4 arch/powerpc/net/bpf_jit_comp64.c | 6 ++ 3 files changed, 12

[PATCH bpf-next 5/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread Jiong Wang
This patch implements interpreting BPF_ALU | BPF_ARSH. Do arithmetic right shift on low 32-bit sub-register, and zero the high 32 bits. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang --- kernel/bpf/core.c | 52 ++-- 1 file changed, 30

[PATCH bpf-next 1/7] mips: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_X

2018-12-04 Thread Jiong Wang
Jitting of BPF_K is supported already, but not BPF_X. This patch complete the support for the latter on both MIPS and microMIPS. Cc: Paul Burton Cc: linux-m...@vger.kernel.org Signed-off-by: Jiong Wang --- arch/mips/include/asm/uasm.h | 1 + arch/mips/include/uapi/asm/inst.h | 1 +

[PATCH bpf-next 4/7] nfp: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*

2018-12-04 Thread Jiong Wang
BPF_X support needs indirect shift mode, please see code comments for details. Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang --- drivers/net/ethernet/netronome/nfp/bpf/jit.c | 45 1 file changed, 45 insertions(+) diff --git

[PATCH bpf-next 3/7] s390: bpf: implement jitting of BPF_ALU | BPF_ARSH | BPF_*

2018-12-04 Thread Jiong Wang
This patch implements code-gen for BPF_ALU | BPF_ARSH | BPF_*. Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Jiong Wang --- arch/s390/net/bpf_jit_comp.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c

[PATCH bpf-next 0/7] bpf: support BPF_ALU | BPF_ARSH

2018-12-04 Thread Jiong Wang
BPF_ALU | BPF_ARSH | BPF_* were rejected by commit: 7891a87efc71 ("bpf: arsh is not supported in 32 bit alu thus reject it"). As explained in the commit message, this is due to there is no complete support for them on interpreter and various JIT compilation back-ends. This patch set is a

[PATCH bpf-next 6/7] bpf: verifier remove the rejection on BPF_ALU | BPF_ARSH

2018-12-04 Thread Jiong Wang
This patch remove the rejection on BPF_ALU | BPF_ARSH as we have supported them on interpreter and all JIT back-ends Reviewed-by: Jakub Kicinski Signed-off-by: Jiong Wang --- kernel/bpf/verifier.c | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/bpf/verifier.c

Re: [Patch net v2] mlx5: fixup checksum for short ethernet frame padding

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 11:21 AM Saeed Mahameed wrote: > we are still working on it. No, I give up. Sorry for wasting time. Let's save everyone's time by discarding it!! :)

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Cong Wang
On Mon, Dec 3, 2018 at 10:14 PM Cong Wang wrote: > > When an ethernet frame is padded to meet the minimum ethernet frame > size, the padding octets are not covered by the hardware checksum. > Fortunately the padding octets are ususally zero's, which don't affect > checksum. However, we have a

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 11:17 AM Saeed Mahameed wrote: > > On Mon, Dec 3, 2018 at 11:52 PM Eric Dumazet wrote: > > > > On Mon, Dec 3, 2018 at 11:30 PM Cong Wang wrote: > > > > > > On Mon, Dec 3, 2018 at 11:08 PM Eric Dumazet wrote: > > > > > > > > The hardware has probably validated the L3 & L4

Re: [PATCH rdma-next 0/7] Enrich DEVX support

2018-12-04 Thread Leon Romanovsky
On Tue, Dec 04, 2018 at 02:45:56PM -0500, Doug Ledford wrote: > On Tue, 2018-12-04 at 12:15 -0700, Jason Gunthorpe wrote: > > On Tue, Dec 4, 2018 at 12:02 PM Doug Ledford wrote: > > > On Mon, 2018-11-26 at 08:28 +0200, Leon Romanovsky wrote: > > > > From: Leon Romanovsky > > > > > > > > From

Re: [Patch net v3] mlx5: force CHECKSUM_NONE for short ethernet frames

2018-12-04 Thread Cong Wang
On Mon, Dec 3, 2018 at 11:51 PM Eric Dumazet wrote: > > If it really validates L3/L4 checksum, then a full-packet checksum > > is not needed. > > Yes, this is exactly what CHECKSUM_UNNECESSARY means. > linux stack does not have to perform the check another time. So you are suggesting to get rid

Re: [Patch net] mlx5: check for malformed packets

2018-12-04 Thread Cong Wang
On Sat, Dec 1, 2018 at 12:38 PM Cong Wang wrote: > > is_last_ethertype_ip() is used to check IP/IPv6 protocol before > parsing IP/IPv6 headers. > > But __vlan_get_protocol() is only bound to skb->len, a malicious > packet could exhaust all skb->len by inserting sufficient ETH_P_8021AD > headers,

Re: [Patch net] mlx5: check for malformed packets

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 11:33 AM Saeed Mahameed wrote: > > On Sat, Dec 1, 2018 at 12:38 PM Cong Wang wrote: > > > > is_last_ethertype_ip() is used to check IP/IPv6 protocol before > > parsing IP/IPv6 headers. > > > > But __vlan_get_protocol() is only bound to skb->len, a malicious > > packet

Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread David Miller
From: Alexei Starovoitov Date: Tue, 4 Dec 2018 12:16:04 -0800 > You already did :) Amazing, I'll take the rest of the day off, thanks! :)

Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread David Miller
From: Jiong Wang Date: Tue, 4 Dec 2018 20:14:11 + > On 04/12/2018 20:10, David Miller wrote: >> From: Alexei Starovoitov >> Date: Tue, 4 Dec 2018 11:29:55 -0800 >> >>> I guess sparc doesn't really have 32 subregisters. All registers >>> are considered 64-bit. It has 32-bit alu ops on

Re: [Patch net] mlx5: check for malformed packets

2018-12-04 Thread Cong Wang
On Tue, Dec 4, 2018 at 11:28 AM Saeed Mahameed wrote: > > We are against having inline keywords in c file, so better if you > move this function to a header file an force the inline keyword there. Two points: 1. The existing code without my patch has inline keyword. Why not move it from the

Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread Alexei Starovoitov
On Tue, Dec 04, 2018 at 12:10:05PM -0800, David Miller wrote: > From: Alexei Starovoitov > Date: Tue, 4 Dec 2018 11:29:55 -0800 > > > I guess sparc doesn't really have 32 subregisters. All registers > > are considered 64-bit. It has 32-bit alu ops on 64-bit registers > > instead. > > Right. >

Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread Jiong Wang
On 04/12/2018 20:10, David Miller wrote: From: Alexei Starovoitov Date: Tue, 4 Dec 2018 11:29:55 -0800 I guess sparc doesn't really have 32 subregisters. All registers are considered 64-bit. It has 32-bit alu ops on 64-bit registers instead. Right. Anyways, sparc will require two

Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread David Miller
From: Alexei Starovoitov Date: Tue, 4 Dec 2018 11:29:55 -0800 > I guess sparc doesn't really have 32 subregisters. All registers > are considered 64-bit. It has 32-bit alu ops on 64-bit registers > instead. Right. Anyways, sparc will require two instructions because of this, the 'sra' then a

Re: [PATCH 1/2] vmalloc: New flag for flush before releasing pages

2018-12-04 Thread Andy Lutomirski
On Tue, Dec 4, 2018 at 12:02 PM Edgecombe, Rick P wrote: > > On Tue, 2018-12-04 at 16:03 +, Will Deacon wrote: > > On Mon, Dec 03, 2018 at 05:43:11PM -0800, Nadav Amit wrote: > > > > On Nov 27, 2018, at 4:07 PM, Rick Edgecombe > > > > wrote: > > > > > > > > Since vfree will lazily flush the

Re: [PATCH v2 net-next 1/1] net: netem: use a list in addition to rbtree

2018-12-04 Thread Eric Dumazet
On 12/04/2018 11:55 AM, Peter Oskolkov wrote: > When testing high-bandwidth TCP streams with large windows, > high latency, and low jitter, netem consumes a lot of CPU cycles > doing rbtree rebalancing. > > This patch uses a linear list/queue in addition to the rbtree: > if an incoming packet

Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread David Miller
From: Peter Oskolkov Date: Tue, 4 Dec 2018 11:10:55 -0800 > Thanks, Stephen! > > I don't care much about braces either. David, do you want me to send a > new patch with braces moved around? Single statement basic blocks definitely must not have curly braces, please remove them and repost.

Re: [oss-drivers] Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread Alexei Starovoitov
On Tue, Dec 04, 2018 at 11:42:54AM -0800, Jakub Kicinski wrote: > On Tue, 4 Dec 2018 11:29:55 -0800, Alexei Starovoitov wrote: > > Regarding the set... It looks good to me. Pls resubmit without RFC tag > > and probably include mips patch as patch 1, so we can apply the whole > > thing to bpf-next.

Re: [PATCH net-next] net: netem: use a list in addition to rbtree

2018-12-04 Thread Peter Oskolkov
On Tue, Dec 4, 2018 at 11:11 AM Peter Oskolkov wrote: > > Thanks, Stephen! > > I don't care much about braces either. David, do you want me to send a > new patch with braces moved around? Sent a v2 with style fixes, just in case. > > On Tue, Dec 4, 2018 at 9:56 AM Stephen Hemminger > wrote: >

[PATCH v2 net-next 0/1] net: netem: use a list _and_ rbtree

2018-12-04 Thread Peter Oskolkov
v2: address style suggestions by Stephen Hemminger. All changes are noop vs v1. Peter Oskolkov (1): net: netem: use a list in addition to rbtree net/sched/sch_netem.c | 89 +-- 1 file changed, 69 insertions(+), 20 deletions(-)

[PATCH v2 net-next 1/1] net: netem: use a list in addition to rbtree

2018-12-04 Thread Peter Oskolkov
When testing high-bandwidth TCP streams with large windows, high latency, and low jitter, netem consumes a lot of CPU cycles doing rbtree rebalancing. This patch uses a linear list/queue in addition to the rbtree: if an incoming packet is past the tail of the linear queue, it is added there,

Re: [PATCH net] sctp: frag_point sanity check

2018-12-04 Thread Marcelo Ricardo Leitner
On Tue, Dec 04, 2018 at 02:39:46PM -0500, Neil Horman wrote: > On Tue, Dec 04, 2018 at 08:27:41PM +0100, Jakub Audykowicz wrote: > > If for some reason an association's fragmentation point is zero, > > sctp_datamsg_from_user will try to endlessly try to divide a message > > into zero-sized chunks.

Re: [PATCH rdma-next 0/7] Enrich DEVX support

2018-12-04 Thread Doug Ledford
On Tue, 2018-12-04 at 12:15 -0700, Jason Gunthorpe wrote: > On Tue, Dec 4, 2018 at 12:02 PM Doug Ledford wrote: > > On Mon, 2018-11-26 at 08:28 +0200, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > From Yishai, > > > --- > > > This series enriches

Re: [oss-drivers] Re: [RFC bpf-next 1/7] bpf: interpreter support BPF_ALU | BPF_ARSH

2018-12-04 Thread Jakub Kicinski
On Tue, 4 Dec 2018 11:29:55 -0800, Alexei Starovoitov wrote: > Regarding the set... It looks good to me. Pls resubmit without RFC tag > and probably include mips patch as patch 1, so we can apply the whole > thing to bpf-next. git will take care of same patch being in two trees. Doesn't it only

Re: [PATCH net] sctp: frag_point sanity check

2018-12-04 Thread Neil Horman
On Tue, Dec 04, 2018 at 08:27:41PM +0100, Jakub Audykowicz wrote: > If for some reason an association's fragmentation point is zero, > sctp_datamsg_from_user will try to endlessly try to divide a message > into zero-sized chunks. This eventually causes kernel panic due to > running out of memory.

Re: [Patch net] mlx5: check for malformed packets

2018-12-04 Thread Saeed Mahameed
On Sat, Dec 1, 2018 at 12:38 PM Cong Wang wrote: > > is_last_ethertype_ip() is used to check IP/IPv6 protocol before > parsing IP/IPv6 headers. > > But __vlan_get_protocol() is only bound to skb->len, a malicious > packet could exhaust all skb->len by inserting sufficient ETH_P_8021AD > headers,

  1   2   >