Re: [PATCH net-next 01/10] udp: implement complete book-keeping for encap_needed

2018-11-13 Thread Eric Dumazet
On 11/07/2018 03:38 AM, Paolo Abeni wrote: > The *encap_needed static keys are enabled by UDP tunnels > and several UDP encapsulations type, but they are never > turned off. This can cause unneeded overall performance > degradation for systems where such features are used > transiently. > >

Re: [PATCH net-next 17/17] net: sched: unlock rules update API

2018-11-13 Thread Jiri Pirko
Tue, Nov 13, 2018 at 02:46:54PM CET, vla...@mellanox.com wrote: >On Mon 12 Nov 2018 at 17:30, David Miller wrote: >> From: Vlad Buslov >> Date: Mon, 12 Nov 2018 09:55:46 +0200 >> >>> Register netlink protocol handlers for message types RTM_NEWTFILTER, >>> RTM_DELTFILTER, RTM_GETTFILTER as

Re: VETH & AF_PACKET problem

2018-11-13 Thread Anand H. Krishnan
Ok. I have 4.18.11 ubuntu. I will try out the latest kernel and will let you know. Thank you for your opinion and help. Thanks, Anand On Wed, Nov 14, 2018 at 10:11 AM Willem de Bruijn wrote: > > On Tue, Nov 13, 2018 at 8:29 PM Anand H. Krishnan > wrote: > > > > skb_scrub_packet calls skb_orphan

Re: VETH & AF_PACKET problem

2018-11-13 Thread Willem de Bruijn
On Tue, Nov 13, 2018 at 8:29 PM Anand H. Krishnan wrote: > > skb_scrub_packet calls skb_orphan and from there the destructor is called. Not since commit 9c4c325252c54b34d53b3d0ffd535182b744e03d skbuff: preserve sock reference when scrubbing the skb. v4.19-rc1~140^2~523^2 But the general

Re: [PATCH net] ipv6/mcast: update mc_qrv when join new group

2018-11-13 Thread Hangbin Liu
On Thu, Nov 08, 2018 at 03:44:10PM +0800, Hangbin Liu wrote: > On Fri, Oct 26, 2018 at 10:30:54AM +0800, Hangbin Liu wrote: > > Currently we only set mc_qrv to sysctl_mld_qrv when interface up. If we > > change sysctl_mld_qrv after interface up, it will has no effect. > > > > Fix it by assigning

Re: [PATCH net 4/5] net/smc: atomic SMCD cursor handling

2018-11-13 Thread David Miller
From: Ursula Braun Date: Mon, 12 Nov 2018 17:01:32 +0100 > +/* SMC-D cursor format */ > +union smcd_cdc_cursor { ... > +} __aligned(8); > struct smcd_cdc_msg { ... > + union smcd_cdc_cursor prod; > + union smcd_cdc_cursor cons; > u8 res3[8]; > } __packed; You're asking

Re: [iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-13 Thread Stephen Hemminger
On Tue, 13 Nov 2018 16:12:01 +0100 Phil Sutter wrote: > + if (arg[0] == '-') { > + inv = true; > + arg++; > + } The inverse logic needs to be moved into the loop handling filter names. Otherwise, you get weirdness like "-dynamic" being accepted and not doing what

[patch net-next] net: 8021q: move vlan offload registrations into vlan_core

2018-11-13 Thread Jiri Pirko
From: Jiri Pirko Currently, the vlan packet offloads are registered only upon 8021q module load. However, even without this module loaded, the offloads could be utilized, for example by openvswitch datapath. As reported by Michael, that causes 2x to 5x performance improvement, depending on a

Re: [PATCH ipsec-next 00/11] xfrm: policy: add inexact policy search tree

2018-11-13 Thread Steffen Klassert
On Thu, Nov 08, 2018 at 07:00:14PM -0800, David Miller wrote: > From: Florian Westphal > Date: Wed, 7 Nov 2018 23:00:30 +0100 > > > This series attempts to improve xfrm policy lookup performance when > > a lot of (several hundred or even thousands) inexact policies exist > > on a system. > > >

[PATCH v3] net: Add trace events for all receive exit points

2018-11-13 Thread Geneviève Bastien
Trace events are already present for the receive entry points, to indicate how the reception entered the stack. This patch adds the corresponding exit trace events that will bound the reception such that all events occurring between the entry and the exit can be considered as part of the

Re: [Patch net-next v2] net: dump more useful information in netdev_rx_csum_fault()

2018-11-13 Thread Willem de Bruijn
On Tue, Nov 13, 2018 at 10:14 AM Cong Wang wrote: > > On Tue, Nov 13, 2018 at 10:01 AM Willem de Bruijn > wrote: > > > > On Mon, Nov 12, 2018 at 2:49 PM Cong Wang wrote: > > > > > > Currently netdev_rx_csum_fault() only shows a device name, > > > we need more information about the skb for

[net-next 02/11] ice: Check for q_vector when stopping rings

2018-11-13 Thread Jeff Kirsher
From: Tony Nguyen There is a gap in time between a VF reset, which sets the q_vector to NULL, and the VF requesting mapping of the q_vectors. If ice_vsi_stop_tx_rings() is called during this time, a NULL pointer dereference is encountered. Add a check in ice_vsi_stop_tx_rings() to ensure the

[net-next 00/11][pull request] 100GbE Intel Wired LAN Driver Updates 2018-11-13

2018-11-13 Thread Jeff Kirsher
This series contains updates to the ice driver only. Brett cleans up debug print messages by removing useless or duplicate messages, and make sure we assign the hardware head pointer to head instead of the software head pointer. Resolved an issue when disabling SRIOV we were trying to stop

[net-next 08/11] ice: Call pci_disable_sriov before stopping queues for VF

2018-11-13 Thread Jeff Kirsher
From: Brett Creeley Previous to this commit the driver was immediately stopping Tx/Rx queues when doing the following "echo 0 > sriov_numvfs" and then it was calling pci_disable_sriov if the VFs are not assigned. This was causing the VIRTCHNL_OP_DISABLE_QUEUES to fail because it was trying to

[net-next 01/11] ice: Fix debug print in ice_tx_timeout

2018-11-13 Thread Jeff Kirsher
From: Brett Creeley Currently the debug print in ice_tx_timeout is printing useless and duplicate values. First, head is being assigned to tx_ring->next_to_clean and we are printing both of those values, but naming them HWB and NTC respectively. Also, reading tail always returns 0 so remove that

[net-next 09/11] ice: Fix to make VLAN priority tagged traffic to appear on all TCs

2018-11-13 Thread Jeff Kirsher
From: Usha Ketineni This patch includes below changes to resolve the issue of ETS bandwidth shaping to work. 1. Allocation of Tx queues is accounted for based on the enabled TC's in ice_vsi_setup_q_map() and enabled the Tx queues on those TC's via ice_vsi_cfg_txqs() 2. Get the mapped

[net-next 11/11] ice: Remove ICE_MAX_TXQ_PER_TXQG check when configuring Tx queue

2018-11-13 Thread Jeff Kirsher
From: Md Fahad Iqbal Polash This patch removes the condition checking of VSI TX queue number to ICE_MAX_TXQ_PER_TXQG. This is an unnecessary check and causes a driver load error on hosts that have more than 128 cores. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Anirudh Venkataramanan

[net-next 10/11] ice: Destroy scheduler tree in reset path

2018-11-13 Thread Jeff Kirsher
From: Henry Tieman The scheduler tree is is always rebuilt during reset. The existing code adds new scheduler nodes for queues but may not clean up earlier nodes. This patch removed the old scheduler tree during reset before it is rebuilt. Signed-off-by: Henry Tieman Signed-off-by: Anirudh

[net-next 06/11] ice: Fix NVM mask defines

2018-11-13 Thread Jeff Kirsher
From: Lev Faerman Fixes bad masks that would break compilation when evaluated. Signed-off-by: Lev Faerman Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 6 +++--- 1 file changed, 3

[net-next 07/11] ice: Increase Rx queue disable timeout

2018-11-13 Thread Jeff Kirsher
From: Piotr Raczynski With much traffic coming into the port, Rx queue disable procedure can take more time until all pending queue requests on PCIe finish. Reuse ICE_Q_WAIT_MAX_RETRY macro and increase the delay itself. Signed-off-by: Piotr Raczynski Signed-off-by: Anirudh Venkataramanan

[net-next 03/11] ice: Remove node before releasing VSI

2018-11-13 Thread Jeff Kirsher
From: Anirudh Venkataramanan Before releasing the VSI, remove the VSI scheduler node. If not, the node is left in the scheduler tree and, on subsequent load, the scheduler tree contains the node so it does not set it in vsi_ctx. This, later, causes the node to not be found in

[net-next 04/11] ice: Calculate guaranteed VSIs per function and use it

2018-11-13 Thread Jeff Kirsher
From: Anirudh Venkataramanan Currently we are setting the guar_num_vsi to equal to ICE_MAX_VSI which is the device limit of 768. This is incorrect and could have unintended consequences. To fix this use the valid_function's 8-bit bitmap returned from discovering device capabilities to determine

[net-next 05/11] ice: Avoid nested RTNL locking in ice_dis_vsi

2018-11-13 Thread Jeff Kirsher
From: Dave Ertman ice_dis_vsi() performs an rtnl_lock() if it detects a netdev that is running on the VSI. In cases where the RTNL lock has already been acquired, a deadlock results. Add a boolean to pass to ice_dis_vsi to tell it if the RTNL lock is already held. Signed-off-by: Dave Ertman

Re: VETH & AF_PACKET problem

2018-11-13 Thread Willem de Bruijn
On Sun, Nov 11, 2018 at 11:15 PM Anand H. Krishnan wrote: > > Hello, > > We are seeing a problem with AF_PACKET when used along with the > veth interfaces. SCP complains that message authentication code is > incorrect. > > I was browsing the code and I see that veth_xmit calls dev_forward_skb

Re: [Patch net-next v2] net: dump more useful information in netdev_rx_csum_fault()

2018-11-13 Thread Cong Wang
On Tue, Nov 13, 2018 at 10:01 AM Willem de Bruijn wrote: > > On Mon, Nov 12, 2018 at 2:49 PM Cong Wang wrote: > > > > Currently netdev_rx_csum_fault() only shows a device name, > > we need more information about the skb for debugging csum > > failures. > > > > Sample output: > > > > ens3: hw

Re: [Patch net-next v2] net: dump more useful information in netdev_rx_csum_fault()

2018-11-13 Thread Willem de Bruijn
On Mon, Nov 12, 2018 at 2:49 PM Cong Wang wrote: > > Currently netdev_rx_csum_fault() only shows a device name, > we need more information about the skb for debugging csum > failures. > > Sample output: > > ens3: hw csum failure > dev features: 0x00014b89 > skb len=84 data_len=0

RE: [PATCH net-next v3 6/6] net/ncsi: Configure multi-package, multi-channel modes with failover

2018-11-13 Thread Justin.Lee1
Hi Samuel, I have tested your new patch. The failover function works as expected. Thanks, Justin > On Fri, 2018-11-09 at 21:58 +, justin.l...@dell.com wrote: > > Hi Samuel, > > > > After running more testing, I notice that the extra patch causing failover > > function > > to fail. Also,

Re: BUG: sleeping function called from invalid context at mm/slab.h:421

2018-11-13 Thread Roman Gushchin
On Tue, Nov 13, 2018 at 10:03:38PM +0530, Naresh Kamboju wrote: > While running kernel selftests bpf test_cgroup_storage test this > kernel BUG reported every time on all devices running Linux -next > 4.20.0-rc2-next-20181113 (from 4.19.0-rc5-next-20180928). > This kernel BUG log is

Re: [PATCHv2 net-next 1/4] sctp: define subscribe in sctp_sock as __u16

2018-11-13 Thread Neil Horman
On Tue, Nov 13, 2018 at 02:24:53PM +0800, Xin Long wrote: > > /* Default Peer Address Parameters. These defaults can >* be modified via SCTP_PEER_ADDR_PARAMS > @@ -5267,14 +5274,24 @@ static int sctp_getsockopt_disable_fragments(struct > sock *sk, int len, > static int

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
On Tue, 13 Nov 2018 16:53:07 +0100 Stefano Brivio wrote: > But to make that effective, you would need to protect the read too, and > that makes your optimisation not really overzealous I think. > > I'd rather go with an additional comment, if that doesn't become > unreadable. Oh, and of

Re: [PATCH net v2 0/4] qed: Miscellaneous bug fixes

2018-11-13 Thread David Miller
From: Denis Bolotin Date: Mon, 12 Nov 2018 12:50:19 +0200 > This patch series fixes several unrelated bugs across the driver. > Please consider applying to net. > > V1->V2: > --- > Use dma_rmb() instead of rmb(). Series applied, thank you.

Re: pull-request: can 2018-11-09

2018-11-13 Thread David Miller
From: Marc Kleine-Budde Date: Mon, 12 Nov 2018 12:57:08 +0100 > this is a pull request of 20 patches for net/master. Pulled, thanks Marc.

[PATCH net] ipv6: fix a dst leak when removing its exception

2018-11-13 Thread Xin Long
These is no need to hold dst before calling rt6_remove_exception_rt(). The call to dst_hold_safe() in ip6_link_failure() was for ip6_del_rt(), which has been removed in Commit 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes"). Otherwise, it will cause a dst leak.

[PATCH bpf-next v2] filter: add BPF_ADJ_ROOM_DATA mode to bpf_skb_adjust_room()

2018-11-13 Thread Nicolas Dichtel
This new mode enables to add or remove an l2 header in a programmatic way with cls_bpf. For example, it enables to play with mpls headers. Signed-off-by: Nicolas Dichtel Acked-by: Martin KaFai Lau --- v2: use skb_set_network_header() include/uapi/linux/bpf.h | 3 ++ net/core/filter.c

BUG: sleeping function called from invalid context at mm/slab.h:421

2018-11-13 Thread Naresh Kamboju
While running kernel selftests bpf test_cgroup_storage test this kernel BUG reported every time on all devices running Linux -next 4.20.0-rc2-next-20181113 (from 4.19.0-rc5-next-20180928). This kernel BUG log is from x86_64 machine. Do you see at your end ? [ 73.047526] BUG: sleeping function

Re: [PATCH net-next 01/17] net: sched: refactor mini_qdisc_pair_swap() to use workqueue

2018-11-13 Thread David Miller
From: Vlad Buslov Date: Tue, 13 Nov 2018 13:13:19 + > > On Mon 12 Nov 2018 at 17:28, David Miller wrote: >> From: Vlad Buslov >> Date: Mon, 12 Nov 2018 09:55:30 +0200 >> >>> +void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp, >>> + struct tcf_proto *tp_head) >>>

[iproute PATCH v2] man: ip-route.8: Document nexthop limit

2018-11-13 Thread Phil Sutter
Add a note to 'nexthop' description stating the maximum number of nexthops per command and pointing at 'append' command as a workaround. Signed-off-by: Phil Sutter --- Changes since v1: - Reviewed text. - 'route append' trick works with IPv6 only. --- man/man8/ip-route.8.in | 9 + 1

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
On Tue, 13 Nov 2018 13:58:05 + Vlad Buslov wrote: > On Tue 13 Nov 2018 at 13:40, Stefano Brivio wrote: > > On Tue, 13 Nov 2018 13:25:52 + > > Vlad Buslov wrote: > > > >> On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: > >> > Hi Vlad, > >> > > >> > On Mon, 12 Nov 2018 09:55:45

Re: [PATCH bpf-next v2] bpftool: make libbfd optional

2018-11-13 Thread Stanislav Fomichev
On 11/13, Quentin Monnet wrote: > 2018-11-12 14:02 UTC-0800 ~ Jakub Kicinski > > On Mon, 12 Nov 2018 13:44:10 -0800, Stanislav Fomichev wrote: > >> Make it possible to build bpftool without libbfd. libbfd and libopcodes are > >> typically provided in dev/dbg packages (binutils-dev in debian)

[iproute PATCH] ip-address: Fix filtering by negated address flags

2018-11-13 Thread Phil Sutter
When disabling a flag, one needs to AND with the inverse not the flag itself. Otherwise specifying for instance 'home -nodad' will effectively clear the flags variable. While being at it, simplify the code a bit by merging common parts of negated and non-negated case branches. Also allow for the

Re: [PATCH net] l2tp: fix a sock refcnt leak in l2tp_tunnel_register

2018-11-13 Thread Guillaume Nault
On Tue, Nov 13, 2018 at 01:08:25AM +0800, Xin Long wrote: > This issue happens when trying to add an existent tunnel. It > doesn't call sock_put() before returning -EEXIST to release > the sock refcnt that was held by calling sock_hold() before > the existence check. > > This patch is to fix it

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Vlad Buslov
On Tue 13 Nov 2018 at 13:40, Stefano Brivio wrote: > On Tue, 13 Nov 2018 13:25:52 + > Vlad Buslov wrote: > >> On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: >> > Hi Vlad, >> > >> > On Mon, 12 Nov 2018 09:55:45 +0200 >> > Vlad Buslov wrote: >> > >> >> @@ -179,9 +179,25 @@ static

Re: [PATCH net-next 17/17] net: sched: unlock rules update API

2018-11-13 Thread Vlad Buslov
On Mon 12 Nov 2018 at 17:30, David Miller wrote: > From: Vlad Buslov > Date: Mon, 12 Nov 2018 09:55:46 +0200 > >> Register netlink protocol handlers for message types RTM_NEWTFILTER, >> RTM_DELTFILTER, RTM_GETTFILTER as unlocked. Set rtnl_held variable that >> tracks rtnl mutex state to be false

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
On Tue, 13 Nov 2018 13:25:52 + Vlad Buslov wrote: > On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: > > Hi Vlad, > > > > On Mon, 12 Nov 2018 09:55:45 +0200 > > Vlad Buslov wrote: > > > >> @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct > >> *work) > >>

Re: [PATCH net-next 02/17] net: sched: protect block state with spinlock

2018-11-13 Thread Vlad Buslov
On Tue 13 Nov 2018 at 10:07, Stefano Brivio wrote: > Vlad, > > On Mon, 12 Nov 2018 09:28:59 -0800 (PST) > David Miller wrote: > >> From: Vlad Buslov >> Date: Mon, 12 Nov 2018 09:55:31 +0200 >> >> > +#define ASSERT_BLOCK_LOCKED(block) >> > \ >> > +

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Vlad Buslov
On Tue 13 Nov 2018 at 09:40, Stefano Brivio wrote: > Hi Vlad, > > On Mon, 12 Nov 2018 09:55:45 +0200 > Vlad Buslov wrote: > >> @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct >> *work) >> rtnl_unlock(); >> } >> >> +/* Helper function to lock rtnl mutex when

Re: [PATCH net-next 01/17] net: sched: refactor mini_qdisc_pair_swap() to use workqueue

2018-11-13 Thread Vlad Buslov
On Mon 12 Nov 2018 at 17:28, David Miller wrote: > From: Vlad Buslov > Date: Mon, 12 Nov 2018 09:55:30 +0200 > >> +void mini_qdisc_pair_swap(struct mini_Qdisc_pair *miniqp, >> + struct tcf_proto *tp_head) >> +{ >> +xchg(>tp_head, tp_head); > > If you are not checking

[iproute PATCH] ip-route: Fix nexthop encap parsing

2018-11-13 Thread Phil Sutter
When parsing nexthop parameters, a buffer of 4k bytes is provided. Yet, in lwt_parse_encap() and some functions called by it, buffer size was assumed to be 1k despite the actual size was provided. This led to spurious buffer size errors if the buffer was filled by previous nexthop parameters to

Re: [iproute PATCH] man: ip-route.8: Document nexthop limit

2018-11-13 Thread Phil Sutter
Hi David, On Mon, Nov 12, 2018 at 04:37:48PM -0800, David Ahern wrote: > On 11/12/18 2:21 PM, Phil Sutter wrote: > > diff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in > > index a33ce1f0f4006..383178c11331e 100644 > > --- a/man/man8/ip-route.8.in > > +++ b/man/man8/ip-route.8.in > > @@

Re: VETH & AF_PACKET problem

2018-11-13 Thread Anand H. Krishnan
[bump] Hello, Any ideas? AF_PACKET with veth seems to be incompatible. I am using DPDK to bind af_packet with one end of VETH pair and the other end of the pair is in a container. Thanks, Anand On Mon, Nov 12, 2018 at 12:42 PM Anand H. Krishnan wrote: > > Hello, > > We are seeing a problem

Re: [PATCH net-next 02/17] net: sched: protect block state with spinlock

2018-11-13 Thread Stefano Brivio
Vlad, On Mon, 12 Nov 2018 09:28:59 -0800 (PST) David Miller wrote: > From: Vlad Buslov > Date: Mon, 12 Nov 2018 09:55:31 +0200 > > > +#define ASSERT_BLOCK_LOCKED(block) \ > > + WARN_ONCE(!spin_is_locked(&(block)->lock), \ > > +

Re: [PATCH net-next 16/17] net: sched: conditionally take rtnl lock on rules update path

2018-11-13 Thread Stefano Brivio
Hi Vlad, On Mon, 12 Nov 2018 09:55:45 +0200 Vlad Buslov wrote: > @@ -179,9 +179,25 @@ static void tcf_proto_destroy_work(struct work_struct > *work) > rtnl_unlock(); > } > > +/* Helper function to lock rtnl mutex when specified condition is true and > mutex > + * hasn't been locked