Re: [PATCH net-next] openvswitch: fix vport packet length check.

2018-03-07 Thread Pravin Shelar
On Tue, Mar 6, 2018 at 5:56 PM, William Tu wrote: > When sending a packet to a tunnel device, the dev's hard_header_len > could be larger than the skb->len in function packet_length(). > In the case of ip6gretap/erspan, hard_header_len = LL_MAX_HEADER + t_hlen, > which is around 180, and an ARP pa

Re: [PATCH net 5/5] tcp: send real dupACKs by locking advertized window for non-SACK flows

2018-03-07 Thread Ilpo Järvinen
On Wed, 7 Mar 2018, Eric Dumazet wrote: > > Currently non-SACK senders cannot identify almost any duplicate ACKs  > > because the window keeps updating for almost all ACKs. As a result,  > > non-SACK senders end up doing loss recovery only with RTO. RTO > > recovery  > > without SACK is quite anno

Re: [PATCH bpf] bpf, x64: increase number of passes

2018-03-07 Thread Eric Dumazet
On Wed, 2018-03-07 at 22:10 +0100, Daniel Borkmann wrote: > In Cilium some of the main programs we run today are hitting 9 passes > on x64's JIT compiler, and we've had cases already where we surpassed > the limit where the JIT then punts the program to the interpreter > instead, leading to inserti

[PATCH PATCH net v2 1/4] hv_netvsc: fix filter flags

2018-03-07 Thread Stephen Hemminger
The recent change to nto always enable all multicast and broadcast was broken; meant to set filter, not change flags. Fixes: 009f766ca238 ("hv_netvsc: filter multicast/broadcast") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/rndis_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH PATCH net v2 4/4] hv_netvsc: fix locking during VF setup

2018-03-07 Thread Stephen Hemminger
The dev_uc/mc_sync calls need to have the device address list locked. This was spotted by running with lockdep enabled. Fixes: bee9d41b37ea ("hv_netvsc: propagate rx filters to VF") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c | 4 1 file changed, 4 insertions(+) di

[PATCH PATCH net v2 2/4] hv_netvsc: avoid repeated updates of packet filter

2018-03-07 Thread Stephen Hemminger
The netvsc driver can get repeated calls to netvsc_rx_mode during network setup; each of these calls ends up scheduling the lower layers to update tha packet filter. This update requires an request/response to the host. So avoid doing this if we already know that the correct packet filter value is

[PATCH PATCH net v2 3/4] hv_netvsc: fix locking for rx_mode

2018-03-07 Thread Stephen Hemminger
The rx_mode operation handler is different than other callbacks in that is not always called with rtnl held. Therefore use RCU to ensure that references are valid. Fixes: bee9d41b37ea ("hv_netvsc: propagate rx filters to VF") Signed-off-by: Stephen Hemminger --- drivers/net/hyperv/netvsc_drv.c |

[PATCH PATCH net v2 0/4] hv_netvsc: fix multicast flags and sync

2018-03-07 Thread Stephen Hemminger
This set of patches deals with the handling of multicast flags and addresses in transparent VF mode. The recent set of patches (in linux-net) had a couple of bugs. Stephen Hemminger (4): hv_netvsc: fix filter flags hv_netvsc: avoid repeated updates of packet filter hv_netvsc: fix locking for

Re: [RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-07 Thread Jesus Sanchez-Palencia
Hi, On 03/06/2018 06:53 PM, Eric Dumazet wrote: > On Tue, 2018-03-06 at 17:12 -0800, Jesus Sanchez-Palencia wrote: >> Extend SO_TXTIME APIs with new per-packet parameters: a clockid_t and >> a drop_if_late flag. With this commit the API becomes: >> >> > > * diff --git a/include/linux/skbuff.h b

Re: [PATCH net 5/5] tcp: send real dupACKs by locking advertized window for non-SACK flows

2018-03-07 Thread Eric Dumazet
On Wed, 2018-03-07 at 23:39 +0200, Ilpo Järvinen wrote: > > The problem I'm trying to fix is due to window increasing (of > course,  > dupacks could also be masked because of decrease but that's something > I've never seen to occur in practice) so I tried to make you happy > and  > change my fix t

Re: [RFC v3 net-next 02/18] net: Clear skb->tstamp only on the forwarding path

2018-03-07 Thread Jesus Sanchez-Palencia
On 03/07/2018 08:59 AM, Willem de Bruijn wrote: > On Tue, Mar 6, 2018 at 8:12 PM, Jesus Sanchez-Palencia > wrote: >> This is done in preparation for the upcoming time based transmission >> patchset. Now that skb->tstamp will be used to hold packet's txtime, >> we must ensure that it is being cle

Re: [PATCH net-next] ip6mr: remove synchronize_rcu() in favor of SOCK_RCU_FREE

2018-03-07 Thread Kirill Tkhai
On 07.03.2018 19:43, Eric Dumazet wrote: > From: Eric Dumazet > > Kirill found that recently added synchronize_rcu() call in > ip6mr_sk_done() > was slowing down netns dismantle and posted a patch to use it only if > the socket > was found. > > I instead suggested to get rid of this call, and us

Re: [PATCH net 2/5] tcp: prevent bogus FRTO undos with non-SACK flows

2018-03-07 Thread Ilpo Järvinen
On Wed, 7 Mar 2018, Yuchung Cheng wrote: > On Wed, Mar 7, 2018 at 11:24 AM, Neal Cardwell wrote: > > On Wed, Mar 7, 2018 at 7:59 AM, Ilpo Järvinen > > wrote: > > > > > > In a non-SACK case, any non-retransmitted segment acknowledged will > > > set FLAG_ORIG_SACK_ACKED in tcp_clean_rtx_queue even

Re: [next-queue PATCH v3 8/8] igb: Add support for adding offloaded clsflower filters

2018-03-07 Thread Vinicius Costa Gomes
Hi, Jakub Kicinski writes: > On Tue, 6 Mar 2018 17:29:57 -0800, Vinicius Costa Gomes wrote: >> This allows filters added by tc-flower and specifying MAC addresses, >> Ethernet types, and the VLAN priority field, to be offloaded to the >> controller. >> >> This reuses most of the infrastructure

RE: [Intel-wired-lan] [next-queue PATCH v3 6/8] igb: Add MAC address support for ethtool nftuple filters

2018-03-07 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Vinicius Costa Gomes > Sent: Tuesday, March 6, 2018 5:30 PM > To: intel-wired-...@lists.osuosl.org > Cc: netdev@vger.kernel.org; Sanchez-Palencia, Jesus palen...@intel.com> > Subject: [Intel-wired-lan] [next-queue P

Re: [RFC v3 iproute2 3/3] tc: Add support for the TBS Qdisc

2018-03-07 Thread Jesus Sanchez-Palencia
Hi, On 03/06/2018 05:51 PM, Stephen Hemminger wrote: > On Tue, 6 Mar 2018 17:16:08 -0800 > Jesus Sanchez-Palencia wrote: > >> atic int tbs_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) >> +{ >> +struct rtattr *tb[TCA_TBS_MAX+1]; >> +struct tc_tbs_qopt *qopt; >> + >> +

Re: [PATCH net-next] openvswitch: fix vport packet length check.

2018-03-07 Thread William Tu
On Wed, Mar 7, 2018 at 1:18 PM, Pravin Shelar wrote: > On Tue, Mar 6, 2018 at 5:56 PM, William Tu wrote: >> When sending a packet to a tunnel device, the dev's hard_header_len >> could be larger than the skb->len in function packet_length(). >> In the case of ip6gretap/erspan, hard_header_len = L

[PATCH 2/2] Documentation: macb: Document phy-handle optional binding

2018-03-07 Thread Brad Mouring
Signed-off-by: Brad Mouring --- Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index 27966ae741e0..457d5ae16f23 100644 --- a/Documentation/devicetre

[PATCH v2 net] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()

2018-03-07 Thread Greg Hackmann
f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a __this_cpu_read() call inside ipcomp_alloc_tfms(). At the time, __this_cpu_read() required the caller to either not care about races or to handle preemption/interrupt issues. 3.15 tightened the rules around some per-cpu operat

[PATCH 1/2] net: macb: Add phy-handle DT support

2018-03-07 Thread Brad Mouring
This optional binding (as described in the ethernet DT bindings doc) directs the netdev to the phydev to use. This is useful for a phy chip that has >1 phy in it, and two netdevs are using the same phy chip (i.e. the second mac's phy lives on the first mac's MDIO bus) The devicetree snippet would

Re: [RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-07 Thread Eric Dumazet
On Wed, 2018-03-07 at 13:52 -0800, Jesus Sanchez-Palencia wrote: > Hi, ... > I should have mentioned on the commit msg, but the tc_drop_if_late is > actually > filling a 1 bit hole that was already there. > > > > > > Do we really need 32 bits for a clockid_t ? > > There is a 2 bytes hole just a

Re: [PATCH bpf] bpf, x64: increase number of passes

2018-03-07 Thread Alexei Starovoitov
On Wed, Mar 07, 2018 at 10:10:01PM +0100, Daniel Borkmann wrote: > In Cilium some of the main programs we run today are hitting 9 passes > on x64's JIT compiler, and we've had cases already where we surpassed > the limit where the JIT then punts the program to the interpreter > instead, leading to

[PATCH] net: phy: Move interrupt check from phy_check to phy_interrupt

2018-03-07 Thread Brad Mouring
If multiple phys share the same interrupt (e.g. a multi-phy chip), the first device registered is the only one checked as phy_interrupt will always return IRQ_HANDLED if the first phydev is not halted. Move the interrupt check into phy_interrupt and, if it was not this phydev, return IRQ_NONE to al

Re: [RFC v3 iproute2 3/3] tc: Add support for the TBS Qdisc

2018-03-07 Thread Stephen Hemminger
On Wed, 7 Mar 2018 14:29:23 -0800 Jesus Sanchez-Palencia wrote: > Hi, > > > On 03/06/2018 05:51 PM, Stephen Hemminger wrote: > > On Tue, 6 Mar 2018 17:16:08 -0800 > > Jesus Sanchez-Palencia wrote: > > > >> atic int tbs_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) > >> +{ >

Re: [RFC v3 net-next 08/18] net: SO_TXTIME: Add clockid and drop_if_late params

2018-03-07 Thread David Miller
From: Eric Dumazet Date: Wed, 07 Mar 2018 14:45:45 -0800 > No, we need to be extra careful. +1

Re: [PATCH net-next 0/2] RDS: zerocopy code enhancements

2018-03-07 Thread David Miller
From: Sowmini Varadhan Date: Tue, 6 Mar 2018 07:22:32 -0800 > A couple of enhancements to the rds zerocop code > - patch 1 refactors rds_message_copy_from_user to pull the zcopy logic > into its own function > - patch 2 drops the usage sk_buff to track MSG_ZEROCOPY cookies and > uses a simpl

Re: [pull request][for-next V2 00/13] Mellanox, mlx5 IPSec updates 2018-02-28-1

2018-03-07 Thread Saeed Mahameed
On Wed, 2018-03-07 at 15:57 -0500, Doug Ledford wrote: > On Wed, 2018-03-07 at 15:41 -0500, Doug Ledford wrote: > > On Wed, 2018-03-07 at 15:31 -0500, David Miller wrote: > > > From: Saeed Mahameed > > > Date: Tue, 6 Mar 2018 22:35:03 -0800 > > > > > > > This series includes shared code updates

Re: [PATCH net-next] ip6mr: remove synchronize_rcu() in favor of SOCK_RCU_FREE

2018-03-07 Thread David Miller
From: Eric Dumazet Date: Wed, 07 Mar 2018 08:43:19 -0800 > From: Eric Dumazet > > Kirill found that recently added synchronize_rcu() call in > ip6mr_sk_done() > was slowing down netns dismantle and posted a patch to use it only if > the socket > was found. > > I instead suggested to get rid of

Re: linux-next: manual merge of the selinux tree with the net-next tree

2018-03-07 Thread Paul Moore
On Wed, Mar 7, 2018 at 3:26 PM, David Miller wrote: > From: Paul Moore > Date: Wed, 7 Mar 2018 15:20:33 -0500 > >>> So you would only have to wait until my tree went in before >>> sending your pull request. >> >> So you would want me to rebase selinux/next on top of Linus' tree in >> the middle o

[PATCHv2 net-next] openvswitch: fix vport packet length check.

2018-03-07 Thread William Tu
When sending a packet to a tunnel device, the dev's hard_header_len could be larger than the skb->len in function packet_length(). In the case of ip6gretap/erspan, hard_header_len = LL_MAX_HEADER + t_hlen, which is around 180, and an ARP packet sent to this tunnel has skb->len = 42. This causes th

[PATCH 1/3] ibmvnic: Clean up device close

2018-03-07 Thread Thomas Falcon
Remove some dead code now that RX pools are being cleaned. This was included to wait until any pending RX queue interrupts are processed, but NAPI polling should be disabled by this point. Another minor change is to use the net device parameter for any print functions instead of accessing it from

[PATCH 2/3] ibmvnic: Reorganize device close

2018-03-07 Thread Thomas Falcon
Introduce a function to halt network operations and clean up any unused or outstanding socket buffers. Then, during device close, disable backing adapter before halting all queues and performing cleanup. This ensures all backing device operations will be stopped before the driver cleans up shared r

[PATCH 0/3] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread Thomas Falcon
This patch set cleans up and reorganizes the driver's net_device close function and leverages that to fix up a bug that can occur during some device resets. Some reset cases require the backing adapter to be disabled before continuing, but other cases, such as during a device failover or partition

[PATCH 3/3] ibmvnic: Do not disable device during failover or partition migration

2018-03-07 Thread Thomas Falcon
During a device failover or partition migration reset, it is not necessary to disable the backing adapter since it should not be running yet and its Command-Response Queue is closed. Sending device commands during this time could result in an error or timeout disrupting the reset process. In these

Re: [PATCH 0/3] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread Thomas Falcon
On 03/07/2018 05:41 PM, Thomas Falcon wrote: > This patch set cleans up and reorganizes the driver's net_device > close function and leverages that to fix up a bug that can occur > during some device resets. Some reset cases require the backing > adapter to be disabled before continuing, but other

Re: [PATCH net 4/5] tcp: prevent bogus undos when SACK is not enabled

2018-03-07 Thread Yuchung Cheng
On Wed, Mar 7, 2018 at 12:19 PM, Neal Cardwell wrote: > > On Wed, Mar 7, 2018 at 7:59 AM, Ilpo Järvinen > wrote: > > A bogus undo may/will trigger when the loss recovery state is > > kept until snd_una is above high_seq. If tcp_any_retrans_done > > is zero, retrans_stamp is cleared in this trans

[RESEND PATCH 2/3 net-next] ibmvnic: Reorganize device close

2018-03-07 Thread Thomas Falcon
Introduce a function to halt network operations and clean up any unused or outstanding socket buffers. Then, during device close, disable backing adapter before halting all queues and performing cleanup. This ensures all backing device operations will be stopped before the driver cleans up shared r

[RESEND PATCH 3/3 net-next] ibmvnic: Do not disable device during failover or partition migration

2018-03-07 Thread Thomas Falcon
During a device failover or partition migration reset, it is not necessary to disable the backing adapter since it should not be running yet and its Command-Response Queue is closed. Sending device commands during this time could result in an error or timeout disrupting the reset process. In these

[RESEND PATCH 0/3 net-next] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread Thomas Falcon
This patch set cleans up and reorganizes the driver's net_device close function and leverages that to fix up a bug that can occur during some device resets. Some reset cases require the backing adapter to be disabled before continuing, but other cases, such as during a device failover or partition

[RESEND PATCH 1/3 net-next] ibmvnic: Clean up device close

2018-03-07 Thread Thomas Falcon
Remove some dead code now that RX pools are being cleaned. This was included to wait until any pending RX queue interrupts are processed, but NAPI polling should be disabled by this point. Another minor change is to use the net device parameter for any print functions instead of accessing it from

RE: [Intel-wired-lan] [next-queue PATCH v3 6/8] igb: Add MAC address support for ethtool nftuple filters

2018-03-07 Thread Vinicius Costa Gomes
Hi, "Brown, Aaron F" writes: >> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On >> Behalf Of Vinicius Costa Gomes >> Sent: Tuesday, March 6, 2018 5:30 PM >> To: intel-wired-...@lists.osuosl.org >> Cc: netdev@vger.kernel.org; Sanchez-Palencia, Jesus > palen...@intel.com> >> S

[PATCH] net: remove VLA usage

2018-03-07 Thread Laszlo Toth
Separated snmp_seq_show_tcp_udp() to tcp and udp variants, so the usage of max_t() for the array size can be emitted. Signed-off-by: Laszlo Toth --- net/ipv4/proc.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c ind

[next-queue PATCH v4 5/8] igb: Enable nfc filters to specify MAC addresses

2018-03-07 Thread Vinicius Costa Gomes
This allows igb_add_filter()/igb_erase_filter() to work on filters that include MAC addresses (both source and destination). For now, this only exposes the functionality, the next commit glues ethtool into this. Later in this series, these APIs are used to allow offloading of cls_flower filters.

[next-queue PATCH v4 2/8] igb: Fix queue selection on MAC filters on i210 and i211

2018-03-07 Thread Vinicius Costa Gomes
On the RAH registers there are semantic differences on the meaning of the "queue" parameter for traffic steering depending on the controller model: there is the 82575 meaning, which "queue" means a RX Hardware Queue, and the i350 meaning, where it is a reception pool. The previous behaviour was ha

[next-queue PATCH v4 1/8] igb: Fix not adding filter elements to the list

2018-03-07 Thread Vinicius Costa Gomes
Because the order of the parameters passes to 'hlist_add_behind()' was inverted, the 'parent' node was added "behind" the 'input', as input is not in the list, this causes the 'input' node to be lost. Fixes: 0e71def25281 ("igb: add support of RX network flow classification") Signed-off-by: Viniciu

[next-queue PATCH v4 3/8] igb: Enable the hardware traffic class feature bit for igb models

2018-03-07 Thread Vinicius Costa Gomes
This will allow functionality depending on the hardware being traffic class aware to work. In particular the tc-flower offloading checks verifies that this bit is set. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff

[next-queue PATCH v3 0/8] igb: offloading of receive filters

2018-03-07 Thread Vinicius Costa Gomes
Hi, Changes from v3: - Addressed review comments from Aaron F. Brown and Jakub Kicinski; Changes from v2: - Addressed review comments from Jakub Kicinski, mostly about coding style adjustments and more consistent error reporting; Changes from v1: - Addressed review comments from Alexand

[next-queue PATCH v4 4/8] igb: Add support for MAC address filters specifying source addresses

2018-03-07 Thread Vinicius Costa Gomes
Makes it possible to direct packets to queues based on their source address. Documents the expected usage of the 'flags' parameter. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/e1000_defines.h | 1 + drivers/net/ethernet/intel/igb/igb.h | 1 + drivers/net/et

[next-queue PATCH v4 7/8] igb: Add the skeletons for tc-flower offloading

2018-03-07 Thread Vinicius Costa Gomes
This adds basic functions needed to implement offloading for filters created by tc-flower. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igb/igb_main.c | 66 +++ 1 file changed, 66 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_mai

[next-queue PATCH v4 6/8] igb: Add MAC address support for ethtool nftuple filters

2018-03-07 Thread Vinicius Costa Gomes
This adds the capability of configuring the queue steering of arriving packets based on their source and destination MAC addresses. In practical terms this adds support for the following use cases, characterized by these examples: $ ethtool -N eth0 flow-type ether dst aa:aa:aa:aa:aa:aa action 0 (

[next-queue PATCH v4 8/8] igb: Add support for adding offloaded clsflower filters

2018-03-07 Thread Vinicius Costa Gomes
This allows filters added by tc-flower and specifying MAC addresses, Ethernet types, and the VLAN priority field, to be offloaded to the controller. This reuses most of the infrastructure used by ethtool, but clsflower filters are kept in a separated list, so they are invisible to ethtool. Signed

pull-request: bpf 2018-03-08

2018-03-07 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix various BPF helpers which adjust the skb and its GSO information with regards to SCTP GSO. The latter is a special case where gso_size is of value GSO_BY_FRAGS, so mangling that will

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-07 Thread Luis R. Rodriguez
On Mon, Mar 05, 2018 at 05:34:57PM -0800, Alexei Starovoitov wrote: > As the first step in development of bpfilter project [1] So meta :) The URL refers an lwn article, which in turn refers to this effort's first RFC. As someone only getting *one* of these patches in emails, It would be useful if

Re: [PATCH 0/3] ibmvnic: Clean up net close and fix reset bug

2018-03-07 Thread David Miller
From: Thomas Falcon Date: Wed, 7 Mar 2018 17:43:06 -0600 > Crud, this series is meant for the net-next tree, but I forgot to > include it in the patch tag. I know I'm really stubborn about a lot of things :-), but next time you can just reply like this explaining things and that is enough for me

[pull request][for-next 00/11] Mellanox, mlx5 IPSec updates 2018-02-28-2 (Part 2)

2018-03-07 Thread Saeed Mahameed
Hi Dave and Doug, This series includes shared code updates (IPSec part2) for mlx5 core driver for both netdev and rdma subsystems. This series should be pulled to both trees so we can continue netdev and rdma specific submissions separately. Mainly it includes two fixes for previous pull reques

Re: [PATCH] net: remove VLA usage

2018-03-07 Thread David Miller
From: Laszlo Toth Date: Thu, 8 Mar 2018 01:19:53 +0100 > Separated snmp_seq_show_tcp_udp() to tcp and udp variants, > so the usage of max_t() for the array size can be emitted. > > Signed-off-by: Laszlo Toth But it's a max on a constant value, computed at compile time. I don't see at all why

[for-next 03/11] net/mlx5e: IPSec, Add support for ESP trailer removal by hardware

2018-03-07 Thread Saeed Mahameed
From: Yossi Kuperman Current hardware decrypts and authenticates incoming ESP packets. Subsequently, the software extracts the nexthdr field, truncates the trailer and adjusts csum accordingly. With this patch and a capable device, the trailer is being removed by the hardware and the nexthdr fie

[for-next 01/11] net/mlx5: Use MLX5_IPSEC_DEV macro for ipsec caps

2018-03-07 Thread Saeed Mahameed
Fix build break of mlx5_accel_ipsec_device_caps is not defined when MLX5_ACCEL is not selected, use MLX5_IPSEC_DEV instead which handles such case. Signed-off-by: Saeed Mahameed Reported-by: Doug Ledford --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 3 +-- 1 file changed, 1 insertion(

[for-next 04/11] net/mlx5: IPSec, Add command V2 support

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel This patch adds V2 command support. New fpga devices support extended features (udp encap, esn etc...), this features require new hardware sadb format therefore we have a new version of commands to manipulate it. Signed-off-by: Yossef Efraim Signed-off-by: Aviad Yehezkel S

[for-next 05/11] net/mlx5: Export ipsec capabilities

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel We will need that for ipsec verbs. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 3 +- .../net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 14 +- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c

[for-next 09/11] net/mlx5e: Added common function for to_ipsec_sa_entry

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel New function for getting driver internal sa entry from xfrm state. All checks are done in one function. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 29 ++ 1 file changed, 19 inser

[for-next 06/11] net/mlx5: Added required metadata capability for ipsec

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel Currently our device requires additional metadata in packet to perform ipsec crypto offload. Signed-off-by: Aviad Yehezkel Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c | 6 -- include/linux/mlx5/accel.h

[for-next 11/11] net/mlx5: Fix wrongly assigned CQ reference counter

2018-03-07 Thread Saeed Mahameed
From: Leon Romanovsky The kernel compiled with CONFIG_REFCOUNT_FULL produces the following error. The reason to it that initial value of refcount_t is supposed to be more than 0, change it. [3.106634] [ cut here ] [3.107756] refcount_t: increment on 0; use-after-f

[for-next 10/11] net/mlx5: IPSec, Add support for ESN

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel Currently ESN is not supported with IPSec device offload. This patch adds ESN support to IPsec device offload. Implementing new xfrm device operation to synchronize offloading device ESN with xfrm received SN. New QP command to update SA state at the following: E

[for-next 07/11] net/mlx5: Refactor accel IPSec code

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel The current code has one layer that executed FPGA commands and the Ethernet part directly used this code. Since downstream patches introduces support for IPSec in mlx5_ib, we need to provide some abstractions. This patch refactors the accel code into one layer that creates a

[for-next 08/11] net/mlx5: Add flow-steering commands for FPGA IPSec implementation

2018-03-07 Thread Saeed Mahameed
From: Aviad Yehezkel In order to add a context to the FPGA, we need to get both the software transform context (which includes the keys, etc) and the source/destination IPs (which are included in the steering rule). Therefore, we register new set of firmware like commands for the FPGA. Each time

[for-next 02/11] net/mlx5: IPSec, Generalize sandbox QP commands

2018-03-07 Thread Saeed Mahameed
From: Yossi Kuperman The current code assume only SA QP commands. Refactor in order to pave the way for new QP commands: 1. Generic cmd response format. 2. SA cmd checks are in dedicated functions. 3. Aligned debug prints. Signed-off-by: Yossi Kuperman Signed-off-by: Aviad Yehezkel Signed-off-

Re: pull-request: bpf 2018-03-08

2018-03-07 Thread David Miller
From: Daniel Borkmann Date: Thu, 8 Mar 2018 02:17:16 +0100 > The following pull-request contains BPF updates for your *net* tree. > > The main changes are: > > 1) Fix various BPF helpers which adjust the skb and its GSO information >with regards to SCTP GSO. The latter is a special case wh

Re: [PATCH bpf-next 0/2] bpf: add support for bpf program to read perf event sample address

2018-03-07 Thread Daniel Borkmann
On 03/06/2018 07:55 PM, Teng Qin wrote: > These patches add support that allows bpf programs attached to perf events to > read the address values recorded with the perf events. These values are > requested by specifying sample_type with PERF_SAMPLE_ADDR when calling > perf_event_open(). > > The ma

Re: pull-request: bpf 2018-03-08

2018-03-07 Thread Daniel Borkmann
On 03/08/2018 02:31 AM, David Miller wrote: > From: Daniel Borkmann > Date: Thu, 8 Mar 2018 02:17:16 +0100 > >> The following pull-request contains BPF updates for your *net* tree. >> >> The main changes are: >> >> 1) Fix various BPF helpers which adjust the skb and its GSO information >>wit

Re: linux-next: manual merge of the selinux tree with the net-next tree

2018-03-07 Thread Stephen Rothwell
Hi all, On Mon, 5 Mar 2018 12:40:54 +1100 Stephen Rothwell wrote: > > Today's linux-next merge of the selinux tree got a conflict in: > > net/sctp/socket.c > > between several refactoring commits from the net-next tree and commit: > > 2277c7cd75e3 ("sctp: Add LSM hooks") > > from the sel

[net-next:master 178/193] drivers/net/ipvlan/ipvlan.h:183:32: sparse: incompatible types in comparison expression (different address spaces)

2018-03-07 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: a366e300ae9fc466d333e6d8f2bc5d58ed248041 commit: 1ec54cb44e6731c3cb251bcf9251d65a4b4f6306 [178/193] net: unpollute priv_flags space reproduce: # apt-get install sparse git checkout 1ec54cb44e

[PATCH net-next 04/23] {topost} net: hns3: fix endian issue when PF get mbx message flag

2018-03-07 Thread Peng Li
This patch fixes the endian issue when PF get mbx message flag. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ether

[PATCH net-next 22/23] {topost} net: hns3: set the max ring num when alloc netdev

2018-03-07 Thread Peng Li
HNS3 driver should alloc netdev with max support ring num, as driver support change netdev count by ethtool -L. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 27 - 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/net/e

[PATCH net-next 16/23] {topost} net: hns3: fix for coalesce configuration lost during reset

2018-03-07 Thread Peng Li
From: Yunsheng Lin Coalesce configuration will be set to default value by hns3_nic_init_vector_data during reset, which causes the coalesce configuration loss problem. This patch fixes it by setting the default value in hns3_nic_alloc_vector_data, which will not be called in the reset process.

netdev@vger.kernel.org

2018-03-07 Thread Peng Li
Command HCLGE_OPC_CFG_COM_TQP_QUEUE should use queue id in the function, but command HCLGE_OPC_RESET_TQP_QUEUE should use global queue id. This patch fixes the queue id about queue enable/disable/reset. Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 50 ++

[PATCH net-next 15/23] {topost} net: hns3: refactor the get/put_vector function

2018-03-07 Thread Peng Li
From: Yunsheng Lin There is a get_vector function, which allocate the vectors for a client, but there is not a put_vector to free the vector. This patch introduces the put_vector function in order to fix the coalesce configuration lost problem during reset process. Signed-off-by: Yunsheng Lin

[PATCH net-next 20/23] {topost} net: hns3: fix for buffer overflow smatch warning

2018-03-07 Thread Peng Li
From: Yunsheng Lin This patch fixes the buffer overflow warning by refactoring hclgevf_bind_ring_to_vector and hclge_get_ring_chain_from_mbx. Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Fixes: dde1a86e93ca ("net: hns3: Add mailbox support to PF drive

[PATCH net-next 23/23] {topost} net: hns3: add support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info

2018-03-07 Thread Peng Li
This patch adds support for VF driver inner interface hclgevf_ops.get_tqps_and_rss_info. This interface will be used in the initialization process. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a

[PATCH net-next 17/23] {topost} net: hns3: refactor the coalesce related struct

2018-03-07 Thread Peng Li
From: Yunsheng Lin This patch refoctors the coalesce related struct by introducing the hns3_enet_coalesce struct, in order to fix the coalesce configuation lost problem when changing the channel number. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3

[PATCH net-next 18/23] {topost} net: hns3: fix for coal configuation lost when setting the channel

2018-03-07 Thread Peng Li
From: Yunsheng Lin This patch fixes the coalesce configuation lost problem when setting the channel number by restoring all vectors's coalesce configuation to vector 0's, because all vectors belonging to the same netdev have the same coalesce configuation for now. Signed-off-by: Yunsheng Lin Si

[PATCH net-next 03/23] {topost} net: hns3: set the cmdq out_vld bit to 0 after used

2018-03-07 Thread Peng Li
Driver check the out_vld bit when get a new cmdq BD, if the bit is 1, the BD is valid. driver Should set the bit 0 after used and hw will set the bit 1 if get a valid BD. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 1 + drivers/net/ethernet/hisilicon/hns

[PATCH net-next 19/23] {topost} net: hns3: fix for loopback failure when vlan filter is enable

2018-03-07 Thread Peng Li
From: Yunsheng Lin When vlan ctag filter is enabled, the loopback selftest fails because loopback selftest does not support vlan. This patch fixes it by disabling the vlan ctag filter when runnig loopback selftest. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- drivers/net/ethernet/h

[PATCH net-next 09/23] {topost} net: hns3: add support for querying pfc puase packets statistic

2018-03-07 Thread Peng Li
This patch add support for querying pfc puase packets statistic in hclge_ieee_getpfc, which is used to tell user how many pfc puase packets have been sent and received by this mac port. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 1

[PATCH net-next 10/23] {topost} net: hns3: refactor the hclge_get/set_rss function

2018-03-07 Thread Peng Li
From: Yunsheng Lin This patch refactors the hclge_get/set_rss function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 39 -- .../ethernet/h

[PATCH net-next 13/23] {topost} net: hns3: fix for pause configuration lost during reset

2018-03-07 Thread Peng Li
From: Yunsheng Lin Pause configuration will be set to default value by hclge_tm_schd_init during reset, which causes the RSS configuration loss problem. This patch fixes it by calling hclge_tm_init_hw during reset process , which will set the pause configuration to default value. Signed-off-by:

[PATCH net-next 02/23] {topost} net: hns3: add existence check when remove old uc mac address

2018-03-07 Thread Peng Li
From: Fuyun Liang When driver is in initial state, the mac_vlan table table is empty. So the delete operation for mac address must fail. Existence check is needed here. Otherwise, the error message will make user confused. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibi

[PATCH net-next 11/23] {topost} net: hns3: refactor the hclge_get/set_rss_tuple function

2018-03-07 Thread Peng Li
From: Yunsheng Lin This patch refactors the hclge_get/set_rss_tuple function in order to fix the rss configuration loss problem during reset process. Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 91 +- .../ethe

[PATCH net-next 07/23] {topost} net: hns3: unify the pause params setup function

2018-03-07 Thread Peng Li
From: Fuyun Liang Since the firmware cmd to setup mac pause params is the same as the firmware cmd to pfc pause params, this patch unifies the pause params setup function. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c| 2 +- .../net

[PATCH net-next 08/23] {topost} net: hns3: fix rx path skb->truesize reporting bug

2018-03-07 Thread Peng Li
Original skb->truesize reports the received packet size, not the actual buffer size NIC driver allocated(1 Page). The linux net protocol will misjudge the true size of rx queue. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 10 -- 1 file changed, 4 insertio

[PATCH net-next 00/23] net: hns3: HNS3 bug fixes & code improvements

2018-03-07 Thread Peng Li
This patch-set introduces various HNS3 bug fixes, optimizations and code improvements. Fuyun Liang (4): {topost} net: hns3: add existence check when remove old uc mac address {topost} net: hns3: fix for netdev not running problem after calling net_stop and net_open {topost} net: hns3: fi

[PATCH net-next 14/23] {topost} net: hns3: fix for use-after-free when setting ring parameter

2018-03-07 Thread Peng Li
From: Yunsheng Lin In hns3_set_ringparam, hns3_uninit_all_ring frees the memory pointed by priv->ring_data[i].ring, and hns3_change_all_ring_bd_num use that pointer without mallocing, which will cause a use-after-free problem. The patch fixes it by not freeing the memory in hns3_uninit_all_ring,

[PATCH net-next 05/23] {topost} net: hns3: fix for netdev not running problem after calling net_stop and net_open

2018-03-07 Thread Peng Li
From: Fuyun Liang The link status update function is called by timer every second. But net_stop and net_open may be called with very short intervals. The link status update function can not detect the link state has changed. It causes the netdev not running problem. This patch fixes it by updati

Re: [PATCHv2 net-next] openvswitch: fix vport packet length check.

2018-03-07 Thread Pravin Shelar
On Wed, Mar 7, 2018 at 3:38 PM, William Tu wrote: > When sending a packet to a tunnel device, the dev's hard_header_len > could be larger than the skb->len in function packet_length(). > In the case of ip6gretap/erspan, hard_header_len = LL_MAX_HEADER + t_hlen, > which is around 180, and an ARP pa

[PATCH net-next 12/23] {topost} net: hns3: fix for RSS configuration loss problem during reset

2018-03-07 Thread Peng Li
From: Yunsheng Lin RSS configuration will be set to default value by hclge_rss_init_hw during reset, which causes the RSS configuration loss problem. This patch fixes it by setting the default value in hclge_rss_init_cfg function, which will not be called in the reset process. Signed-off-by: Yu

[PATCH net-next 06/23] {topost} net: hns3: fix for ipv6 address loss problem after setting channels

2018-03-07 Thread Peng Li
From: Fuyun Liang The function of dev_close and dev_open is just likes ifconfig down and ifconfig up. The ipv6 address will be lost after dev_close and dev_open are called. This patch uses hns3_nic_net_stop to replace dev_close and uses hns3_nic_net_open to replace dev_open. Signed-off-by: Fuy

[PATCH net-next 01/23] {topost} net: hns3: VF should get the real rss_size instead of rss_size_max

2018-03-07 Thread Peng Li
VF driver should get the real rss_size which is assigned by host PF, not rss_size_max. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/d

[PATCH v2 1/3] vsprintf: Remove accidental VLA usage

2018-03-07 Thread Kees Cook
In the quest to remove all stack VLAs from the kernel[1], this introduces a new "simple max" macro, and changes the "sym" array size calculation to use it. The value is actually a fixed size, but since the max() macro uses some extensive tricks for safety, it ends up looking like a variable size to

[PATCH 3/3] btrfs: tree-checker: Avoid accidental stack VLA

2018-03-07 Thread Kees Cook
In the quest to remove all stack VLAs from the kernel[1], this refactors the stack array size calculation to avoid using max(), which makes the compiler think the size isn't fixed. [1] https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Kees Cook --- fs/btrfs/tree-checker.c | 3 ++- 1 file change

[PATCH 0/3] Remove accidental VLA usage

2018-03-07 Thread Kees Cook
This series adds SIMPLE_MAX() to be used in places where a stack array is actually fixed, but the compiler still warns about VLA usage due to confusion caused by the safety checks in the max() macro. I'm sending these via -mm since that's where I've introduced SIMPLE_MAX(), and they should all hav

<    1   2   3   4   >