Re: [v2,0/2] tools: bpftool: add net attach/detach command to attach XDP prog

2019-08-01 Thread Y Song
On Thu, Aug 1, 2019 at 1:33 AM Daniel T. Lee wrote: > > Currently, bpftool net only supports dumping progs attached on the > interface. To attach XDP prog on interface, user must use other tool > (eg. iproute2). By this patch, with `bpftool net attach/detach`, user > can attach/detach XDP prog on

Re: [v2,2/2] tools: bpftool: add net detach command to detach XDP on interface

2019-08-01 Thread Y Song
On Thu, Aug 1, 2019 at 2:04 AM Daniel T. Lee wrote: > > By this commit, using `bpftool net detach`, the attached XDP prog can > be detached. Detaching the BPF prog will be done through libbpf > 'bpf_set_link_xdp_fd' with the progfd set to -1. > > Signed-off-by: Daniel T. Lee > --- > Changes in v2

Re: [v2,1/2] tools: bpftool: add net attach command to attach XDP on interface

2019-08-01 Thread Y Song
On Thu, Aug 1, 2019 at 2:04 AM Daniel T. Lee wrote: > > By this commit, using `bpftool net attach`, user can attach XDP prog on > interface. New type of enum 'net_attach_type' has been made, as stated at > cover-letter, the meaning of 'attach' is, prog will be attached on interface. > > BPF prog w

[PATCH net-next] cnic: Explicitly initialize all reference counts to 0.

2019-08-01 Thread Michael Chan
The driver is relying on zero'ed allocated memory and does not explicitly call atomic_set() to initialize the ref counts to 0. Add these atomic_set() calls so that it will be more straight forward to convert atomic ref counts to refcount_t. Reported-by: Chuhong Yuan Cc: Rasesh Mody Cc: Signed-

Re: [v2,0/2] tools: bpftool: add net attach/detach command to attach XDP prog

2019-08-01 Thread Daniel T. Lee
Thank you for letting me know. I will add to next version of patch. And, thank you for the detailed review. :) On Fri, Aug 2, 2019 at 8:21 AM Jakub Kicinski wrote: > > On Thu, 1 Aug 2019 17:11:31 +0900, Daniel T. Lee wrote: > > Currently, bpftool net only supports dumping progs attached on the

Re: [v2,1/2] tools: bpftool: add net attach command to attach XDP on interface

2019-08-01 Thread Daniel T. Lee
On Fri, Aug 2, 2019 at 8:36 AM Jakub Kicinski wrote: > > On Thu, 1 Aug 2019 17:11:32 +0900, Daniel T. Lee wrote: > > By this commit, using `bpftool net attach`, user can attach XDP prog on > > interface. New type of enum 'net_attach_type' has been made, as stated at > > cover-letter, the meaning

Re: [PATCH net] ipv4/route: do not check saddr dev if iif is LOOPBACK_IFINDEX

2019-08-01 Thread David Ahern
On 8/1/19 10:13 PM, Hangbin Liu wrote: > On Thu, Aug 01, 2019 at 01:51:25PM -0600, David Ahern wrote: >> On 8/1/19 2:29 AM, Hangbin Liu wrote: >>> Jianlin reported a bug that for IPv4, ip route get from src_addr would fail >>> if src_addr is not an address on local system. >>> >>> \# ip route get 1

Re: [PATCH net] ipv4/route: do not check saddr dev if iif is LOOPBACK_IFINDEX

2019-08-01 Thread Hangbin Liu
On Thu, Aug 01, 2019 at 01:51:25PM -0600, David Ahern wrote: > On 8/1/19 2:29 AM, Hangbin Liu wrote: > > Jianlin reported a bug that for IPv4, ip route get from src_addr would fail > > if src_addr is not an address on local system. > > > > \# ip route get 1.1.1.1 from 2.2.2.2 > > RTNETLINK answers

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-01 Thread David Ahern
On 8/1/19 6:19 PM, Alexei Starovoitov wrote: > Do you really need 'sleep 1' everywhere? > It makes them so slow to run... > What happens if you just remove it ? Tests will fail? Why? yes, the sleep 1 is needed. A server process is getting launched into the background. It's status is not relevant;

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-01 Thread David Ahern
On 8/1/19 6:19 PM, Alexei Starovoitov wrote: > On Thu, Aug 01, 2019 at 11:56:33AM -0700, David Ahern wrote: >> From: David Ahern >> >> This is a port the functional test cases created during the development >> of the VRF feature. It covers various permutations of icmp, tcp and udp >> for IPv4 and

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-01 Thread Jakub Kicinski
On Fri, 2 Aug 2019 10:47:26 +0800, wenxu wrote: > > After all the same device may have both a TC block and a NFT block. > > Only one subsystem can be used for the same device for both indr-dev and > hw-dev > the flow_block_cb_is_busy avoid the situation you mentioned. AFAIU that's a temporary

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-01 Thread wenxu
On 8/2/2019 7:11 AM, Jakub Kicinski wrote: > On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: >> From: wenxu >> >> The new flow-indr-block can't get the tcf_block >> directly. It provide a callback list to find the flow_block immediately >> when the device register and contain a ingres

Re: [net v1 PATCH 4/4] net: fix bpf_xdp_adjust_head regression for generic-XDP

2019-08-01 Thread Jakub Kicinski
On Thu, 01 Aug 2019 20:00:31 +0200, Jesper Dangaard Brouer wrote: > When generic-XDP was moved to a later processing step by commit > 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") > a regression was introduced when using bpf_xdp_adjust_head. > > The issue is that after this c

Re: [PATCH net 0/2] flow_offload hardware priority fixes

2019-08-01 Thread Jakub Kicinski
On Thu, 1 Aug 2019 13:28:15 +0200, Pablo Neira Ayuso wrote: > Please, apply, thank you. I'm still waiting for a reply. Perhaps since Pablo doesn't want to talk to me someone else can explain to me why we want to seemingly diverge from the software model?

Re: [PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-01 Thread Alexei Starovoitov
On Thu, Aug 01, 2019 at 11:56:33AM -0700, David Ahern wrote: > From: David Ahern > > This is a port the functional test cases created during the development > of the VRF feature. It covers various permutations of icmp, tcp and udp > for IPv4 and IPv6 including negative tests. Thanks a lot for do

Re: [net-next 2/9] i40e: make visible changed vf mac on host

2019-08-01 Thread Shannon Nelson
On 8/1/19 1:51 PM, Jeff Kirsher wrote: From: Aleksandr Loktionov This patch makes changed VM mac address visible on host via ip link show command. This problem is fixed by copying last unicast mac filter to vf->default_lan_addr.addr. Without this patch if VF MAC was not set from host side and i

[PATCH net-next] selftests: Add l2tp tests

2019-08-01 Thread David Ahern
From: David Ahern Add IPv4 and IPv6 l2tp tests. Current set is over IP and with IPsec. Signed-off-by: David Ahern --- The ipsec tests expose a netdev refcount leak that I have not had time to track down, but the tests themselves are good. tools/testing/selftests/net/l2tp.sh | 382

Re: [PATCH v3 bpf-next 02/12] libbpf: implement BPF CO-RE offset relocation algorithm

2019-08-01 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 11:47:53PM -0700, Andrii Nakryiko wrote: > This patch implements the core logic for BPF CO-RE offsets relocations. > Every instruction that needs to be relocated has corresponding > bpf_offset_reloc as part of BTF.ext. Relocations are performed by trying > to match recorded

Re: [PATCH] net: sched: use temporary variable for actions indexes

2019-08-01 Thread Cong Wang
On Thu, Aug 1, 2019 at 6:03 AM wrote: > > From: Dmytro Linkin > > Currently init call of all actions (except ipt) init their 'parm' > structure as a direct pointer to nla data in skb. This leads to race > condition when some of the filter actions were initialized successfully > (and were assigned

Re: [v2,1/2] tools: bpftool: add net attach command to attach XDP on interface

2019-08-01 Thread Jakub Kicinski
On Thu, 1 Aug 2019 17:11:32 +0900, Daniel T. Lee wrote: > By this commit, using `bpftool net attach`, user can attach XDP prog on > interface. New type of enum 'net_attach_type' has been made, as stated at > cover-letter, the meaning of 'attach' is, prog will be attached on interface. > > BPF pro

Re: [v2,0/2] tools: bpftool: add net attach/detach command to attach XDP prog

2019-08-01 Thread Jakub Kicinski
On Thu, 1 Aug 2019 17:11:31 +0900, Daniel T. Lee wrote: > Currently, bpftool net only supports dumping progs attached on the > interface. To attach XDP prog on interface, user must use other tool > (eg. iproute2). By this patch, with `bpftool net attach/detach`, user > can attach/detach XDP prog o

Re: [PATCH net-next v5 5/6] flow_offload: support get flow_block immediately

2019-08-01 Thread Jakub Kicinski
On Thu, 1 Aug 2019 11:03:46 +0800, we...@ucloud.cn wrote: > From: wenxu > > The new flow-indr-block can't get the tcf_block > directly. It provide a callback list to find the flow_block immediately > when the device register and contain a ingress block. > > Signed-off-by: wenxu First of all t

[PATCH net] gve: Fix case where desc_cnt and data_cnt can get out of sync

2019-08-01 Thread Catherine Sullivan
desc_cnt and data_cnt should always be equal. In the case of a dropped packet desc_cnt was still getting updated (correctly), data_cnt was not. To eliminate this bug and prevent it from recurring this patch combines them into one ring level cnt. Signed-off-by: Catherine Sullivan Reviewed-by: Sagi

[net-next 03/11] fm10k: reduce the scope of qv local variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the qv vector pointer local variable in the fm10k_set_coalesce function. This was detected by cppcheck and resolves the following style warning produced by that tool: [fm10k_ethtool.c:658]: (style) The scope of the variable 'qv' can be reduced. Signed-off

[net-next 08/11] fm10k: reduce the scope of the local i variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the local loop variable in the fm10k_check_hang_subtask function. This was detected by cppcheck and resolves the following warning produced by that tool: [driver/fm10k_pci.c:852]: (style) The scope of the variable 'i' can be reduced. Signed-off-by: Jacob

[net-next 04/11] fm10k: reduce the scope of local err variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the local err variable in the fm10k_iov_alloc_data function. This was detected by cppcheck and resolves the following style warning produced by that tool: [fm10k_iov.c:426]: (style) The scope of the variable 'err' can be reduced. Signed-off-by: Jacob Kell

[net-next 06/11] fm10k: reduce the scope of the tx_buffer variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller The tx_buffer local variable in the function fm10k_clean_tx_ring is not used except inside a smaller block scope. Reduce the scope to its point of use. This was detected by cppcheck and resolves the following style warning produced by that tool: [fm10k_netdev.c:179]: (style)

[net-next 07/11] fm10k: reduce the scope of the err variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the local variable err in the fm10k_detach_subtask function. This was detected by cppcheck and resolves the following warning produced by that tool: [fm10k_pci.c:403]: (style) The scope of the variable 'err' can be reduced. Signed-off-by: Jacob Keller Te

[net-next 09/11] fm10k: reduce the scope of the local msg variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller The msg variable in the fm10k_mbx_validate_msg_size and fm10k_sm_mbx_transmit functions is only used within the do {} loop scope. Reduce its scope only to where it is used. This was detected by cppcheck, and resolves the following warnings produced by that tool: [fm10k_mbx.c:

[net-next 05/11] fm10k: reduce the scope of the q_idx local variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the q_idx local variable in the fm10k_cache_ring_qos function. This was detected by cppcheck and resolves the following style warning produced by that tool: [fm10k_main.c:2016]: (style) The scope of the variable 'q_idx' can be reduced. Signed-off-by: Jaco

[net-next 11/11] fm10k: reduce scope of the ring variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the ring local variable in the fm10k_assign_l2_accel function. This was detected by cppcheck and resolves the following warning produced by that tool: [fm10k_netdev.c:1447]: (style) The scope of the variable 'ring' can be reduced. Signed-off-by: Jacob Kel

[net-next 10/11] fm10k: reduce the scope of the result local variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the result local variable in the fm10k_iov_msg_lport_state_pf function. This was detected by cppcheck and resolves the following warning produced by that tool: [fm10k_pf.c:1435]: (style) The scope of the variable 'result' can be reduced. Signed-off-by: Ja

[net-next 01/11] fm10k: reduce scope of the err variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the err local variable in the fm10k_dcbnl_ieee_setets function. This was detected using cppcheck, and resolves the following style warning: [fm10k_dcbnl.c:37]: (style) The scope of the variable 'err' can be reduced. Signed-off-by: Jacob Keller Tested-by:

[net-next 02/11] fm10k: reduce scope of *p local variable

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Reduce the scope of the char *p local variable to only the block where it is used. This was detected by cppcheck and resolves the following style warning produced by that tool: [fm10k_ethtool.c:229]: (style) The scope of the variable 'p' can be reduced. Signed-off-by: Jacob

[net-next 00/11][pull request] 100GbE Intel Wired LAN Driver Updates 2019-08-01

2019-08-01 Thread Jeff Kirsher
This series for fm10k, by Jake Keller, reduces the scope of local variables where possible. The following are changes since commit a8e600e2184f45c40025cbe4d7e8893b69378a9f: Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue and are available in the git re

Re: [net-next 1/1] tipc: reduce risk of wakeup queue starvation

2019-08-01 Thread David Miller
From: Jon Maloy Date: Tue, 30 Jul 2019 16:23:18 +0200 > In commit 365ad353c256 ("tipc: reduce risk of user starvation during > link congestion") we allowed senders to add exactly one list of extra > buffers to the link backlog queues during link congestion (aka > "oversubscription"). However, the

Re: [PATCH] net: usb: pegasus: fix improper read if get_registers() fail

2019-08-01 Thread David Miller
From: Denis Kirjanov Date: Tue, 30 Jul 2019 15:13:57 +0200 > get_registers() may fail with -ENOMEM and in this > case we can read a garbage from the status variable tmp. > > Reported-by: syzbot+3499a83b2d062ae40...@syzkaller.appspotmail.com > Signed-off-by: Denis Kirjanov Applied, thank you.

[PATCH net-next] ipv6: have a single rcu unlock point in __ip6_rt_update_pmtu

2019-08-01 Thread David Ahern
From: David Ahern Simplify the unlock path in __ip6_rt_update_pmtu by using a single point where rcu_read_unlock is called. Signed-off-by: David Ahern --- net/ipv6/route.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c ind

[PATCH net] ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt

2019-08-01 Thread David Ahern
From: David Ahern The nexthop path in rt6_update_exception_stamp_rt needs to call rcu_read_unlock if it fails to find a fib6_nh match rather than just returning. Fixes: e659ba31d806 ("ipv6: Handle all fib6_nh in a nexthop in exception handling") Signed-off-by: David Ahern --- net/ipv6/route.c

[PATCH net 2/2] selftests/tls: add a litmus test for the socket reuse through shutdown

2019-08-01 Thread Jakub Kicinski
Make sure that shutdown never works, and at the same time document how I tested to came to the conclusion that currently reuse is not possible. Signed-off-by: Jakub Kicinski --- tools/testing/selftests/net/tls.c | 24 1 file changed, 24 insertions(+) diff --git a/tools/

[PATCH net 1/2] net/tls: partially revert fix transition through disconnect with close

2019-08-01 Thread Jakub Kicinski
Looks like we were slightly overzealous with the shutdown() cleanup. Even though the sock->sk_state can reach CLOSED again, socket->state will not got back to SS_UNCONNECTED once connections is ESTABLISHED. Meaning we will see EISCONN if we try to reconnect, and EINVAL if we try to listen. Only li

Re: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list

2019-08-01 Thread Joe Perches
On Thu, 2019-08-01 at 12:51 -0400, David Miller wrote: > From: Hangbin Liu > Date: Thu, 1 Aug 2019 17:03:47 +0800 > > > When setting lots of multicast list on ibmveth, e.g. add 3000 membership on > > a > > multicast group, the following error message flushes our log file > > > > 8507[ 901

Re: [PATCH bpf-next 0/2] bpf: allocate extra memory for setsockopt hook buffer

2019-08-01 Thread Alexei Starovoitov
On Thu, Aug 1, 2019 at 2:11 PM Stanislav Fomichev wrote: > > On 08/01, Alexei Starovoitov wrote: > > On Mon, Jul 29, 2019 at 02:51:09PM -0700, Stanislav Fomichev wrote: > > > Current setsockopt hook is limited to the size of the buffer that > > > user had supplied. Since we always allocate memory

[PATCH net-next] openvswitch: Print error when ovs_execute_actions() fails

2019-08-01 Thread Yifeng Sun
Currently in function ovs_dp_process_packet(), return values of ovs_execute_actions() are silently discarded. This patch prints out an error message when error happens so as to provide helpful hints for debugging. Signed-off-by: Yifeng Sun --- net/openvswitch/datapath.c | 7 +-- 1 file chang

Re: [PATCH bpf-next 0/2] bpf: allocate extra memory for setsockopt hook buffer

2019-08-01 Thread Stanislav Fomichev
On 08/01, Alexei Starovoitov wrote: > On Mon, Jul 29, 2019 at 02:51:09PM -0700, Stanislav Fomichev wrote: > > Current setsockopt hook is limited to the size of the buffer that > > user had supplied. Since we always allocate memory and copy the value > > into kernel space, allocate just a little bit

Re: [PATCH bpf-next 0/2] bpf: allocate extra memory for setsockopt hook buffer

2019-08-01 Thread Alexei Starovoitov
On Mon, Jul 29, 2019 at 02:51:09PM -0700, Stanislav Fomichev wrote: > Current setsockopt hook is limited to the size of the buffer that > user had supplied. Since we always allocate memory and copy the value > into kernel space, allocate just a little bit more in case BPF > program needs to overrid

[net-next 3/9] i40e: Log disable-fw-lldp flag change by ethtool

2019-08-01 Thread Jeff Kirsher
From: Slawomir Laba Add logging for disable-fw-lldp flag by ethtool. Added check for I40E_FLAG_DISABLE_FW_LLDP and logging state in dmesg. Without this commit there was no clear statement in dmesg about FW LLDP state in dmesg. Signed-off-by: Slawomir Laba Tested-by: Andrew Bowers Signed-off-by

[net-next 0/9][pull request] 40GbE Intel Wired LAN Driver Updates 2019-08-01

2019-08-01 Thread Jeff Kirsher
This series contains updates to i40e driver only. Dmitrii adds missing statistic counters for VEB and VEB TC's. Aleksandr fixes an issue where if the VF MAC address was not set from the host, it would be shown as all zero's on the host instead of displaying the VF MAC that the VF assigned itself.

[net-next 5/9] i40e: fix code comments

2019-08-01 Thread Jeff Kirsher
Found a code comment that needed TLC to correct their formatting. Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b

[net-next 7/9] i40e: Log info when PF is entering and leaving Allmulti mode.

2019-08-01 Thread Jeff Kirsher
From: Czeslaw Zagorski Add log when PF is entering and leaving allmulti mode. The change of PF state is visible in dmesg now. Without this commit, entering and leaving allmulti mode is not logged in dmesg. Signed-off-by: Czeslaw Zagorski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --

[net-next 2/9] i40e: make visible changed vf mac on host

2019-08-01 Thread Jeff Kirsher
From: Aleksandr Loktionov This patch makes changed VM mac address visible on host via ip link show command. This problem is fixed by copying last unicast mac filter to vf->default_lan_addr.addr. Without this patch if VF MAC was not set from host side and if you run ip link show $pf, on host side

[net-next 8/9] i40e: verify string count matches even on early return

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Similar to i40e_get_ethtool_stats, add a goto to verify that the data pointer for the strings lines up with the expected stats count. This helps ensure that bugs are not introduced when adding stats. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Ki

[net-next 6/9] i40e: Update visual effect for advertised FEC mode.

2019-08-01 Thread Jeff Kirsher
From: Czeslaw Zagorski Updates visual effect for advertised mode after setting desired mode. The mode appears in advertised FEC mode correctly, when ethtool interface command is called. Without this commit advertised FEC is displayed regardless of the settings as "None BaseR RS". Signed-off-by:

[net-next 4/9] i40e: don't report link up for a VF who hasn't enabled queues

2019-08-01 Thread Jeff Kirsher
From: Jacob Keller Commit d3d657a90850 ("i40e: update VFs of link state after GET_VF_RESOURCES") modified the PF driver to notify a VF of its link status immediately after it requests resources. This was intended to fix reporting on VF drivers, so that they would properly report link status. Ho

[net-next 9/9] i40e: Remove unicast log when VF is leaving multicast mode.

2019-08-01 Thread Jeff Kirsher
From: Czeslaw Zagorski This patch removes unicast log when VF is leaving multicast mode. Added check of vf->vf_states & I40E_VF_STATE_MC_PROMISC/I40E_VF_STATE_UC_PROMISC. Without this commit, leaving multicast mode logs "unset unicast" in dmsg. Signed-off-by: Czeslaw Zagorski Tested-by: Andrew

[net-next 1/9] i40e: fix incorrect ethtool statistics veb and veb.tc_

2019-08-01 Thread Jeff Kirsher
From: Dmitrii Golovanov This patch fixes missing call of i40e_update_veb_stats() in function i40e_get_ethtool_stats() to update stats data of VEB and VEB TC counters before they are written into ethtool buffer. Before the patch ethtool counters may fell behind interface counters. Signed-off-by:

[PATCH 2/2] net: mvpp2: support multiple comphy lanes

2019-08-01 Thread Matt Pelland
mvpp 2.2 supports RXAUI which requires a pair of serdes lanes instead of the usual single lane required by other interface modes. This patch expands the number of lanes that can be associated to a port so that both lanes are correctly configured at the appropriate times when RXAUI is in use. Signe

[PATCH 1/2] net: mvpp2: implement RXAUI support

2019-08-01 Thread Matt Pelland
Marvell's mvpp2 packet processor supports RXAUI on port zero in a similar manner to the existing 10G protocols that have already been implemented. This patch implements the miscellaneous extra configuration steps required for RXAUI operation. Signed-off-by: Matt Pelland --- drivers/net/ethernet/

[PATCH] net: mvpp2: Implement RXAUI Support

2019-08-01 Thread Matt Pelland
This patch set implements support for configuring Marvell's mvpp2 hardware for RXAUI operation. There are two other patches necessary for this to work correctly that concern Marvell's cp110 comphy that were emailed to the general linux-kernel mailing list earlier on. I can post them here if need be

Re: [PATCH bpf 1/2] bpf: fix x64 JIT code generation for jmp to 1st insn

2019-08-01 Thread Alexei Starovoitov
On Wed, Jul 31, 2019 at 8:43 PM Alexei Starovoitov wrote: > > On Wed, Jul 31, 2019 at 12:36 PM Song Liu wrote: > > > > > > > > > On Jul 30, 2019, at 6:38 PM, Alexei Starovoitov wrote: > > > > > > Introduction of bounded loops exposed old bug in x64 JIT. > > > JIT maintains the array of offsets t

[net-next 09/12] net/mlx5e: Fix mlx5e_tx_reporter_create return value

2019-08-01 Thread Saeed Mahameed
From: Aya Levin Return error when failing to create a reporter in devlink. Since NET_DEVLINK mandatory to MLX5_CORE in Kconfig, returned pointer can't be NULL and can only hold an error in bad path. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Acked-by: Jiri Pirko Signed-off-by: Saeed M

[net-next 07/12] net/mlx5e: Tx, Soften inline mode VLAN dependencies

2019-08-01 Thread Saeed Mahameed
From: Tariq Toukan If capable, use zero inline mode in TX WQE for non-VLAN packets. For VLAN ones, keep the enforcement of at least L2 inline mode, unless the WQE VLAN insertion offload cap is on. Performance: Tested single core packet rate of 64Bytes. NIC: ConnectX-5 CPU: Intel(R) Xeon(R) Gold

[net-next 05/12] net/mlx5e: XDP, Close TX MPWQE session when no room for inline packet left

2019-08-01 Thread Saeed Mahameed
From: Shay Agroskin In MPWQE mode, when transmitting packets with XDP, a packet that is smaller than a certain size (set to 256 bytes) would be sent inline within its WQE TX descriptor (mem-copied), in case the hardware tx queue is congested beyond a pre-defined water-mark. If a MPWQE cannot con

[net-next 08/12] net/mlx5e: Rx, checksum handling refactoring

2019-08-01 Thread Saeed Mahameed
Move vlan checksum fixup flow into mlx5e_skb_padding_csum(), which is supposed to fixup SKB checksum if needed. And rename mlx5e_skb_padding_csum() to mlx5e_skb_csum_fixup(). Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_rx.c | 26 ++- 1 file changed,

[net-next 12/12] net/mlx5e: Allow dropping specific tunnel packets

2019-08-01 Thread Saeed Mahameed
From: Tonghao Zhang In some case, we don't want to allow specific tunnel packets to host that can avoid to take up high CPU (e.g network attacks). But other tunnel packets which not matched in hardware will be sent to host too. $ tc filter add dev vxlan_sys_4789 \ protocol ip cha

[net-next 10/12] net/mlx5e: Set tx reporter only on successful creation

2019-08-01 Thread Saeed Mahameed
From: Aya Levin When failing to create tx reporter, don't set the reporter's pointer. Creating a reporter is not mandatory for driver load, avoid garbage/error pointer. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed --- .../ethernet/mel

[net-next 06/12] net/mlx5e: XDP, Slight enhancement for WQE fetch function

2019-08-01 Thread Saeed Mahameed
From: Tariq Toukan Instead of passing an output param, let function return the WQE pointer. In addition, pass &pi so it gets its value in the function, and save the redundant assignment that comes after it. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mel

[net-next 11/12] net/mlx5e: TX reporter cleanup

2019-08-01 Thread Saeed Mahameed
From: Aya Levin Remove redundant include files. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/reporter.h| 1 - drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 1 - 2 files c

[net-next 02/12] net/mlx5: Add flow counter bulk infrastructure

2019-08-01 Thread Saeed Mahameed
From: Gavi Teitz Add infrastructure to track bulks of flow counters, providing the means to allocate and deallocate bulks, and to acquire and release individual counters from the bulks. Signed-off-by: Gavi Teitz Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed --- .../ethernet/mellanox

[net-next 01/12] net/mlx5: E-Switch, add ingress rate support

2019-08-01 Thread Saeed Mahameed
From: Eli Cohen Use the scheduling elements to implement ingress rate limiter on an eswitch ports ingress traffic. Since the ingress of eswitch port is the egress of VF port, we control eswitch ingress by controlling VF egress. Configuration is done using the ports' representor net devices. Ple

[net-next 03/12] net/mlx5: Add flow counter pool

2019-08-01 Thread Saeed Mahameed
From: Gavi Teitz Add a pool of flow counters, based on flow counter bulks, removing the need to allocate a new counter via a costly FW command during the flow creation process. The time it takes to acquire/release a flow counter is cut from ~50 [us] to ~50 [ns]. The pool is part of the mlx5 driv

[net-next 04/12] net/mlx5e: Tx, Strict the room needed for SQ edge NOPs

2019-08-01 Thread Saeed Mahameed
From: Tariq Toukan We use NOPs to populate the WQ fragment edge if the WQE does not fit in frag, to avoid WQEs crossing a page boundary (or wrap-around the WQ). The upper bound on the needed number of NOPs is one WQEBB less than the largest possible WQE, for otherwise the WQE would certainly fit

[pull request][net-next 00/12] Mellanox, mlx5 updates 2019-08-01

2019-08-01 Thread Saeed Mahameed
Hi Dave, This series provides misc updates to mlx5 driver. For more information please see tag log below. Please pull and let me know if there is any problem. Please note that the series starts with a merge of mlx5-next branch, to resolve and avoid dependency with rdma tree. Thanks, Saeed. ---

Re: [PATCH net] ipv4/route: do not check saddr dev if iif is LOOPBACK_IFINDEX

2019-08-01 Thread David Ahern
On 8/1/19 2:29 AM, Hangbin Liu wrote: > Jianlin reported a bug that for IPv4, ip route get from src_addr would fail > if src_addr is not an address on local system. > > \# ip route get 1.1.1.1 from 2.2.2.2 > RTNETLINK answers: Invalid argument so this is a forwarding lookup in which case iif shou

Re: [PATCH net-next] net/mlx5e: Allow dropping specific tunnel packets

2019-08-01 Thread Saeed Mahameed
On Thu, 2019-08-01 at 16:40 +0800, xiangxia.m@gmail.com wrote: > From: Tonghao Zhang > > In some case, we don't want to allow specific tunnel packets > to host that can avoid to take up high CPU (e.g network attacks). > But other tunnel packets which not matched in hardware will be > sent to

[PATCH net-next 09/15] selftests: Add ipv4 address bind tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add address bind tests to fcnal-test.sh. Verifies socket binding to local addresses for raw, tcp and udp including device and VRF cases. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 111 +- 1 file changed, 110 insertio

[PATCH net-next 06/15] selftests: Add ipv6 tcp tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add IPv6 tcp tests to fcnal-test.sh. Covers the permutations of directly connected addresses, routed destinations, VRF and non-VRF, and expected failures for both clients and servers. Includes permutations with net.ipv4.tcp_l3mdev_accept set to 0 and 1. Signed-off-by: David Ahe

[PATCH net-next 08/15] selftests: Add ipv6 udp tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add IPv6 udp tests to fcnal-test.sh. Covers the permutations of directly connected addresses, routed destinations, VRF and non-VRF, and expected failures for both clients and servers. Includes permutations with net.ipv4.udp_l3mdev_accept set to 0 and 1. Signed-off-by: David Ahe

[PATCH net-next 12/15] selftests: Add ipv6 runtime tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add IPv6 runtime tests where passive (no traffic flowing) and active (with traffic) sockets are expected to be reset on device deletes. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 188 +- 1 file changed, 187 insertion

[PATCH net-next 14/15] selftests: Add ipv6 netfilter tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add IPv6 netfilter tests to send tcp reset or icmp unreachable for a port. Initial tests are VRF only. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 65 ++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/

[PATCH net-next 10/15] selftests: Add ipv6 address bind tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add IPv6 address bind tests to fcnal-test.sh. Verifies socket binding to local addresses for raw, tcp and udp including device and VRF cases. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 110 +- 1 file changed, 109 ins

[PATCH net-next 01/15] selftests: Add nettest

2019-08-01 Thread David Ahern
From: David Ahern Add nettest - a simple program with an implementation for various networking APIs. nettest is used for tcp, udp and raw functional tests for both IPv4 and IPv6. Point of this command versus existing utilities: - controlled implementation of the APIs and the order in which they

[PATCH net-next 13/15] selftests: Add ipv4 netfilter tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add netfilter tests to send tcp reset or icmp unreachable for a port. Initial tests are VRF only. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 69 ++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH net-next 15/15] selftests: Add use case section to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add use case section to fcnal-test. Initial test is VRF based with a bridge and vlans. The commands stem from bug reports fixed by: a173f066c7cf ("netfilter: bridge: Don't sabotage nf_hook calls from an l3mdev") cd6428988bf4 ("netfilter: bridge: Don't sabotage nf_hook calls fo

[PATCH net-next 07/15] selftests: Add ipv4 udp tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add udp tests to fcnal-test.sh. Covers the permutations of directly connected addresses, routed destinations, VRF and non-VRF, and expected failures for both clients and servers. Includes permutations with net.ipv4.udp_l3mdev_accept set to 0 and 1. Signed-off-by: David Ahern -

[PATCH net-next 05/15] selftests: Add ipv4 tcp tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add tcp tests to fcnal-test.sh. Covers the permutations of directly connected addresses, routed destinations, VRF and non-VRF, and expected failures for both clients and servers. Includes permutations with net.ipv4.tcp_l3mdev_accept set to 0 and 1. Signed-off-by: David Ahern -

[PATCH net-next 11/15] selftests: Add ipv4 runtime tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add runtime tests where passive (no traffic flowing) and active (with traffic) sockets are expected to be reset on device deletes. Signed-off-by: David Ahern --- tools/testing/selftests/net/fcnal-test.sh | 185 +- 1 file changed, 184 insertions(+),

[PATCH net-next 02/15] selftests: Setup for functional tests for fib and socket lookups

2019-08-01 Thread David Ahern
From: David Ahern Initial commit for functional test suite for fib and socket lookups. This commit contains the namespace setup, networking config, test options and other basic infrastructure. Signed-off-by: David Ahern --- tools/testing/selftests/net/Makefile | 2 +- tools/testing/self

[PATCH net-next 03/15] selftests: Add ipv4 ping tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add ping tests to fcnal-test.sh. Covers the permutations of directly connected addresses, routed destinations, VRF and non-VRF, and expected failures. Setup includes unreachable routes and fib rules blocking traffic. Signed-off-by: David Ahern --- tools/testing/selftests/net

[PATCH net-next 00/15] net: Add functional tests for L3 and L4

2019-08-01 Thread David Ahern
From: David Ahern This is a port the functional test cases created during the development of the VRF feature. It covers various permutations of icmp, tcp and udp for IPv4 and IPv6 including negative tests. David Ahern (15): selftests: Add nettest selftests: Setup for functional tests for fib

[PATCH net-next 04/15] selftests: Add ipv6 ping tests to fcnal-test

2019-08-01 Thread David Ahern
From: David Ahern Add IPv6 ping tests to fcnal-test.sh. Covers the permutations of directly connected addresses, routed destinations, VRF and non-VRF, and expected failures. Setup includes unreachable routes and fib rules blocking traffic. Signed-off-by: David Ahern --- tools/testing/selftest

Investment Plan.

2019-08-01 Thread Investment, Firm
Hello, I have an investment proposals that will be of good interest to you. If you have any viable business idea in your region/country/projects/opportunities/know anyone who has a viable projects that need funding, do get in touch with me, for further proceedings and funding. If not, please p

Re: [PATCH mlx5-next 00/11] Mellanox, mlx5-next updates 2019-07-29

2019-08-01 Thread Saeed Mahameed
On Mon, 2019-07-29 at 21:12 +, Saeed Mahameed wrote: > Hi All, > > This series include misc updates form mlx5 core driver. > > 1) Eli improves the handling of the support for QoS element type > 2) Gavi refactors and prepares mlx5 flow counters for bluk allocation > support > 3) Parav, refacto

Re: [PATCH mlx5-next 00/11] Mellanox, mlx5-next updates 2019-07-29

2019-08-01 Thread Saeed Mahameed
On Mon, 2019-07-29 at 21:12 +, Saeed Mahameed wrote: > Hi All, > > This series include misc updates form mlx5 core driver. > > 1) Eli improves the handling of the support for QoS element type > 2) Gavi refactors and prepares mlx5 flow counters for bluk allocation > support > 3) Parav, refacto

[net v1 PATCH 4/4] net: fix bpf_xdp_adjust_head regression for generic-XDP

2019-08-01 Thread Jesper Dangaard Brouer
When generic-XDP was moved to a later processing step by commit 458bf2f224f0 ("net: core: support XDP generic on stacked devices.") a regression was introduced when using bpf_xdp_adjust_head. The issue is that after this commit the skb->network_header is now changed prior to calling generic XDP an

[net v1 PATCH 3/4] selftests/bpf: reduce time to execute test_xdp_vlan.sh

2019-08-01 Thread Jesper Dangaard Brouer
Given the increasing number of BPF selftests, it makes sense to reduce the time to execute these tests. The ping parameters are adjusted to reduce the time from measures 9 sec to approx 2.8 sec. Signed-off-by: Jesper Dangaard Brouer --- tools/testing/selftests/bpf/test_xdp_vlan.sh | 10 +-

[net v1 PATCH 1/4] bpf: fix XDP vlan selftests test_xdp_vlan.sh

2019-08-01 Thread Jesper Dangaard Brouer
Change BPF selftest test_xdp_vlan.sh to (default) use generic XDP. This selftest was created together with a fix for generic XDP, in commit 297249569932 ("net: fix generic XDP to handle if eth header was mangled"). And was suppose to catch if generic XDP was broken again. The tests are using veth

[net v1 PATCH 2/4] selftests/bpf: add wrapper scripts for test_xdp_vlan.sh

2019-08-01 Thread Jesper Dangaard Brouer
In-order to test both native-XDP (xdpdrv) and generic-XDP (xdpgeneric) create two wrapper test scripts, that start the test_xdp_vlan.sh script with these modes. Signed-off-by: Jesper Dangaard Brouer --- tools/testing/selftests/bpf/Makefile |3 ++- tools/testing/selftests/bpf/te

[net v1 PATCH 0/4] net: fix regressions for generic-XDP

2019-08-01 Thread Jesper Dangaard Brouer
Thanks to Brandon Cazander, who wrote a very detailed bug report that even used perf probe's on xdp-newbies mailing list, we discovered that generic-XDP contains some regressions when using bpf_xdp_adjust_head(). First issue were that my selftests script, that use bpf_xdp_adjust_head(), by mistake

Re: [PATCH net] ibmveth: use net_err_ratelimited when set_multicast_list

2019-08-01 Thread Joe Perches
On Thu, 2019-08-01 at 22:10 +0800, Hangbin Liu wrote: > On Thu, Aug 01, 2019 at 03:28:43AM -0700, Joe Perches wrote: > > Perhaps add the netdev__ratelimited variants and use that instead > > > > Somthing like: > > Yes, that looks better. Do you mind if I take your code and add your > Signed-off-b

  1   2   >