Re: [patch net-next 11/12] mlxsw: spectrum_dpipe: Add support for IPv4 host table dump

2017-08-25 Thread David Ahern
On 8/25/17 2:26 AM, Arkadi Sharshevsky wrote: > > > On 08/24/2017 10:26 PM, David Ahern wrote: >> On 8/23/17 11:40 PM, Jiri Pirko wrote: >>> +static int >>> +mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp *mlxsw_sp, >>> + struct devlink_dpipe_entry *entry,

Re: [PATCH net] ipv6: fix sparse warning on rt6i_node

2017-08-25 Thread Martin KaFai Lau
On Fri, Aug 25, 2017 at 03:03:10PM -0700, Wei Wang wrote: > From: Wei Wang > > Commit c5cff8561d2d adds rcu grace period before freeing fib6_node. This > generates a new sparse warning on rt->rt6i_node related code: > net/ipv6/route.c:1394:30: error: incompatible types in

Re: [PATCH net] tcp: fix refcnt leak with ebpf congestion control

2017-08-25 Thread David Miller
From: Sabrina Dubroca Date: Fri, 25 Aug 2017 13:10:12 +0200 > There are a few bugs around refcnt handling in the new BPF congestion > control setsockopt: > > - The new ca is assigned to icsk->icsk_ca_ops even in the case where we >cannot get a reference on it. This

Re: Permissions for eBPF objects

2017-08-25 Thread Casey Schaufler
Adding the LSM list to the thread. On 8/25/2017 11:01 AM, Jeffrey Vander Stoep via Selinux wrote: > I’d like to get your thoughts on adding LSM permission checks on BPF objects. Aside from the use of these objects requiring privilege, what sort of controls do you think might be reasonable? Who

Re: [PATCH net] ptr_ring: use kmalloc_array()

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 22:25 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 25, 2017 at 11:57:19AM -0700, Eric Dumazet wrote: > > On Fri, 2017-08-25 at 21:03 +0300, Michael S. Tsirkin wrote: > > > On Wed, Aug 16, 2017 at 10:36:47AM -0700, Eric Dumazet wrote: > > > > From: Eric Dumazet

Re: [PATCH net-next] bpf: fix oops on allocation failure

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 10:27 PM, Dan Carpenter wrote: "err" is set to zero if bpf_map_area_alloc() fails so it means we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting NULL returns and will oops. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support")

Re: [PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id

2017-08-25 Thread Hin-Tak Leung
On Tue, 8/8/17, Arvind Yadav wrote: Subject: [PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id To: kv...@codeaurora.org, her...@canonical.com, ht...@users.sourceforge.net, larry.fin...@lwfinger.net Cc:

Re: [ethtool 1/1] ethtool: Add DMA Coalescing support

2017-08-25 Thread Stephen Hemminger
On Fri, 25 Aug 2017 15:39:10 -0700 Jeff Kirsher wrote: > diff --git a/ethtool-copy.h b/ethtool-copy.h > index 06fc04c..4bb91eb 100644 > --- a/ethtool-copy.h > +++ b/ethtool-copy.h > @@ -400,6 +400,7 @@ struct ethtool_modinfo { > * a TX interrupt, when the packet

Re: [PATCH 2/2] drivers: net: xgene: Clean up all outstanding tx descriptors

2017-08-25 Thread Andrew Lunn
On Fri, Aug 25, 2017 at 03:23:30PM -0700, Iyappan Subramanian wrote: > When xgene_enet is rmmod'd and there are still outstanding tx descriptors > that have been setup but have not completed, it is possible on the next > modprobe of the driver to receive the oldest of such tx descriptors. This >

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-25 Thread Michael S. Tsirkin
On Fri, Aug 25, 2017 at 06:44:36PM -0400, Willem de Bruijn wrote: > >> >> > We don't enable network watchdog on virtio but we could and maybe > >> >> > should. > >> >> > >> >> Can you elaborate? > >> > > >> > The issue is that holding onto buffers for very long times makes guests > >> > think they

Re: [PATCH net-next v2 0/5] net: updates for IPv6 Segment Routing

2017-08-25 Thread David Miller
From: David Lebrun Date: Fri, 25 Aug 2017 09:56:43 +0200 > v2: seg6_lwt_headroom() is not relevant for lwtunnel_input_redirect() > use cases, and L2ENCAP only uses this redirection. Fix incoherence > between arbitrary MAC header size support and fixed headroom

mlxsw and rtnl lock

2017-08-25 Thread David Ahern
Jiri / Ido: I was looking at the mlxsw driver and the places it holds the rtnl lock. There are a lot of them and from an admittedly short review it seems like the rtnl is protecting changes to mlxsw data structures as opposed to calling into the core networking stack. This is going to have huge

how to submit fixes for i40e/i40evf?

2017-08-25 Thread Stefano Brivio
Hi, As I'm currently preparing another fix for i40e, and the last one I submitted has been stuck for about two weeks now, I would like to ask some details about the process to submit fixes for i40e/i40evf drivers, before I do something wrong again. Do all the patches have to go through Intel's

Re: [PATCH net-next v6 2/3] net: gso: Add GSO support for NSH

2017-08-25 Thread Jiri Benc
On Fri, 25 Aug 2017 18:25:14 +0200, Jiri Benc wrote: > While looking at this, I realized that GSO for VXLAN-GPE is broken, > too. Let me fix it by implementing what I described above which will > make your patch much easier. Okay, it's not really broken and we don't need that complexity. At least

[PATCH 0/2] drivers: net: xgene: Misc bug fixes

2017-08-25 Thread Iyappan Subramanian
This patch set, 1. Adds call to PHY disconnect in the case of error 2. Cleans up all outstanding TX descriptors when the driver is being rmmod'd Signed-off-by: Iyappan Subramanian --- Iyappan Subramanian (1): drivers: net: xgene: Clean up all

[PATCH 2/2] drivers: net: xgene: Clean up all outstanding tx descriptors

2017-08-25 Thread Iyappan Subramanian
When xgene_enet is rmmod'd and there are still outstanding tx descriptors that have been setup but have not completed, it is possible on the next modprobe of the driver to receive the oldest of such tx descriptors. This results in a kernel NULL pointer dereference. This patch attempts to clean up

[PATCH 1/2] drivers: net: xgene: Correct probe sequence handling

2017-08-25 Thread Iyappan Subramanian
From: Quan Nguyen The phy is connected at early stage of probe but not properly disconnected if error occurs. This patch fixes the issue. Also changing the return type of xgene_enet_check_phy_handle(), since this function always returns success. Signed-off-by: Quan Nguyen

Re: [Intel-wired-lan] how to submit fixes for i40e/i40evf?

2017-08-25 Thread Stefano Brivio
On Fri, 25 Aug 2017 15:10:08 -0700 Alexander Duyck wrote: > On Fri, Aug 25, 2017 at 1:52 PM, Stefano Brivio wrote: > > [...] > > > Once patches reach Intel's patchwork, will they need to wait for some > > kind of periodically scheduled pull request

Re: [RFC PATCH] net: limit maximum number of packets to mark with xmit_more

2017-08-25 Thread Alexander Duyck
On Fri, Aug 25, 2017 at 8:58 AM, Stephen Hemminger wrote: > On Fri, 25 Aug 2017 15:36:22 + > "Waskiewicz Jr, Peter" wrote: > >> On 8/25/17 11:25 AM, Jacob Keller wrote: >> > Under some circumstances, such as with many stacked

[ethtool 1/1] ethtool: Add DMA Coalescing support

2017-08-25 Thread Jeff Kirsher
From: Paul Greenwalt Add support for DMA Coalescing (DMAC) hardware feature. The feature allows synchronization of port DMA activity across ports in order to optimize power consumption. DMAC is supported on igb and ixgbe devices. Support for enabling and configuring

Re: [PATCH net-next v2 05/14] net: mvpp2: do not force the link mode

2017-08-25 Thread Russell King - ARM Linux
On Fri, Aug 25, 2017 at 04:48:12PM +0200, Antoine Tenart wrote: > The link mode (speed, duplex) was forced based on what the phylib > returns. This should not be the case, and only forced by ethtool > functions manually. This patch removes the link mode enforcement from > the phylib link_event

Re: [PATCH net-next v2 09/14] net: mvpp2: dynamic reconfiguration of the PHY mode

2017-08-25 Thread Russell King - ARM Linux
On Fri, Aug 25, 2017 at 04:48:16PM +0200, Antoine Tenart wrote: > This patch adds logic to reconfigure the comphy/gop when the link status > change at runtime. This is very useful on boards such as the mcbin which > have SFP and Ethernet ports connected to the same MAC port: depending on > what

Re: [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check

2017-08-25 Thread David Miller
From: Stefano Brivio Date: Fri, 25 Aug 2017 11:02:06 +0200 > On Fri, 25 Aug 2017 09:52:17 +0200 > Steffen Klassert wrote: > >> On Fri, Aug 25, 2017 at 09:05:42AM +0200, Steffen Klassert wrote: >> > rt_cookie might be used uninitialized, fix

Re: [PATCH] hinic: skb_pad() frees on error

2017-08-25 Thread David Miller
From: Dan Carpenter Date: Fri, 25 Aug 2017 11:24:28 +0300 > The skb_pad() function frees the skb on error, so this code has a double > free. > > Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") > Signed-off-by: Dan Carpenter Applied,

Re: Permissions for eBPF objects

2017-08-25 Thread Chenbo Feng
On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep wrote: > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley wrote: >> On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux >> wrote: >>> I’d like to get your thoughts on adding LSM

Re: Permissions for eBPF objects

2017-08-25 Thread Stephen Smalley
On Fri, 2017-08-25 at 12:52 -0700, Chenbo Feng via Selinux wrote: > On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep com> wrote: > > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley > v> wrote: > > > On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander

Re: [PATCH net] cxgb4: Fix stack out-of-bounds read due to wrong size to t4_record_mbox()

2017-08-25 Thread Casey Leedom
| From: Stefano Brivio | Sent: Friday, August 25, 2017 1:48 PM |   | Passing commands for logging to t4_record_mbox() with size | MBOX_LEN, when the actual command size is actually smaller, | causes out-of-bounds stack accesses in t4_record_mbox() while | copying command

Re: [PATCH net] tcp: fix refcnt leak with ebpf congestion control

2017-08-25 Thread Lawrence Brakmo
On 8/25/17, 4:10 AM, "Sabrina Dubroca" wrote: There are a few bugs around refcnt handling in the new BPF congestion control setsockopt: - The new ca is assigned to icsk->icsk_ca_ops even in the case where we cannot get a reference on it. This would

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: > Eric, are there areas of the stack where we are allowed to drop packets, > not propagate that back to write(2) and also not increment any counter > either, or maybe I am not looking where I should... What happens if you increase these

Re: [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check

2017-08-25 Thread David Miller
From: Steffen Klassert Date: Fri, 25 Aug 2017 09:05:42 +0200 > rt_cookie might be used uninitialized, fix this by > initializing it. > > Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node") > Signed-off-by: Steffen Klassert

Re: Permissions for eBPF objects

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 09:52 PM, Chenbo Feng wrote: On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep wrote: On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley wrote: On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux wrote: I’d like to get

[PATCH net-next] selftests/bpf: check the instruction dumps are populated

2017-08-25 Thread Jakub Kicinski
Add a basic test for checking whether kernel is populating the jited and xlated BPF images. It was used to confirm the behaviour change from commit d777b2ddbecf ("bpf: don't zero out the info struct in bpf_obj_get_info_by_fd()"), which made bpf_obj_get_info_by_fd() usable for retrieving the

[net-next v2 04/13] i40e: separate hw_features from runtime changing flags

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller The number of flags found in pf->flags has grown quite large, and there are a lot of different types of flags. Most of the flags are simply hardware features which are enabled on some firmware or some MAC types. Other flags are dynamic run-time flags

[net-next v2 09/13] i40e/i40evf: rename vf_offload_flags to vf_cap_flags in struct virtchnl_vf_resource

2017-08-25 Thread Jeff Kirsher
From: Stefan Assmann The current name of vf_offload_flags indicates that the bitmap is limited to offload related features. Make this more generic by renaming it to vf_cap_flags, which allows for other capabilities besides offloading to be added. Signed-off-by: Stefan

[net-next v2 08/13] i40e: move check for avoiding VID=0 filters into i40e_vsi_add_vlan

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller In i40e_vsi_add_vlan we treat attempting to add VID=0 as an error, because it does not do what the caller might expect. We already special case VID=0 in i40e_vlan_rx_add_vid so that we avoid this error when adding the VLAN. This special casing is

[net-next v2 07/13] i40e/i40evf: use cmpxchg64 when updating private flags in ethtool

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller When a user gives an invalid command to change a private flag which is not supported, either because it is read-only, or the device is not capable of the feature, we simply ignore the request. A naive solution would simply be to report error codes

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-25 Thread J. Bruce Fields
On Fri, Aug 18, 2017 at 06:00:47AM -0400, Vadim Lomovtsev wrote: > While running nfs/connectathon tests kernel NULL-pointer exception > has been observed due to races in svcsock.c. > > Race is appear when kernel accepts connection by kernel_accept > (which creates new socket) and start queuing

[net-next v2 01/13] i40e/i40evf: adjust packet size to account for double VLANs

2017-08-25 Thread Jeff Kirsher
From: Mitch Williams Now that the kernel supports double VLAN tags, we should at least play nice. Adjust the max packet size to account for two VLAN tags, not just one. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers

[net-next v2 12/13] i40e: prevent changing ITR if adaptive-rx/tx enabled

2017-08-25 Thread Jeff Kirsher
From: Alan Brady Currently the driver allows the user to change (or even disable) interrupt moderation if adaptive-rx/tx is enabled when this should not be the case. Adaptive RX/TX will not respect the user's ITR settings so allowing the user to change it is weird. This

[net-next v2 05/13] i40e: remove workaround for Open Firmware MAC address

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller Since commit b499ffb0a22c ("i40e: Look up MAC address in Open Firmware or IDPROM"), we've had support for obtaining the MAC address form Open Firmware or IDPROM. This code relied on sending the Open Firmware address directly to the device firmware

Re: [PATCH] staging: rtlwifi: Improve debugging by using debugfs

2017-08-25 Thread Alexander Duyck
Fri, Aug 25, 2017 at 7:16 AM, Andrew Lunn wrote: > On Fri, Aug 25, 2017 at 08:47:00AM -0500, Larry Finger wrote: >> On 08/24/2017 08:54 PM, Andrew Lunn wrote: >> >netdev frowns upon debugfs. You should try to keep this altogether, >> >making it easy to throw away before the driver

Re: [Patch net-next v2 0/4] net_sched: clean up tc classes and u32 filter

2017-08-25 Thread David Miller
From: Cong Wang Date: Thu, 24 Aug 2017 16:51:26 -0700 > Patch 1 and patch 2 prepare for patch 3. Major changes > are in patch 3 and patch 4, details are there too. > > Cong Wang (4): > net_sched: get rid of more forward declarations > net_sched: introduce

Re: Permissions for eBPF objects

2017-08-25 Thread Jeffrey Vander Stoep
On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley wrote: > On Fri, 2017-08-25 at 11:01 -0700, Jeffrey Vander Stoep via Selinux > wrote: >> I’d like to get your thoughts on adding LSM permission checks on BPF >> objects. >> >> By default, the ability to create and use eBPF

[PATCH net-next] bpf: fix oops on allocation failure

2017-08-25 Thread Dan Carpenter
"err" is set to zero if bpf_map_area_alloc() fails so it means we return ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not expecting NULL returns and will oops. Fixes: 174a79ff9515 ("bpf: sockmap with sk redirect support") Signed-off-by: Dan Carpenter

[PATCH net] cxgb4: Fix stack out-of-bounds read due to wrong size to t4_record_mbox()

2017-08-25 Thread Stefano Brivio
Passing commands for logging to t4_record_mbox() with size MBOX_LEN, when the actual command size is actually smaller, causes out-of-bounds stack accesses in t4_record_mbox() while copying command words here: for (i = 0; i < size / 8; i++) entry->cmd[i] =

Re: [Intel-wired-lan] how to submit fixes for i40e/i40evf?

2017-08-25 Thread Alexander Duyck
On Fri, Aug 25, 2017 at 1:52 PM, Stefano Brivio wrote: > Hi, > > As I'm currently preparing another fix for i40e, and the last one I > submitted has been stuck for about two weeks now, I would like to ask > some details about the process to submit fixes for i40e/i40evf

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-25 Thread Willem de Bruijn
>> >> > We don't enable network watchdog on virtio but we could and maybe >> >> > should. >> >> >> >> Can you elaborate? >> > >> > The issue is that holding onto buffers for very long times makes guests >> > think they are stuck. This is funamentally because from guest point of >> > view this is a

Re: [EXT] Re: [PATCH net-next 09/13] net: mvpp2: dynamic reconfiguration of the PHY mode

2017-08-25 Thread Russell King - ARM Linux
On Thu, Aug 24, 2017 at 07:14:18PM +0200, Antoine Tenart wrote: > On Thu, Aug 24, 2017 at 05:08:29PM +, Stefan Chulski wrote: > > > > Imagine phylib is using the copper Ethernet PHY, but the MAC is using > > > > the SFP port. Somebody pulls out the copper cable, phylib says the > > > > link is

Re: [PATCH nf-next] netfilter: xt_CHECKSUM: avoid bad offload warnings on GSO packets

2017-08-25 Thread Michal Kubecek
On Thu, Aug 24, 2017 at 03:17:22PM +0200, Florian Westphal wrote: > Davide Caratti wrote: > > Small nit: may I suggest you to call skb_csum_hwoffload_help() instead of > > skb_checksum_help(), so that we avoid corrupting SCTP packets in case they > > hit xt_CHECKSUM target? >

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jiri Pirko
Fri, Aug 25, 2017 at 11:18:50AM CEST, f...@strlen.de wrote: >Jiri Pirko wrote: >> Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: >> >For TC classes, their ->get() and ->put() are always paired, and the >> >reference counting is completely useless, because:

Re: [PATCH nf-next] netfilter: xt_CHECKSUM: avoid bad offload warnings on GSO packets

2017-08-25 Thread Michal Kubecek
On Thu, Aug 24, 2017 at 03:08:42PM +0200, Davide Caratti wrote: > On Thu, 2017-08-24 at 13:07 +0200, Michal Kubecek wrote: > > On Thu, Aug 24, 2017 at 12:51:18PM +0200, Florian Westphal wrote: > > > Michal Kubecek wrote: > > > > When --checksum_fill action is applied to a GSO

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Florian Westphal
Jiri Pirko wrote: > Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: > >For TC classes, their ->get() and ->put() are always paired, and the > >reference counting is completely useless, because: > > > >1) For class modification and dumping paths, we already

Re: [PATCH nf-next] netfilter: xt_CHECKSUM: avoid bad offload warnings on GSO packets

2017-08-25 Thread Florian Westphal
Michal Kubecek wrote: > On Thu, Aug 24, 2017 at 03:17:22PM +0200, Florian Westphal wrote: > > Davide Caratti wrote: > > > Small nit: may I suggest you to call skb_csum_hwoffload_help() instead of > > > skb_checksum_help(), so that we avoid corrupting SCTP

Re: [PATCH] pktgen: add a new sample script for 40G and above link testing

2017-08-25 Thread Jesper Dangaard Brouer
On Fri, 25 Aug 2017 17:26:36 +0800 Robert Hoo wrote: > (Sorry for yesterday's wrong sending, I finally fixed my MTA and git > send-email settings.) Please see my reply in: http://lkml.kernel.org/r/20170825111921.06171...@redhat.com -- Best regards, Jesper

Re: [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check

2017-08-25 Thread Stefano Brivio
On Fri, 25 Aug 2017 09:52:17 +0200 Steffen Klassert wrote: > On Fri, Aug 25, 2017 at 09:05:42AM +0200, Steffen Klassert wrote: > > rt_cookie might be used uninitialized, fix this by > > initializing it. > > > > Fixes: c5cff8561d2d ("ipv6: add rcu grace period

Re: [Patch net-next v2 3/4] net_sched: remove tc class reference counting

2017-08-25 Thread Jiri Pirko
Fri, Aug 25, 2017 at 01:51:29AM CEST, xiyou.wangc...@gmail.com wrote: >For TC classes, their ->get() and ->put() are always paired, and the >reference counting is completely useless, because: > >1) For class modification and dumping paths, we already hold RTNL lock, > so all of these

Re: [net-next:master 1324/1341] drivers/net//ethernet/mellanox/mlxsw/spectrum_dpipe.c:323:9: error: too few arguments to function 'devlink_dpipe_table_register'

2017-08-25 Thread Arkadi Sharshevsky
On 08/25/2017 04:11 AM, David Miller wrote: > From: kbuild test robot > Date: Fri, 25 Aug 2017 08:03:28 +0800 > >> All errors (new ones prefixed by >>): >> >>drivers/net//ethernet/mellanox/mlxsw/spectrum_dpipe.c: In function >> 'mlxsw_sp_dpipe_erif_table_init':

Re: [Patch net-next v2 4/4] net_sched: kill u32_node pointer in Qdisc

2017-08-25 Thread Jiri Pirko
Fri, Aug 25, 2017 at 01:51:30AM CEST, xiyou.wangc...@gmail.com wrote: >It is ugly to hide a u32-filter-specific pointer inside Qdisc, >this breaks the TC layers: > >1. Qdisc is a generic representation, should not have any specific > data of any type > >2. Qdisc layer is above filter layer,

Re: [PATCH] pktgen: add a new sample script for 40G and above link testing

2017-08-25 Thread Jesper Dangaard Brouer
(please don't use BCC on the netdev list, replies might miss the list in cc) Comments inlined below: On Fri, 25 Aug 2017 10:24:30 +0800 Robert Hoo wrote: > From: Robert Ho > > It's hard to benchmark 40G+ network bandwidth using ordinary > tools like

Re: [patch net-next 11/12] mlxsw: spectrum_dpipe: Add support for IPv4 host table dump

2017-08-25 Thread Arkadi Sharshevsky
On 08/24/2017 10:26 PM, David Ahern wrote: > On 8/23/17 11:40 PM, Jiri Pirko wrote: >> +static int >> +mlxsw_sp_dpipe_table_host_entries_get(struct mlxsw_sp *mlxsw_sp, >> + struct devlink_dpipe_entry *entry, >> + bool

[PATCH] pktgen: add a new sample script for 40G and above link testing

2017-08-25 Thread Robert Hoo
(Sorry for yesterday's wrong sending, I finally fixed my MTA and git send-email settings.) It's hard to benchmark 40G+ network bandwidth using ordinary tools like iperf, netperf (see reference 1). Pktgen, packet generator from Kernel sapce, shall be a candidate. I then tried with pktgen

Re: [PATCH nf-next] netfilter: xt_CHECKSUM: avoid bad offload warnings on GSO packets

2017-08-25 Thread Florian Westphal
Florian Westphal wrote: > Michal Kubecek wrote: > > On Thu, Aug 24, 2017 at 03:17:22PM +0200, Florian Westphal wrote: > > > Davide Caratti wrote: > > > > Small nit: may I suggest you to call skb_csum_hwoffload_help() instead > > > > of > >

Re: [PATCH v2 net-next 1/8] bpf: Add support for recursively running cgroup sock filters

2017-08-25 Thread Daniel Borkmann
On 08/25/2017 09:05 PM, David Ahern wrote: Add support for recursively applying sock filters attached to a cgroup. For now, start with the inner cgroup attached to the socket and work back to the root or first cgroup without the recursive flag set. Once the recursive flag is set for a cgroup all

Re: [PATCH net 0/2] r8169: Be drop monitor friendly

2017-08-25 Thread David Miller
From: Florian Fainelli Date: Thu, 24 Aug 2017 18:33:57 -0700 > First patch may be questionable but no other driver appears to be doing that > and while it is defendable to account for left packets as dropped during TX > clean, this appears misleadning. I picked Stanislaw

Re: [PATCH v2 net-next 3/8] bpf: Allow cgroup sock filters to use get_current_uid_gid helper

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 12:05:36PM -0700, David Ahern wrote: > Allow BPF programs run on sock create to use the get_current_uid_gid > helper. IPv4 and IPv6 sockets are created in a process context so > there is always a valid uid/gid > > Signed-off-by: David Ahern Acked-by:

Re: [PATCH net-next v2 2/2] tcp_diag: report TCP MD5 signing keys and addresses

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 18:53 -0700, Ivan Delalande wrote: > Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to > processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is > not possible to retrieve these from the kernel once they have been > configured on

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 20:25 -0700, Florian Fainelli wrote: > It would. Since the call trace involves udp_send_skb() how come we are > not returning an error to write(2)? are there other code paths where the > neighbor code can do drops like these? Are you suggesting write(2) should block until

[PATCH net-next v3] e1000e: Be drop monitor friendly

2017-08-25 Thread Florian Fainelli
e1000e_put_txbuf() can be called from normal reclamation path as well as when a DMA mapping failure, so we need to differentiate these two cases when freeing SKBs to be drop monitor friendly. e1000e_tx_hwtstamp_work() and e1000_remove() are processing TX timestamped SKBs and those should not be

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-25 Thread Willem de Bruijn
On Fri, Aug 25, 2017 at 7:32 PM, Michael S. Tsirkin wrote: > On Fri, Aug 25, 2017 at 06:44:36PM -0400, Willem de Bruijn wrote: >> >> >> > We don't enable network watchdog on virtio but we could and maybe >> >> >> > should. >> >> >> >> >> >> Can you elaborate? >> >> > >> >> > The

Re: Permissions for eBPF objects

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 10:07:27PM +0200, Daniel Borkmann wrote: > On 08/25/2017 09:52 PM, Chenbo Feng wrote: > > On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep > > wrote: > > > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley > > > wrote: > > > >

Re: UDP sockets oddities

2017-08-25 Thread Florian Fainelli
On 08/25/2017 04:57 PM, Eric Dumazet wrote: > On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: > >> Eric, are there areas of the stack where we are allowed to drop packets, >> not propagate that back to write(2) and also not increment any counter >> either, or maybe I am not looking

[PATCH v3 net-next 1/1] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK)

2017-08-25 Thread Dexuan Cui
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It uses VMBus ringbuffer as the transportation layer. With hv_sock, applications between the host (Windows 10, Windows Server 2016 or newer) and the guest can talk with each other using

Re: Permissions for eBPF objects

2017-08-25 Thread Chenbo Feng
On Fri, Aug 25, 2017 at 1:40 PM, Stephen Smalley wrote: > On Fri, 2017-08-25 at 12:52 -0700, Chenbo Feng via Selinux wrote: >> On Fri, Aug 25, 2017 at 12:45 PM, Jeffrey Vander Stoep > com> wrote: >> > On Fri, Aug 25, 2017 at 12:26 PM, Stephen Smalley

[PATCH net] ipv6: fix sparse warning on rt6i_node

2017-08-25 Thread Wei Wang
From: Wei Wang Commit c5cff8561d2d adds rcu grace period before freeing fib6_node. This generates a new sparse warning on rt->rt6i_node related code: net/ipv6/route.c:1394:30: error: incompatible types in comparison expression (different address spaces)

[net-next v2 13/13] i40e: synchronize nvmupdate command and adminq subtask

2017-08-25 Thread Jeff Kirsher
From: Sudheer Mogilappagari During NVM update, state machine gets into unrecoverable state because i40e_clean_adminq_subtask can get scheduled after the admin queue command but before other state variables are updated. This causes incorrect input to

[net-next v2 06/13] i40e: Detect ATR HW Evict NVM issue and disable the feature

2017-08-25 Thread Jeff Kirsher
From: Anjali Singhai Jain This patch fixes a problem with the HW ATR eviction feature where the NVM setting was incorrect. This patch detects the issue on X720 adapters and disables the feature if the NVM setting is incorrect. Without this patch, HW ATR Evict feature

[net-next v2 11/13] i40e: use cpumask_copy instead of direct assignment

2017-08-25 Thread Jeff Kirsher
From: Jacob Keller According to the header file cpumask.h, we shouldn't be directly copying a cpumask_t, since its a bitmap and might not be copied correctly. Lets use the provided cpumask_copy() function instead. Signed-off-by: Jacob Keller

[net-next v2 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-08-25

2017-08-25 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only. Mitch adjusts the max packet size to account for two VLAN tags. Sudheer provides a fix to ensure that the watchdog timer is scheduled immediately after admin queue operations are scheduled in i40evf_down(). Fixes an issue by adding locking

[net-next v2 02/13] i40evf: prevent VF close returning before state transitions to DOWN

2017-08-25 Thread Jeff Kirsher
From: Sudheer Mogilappagari Currently i40evf_close() can return before state transitions to __I40EVF_DOWN because of the latency involved in processing and receiving response from PF driver and scheduling of VF watchdog_task. Due to this inconsistency an

[net-next v2 10/13] i40evf: use netdev variable in reset task

2017-08-25 Thread Jeff Kirsher
From: Alan Brady If we're going to bother initializing a variable to reference it we might as well use it. Signed-off-by: Alan Brady Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next v2 03/13] i40e: Fix a bug with VMDq RSS queue allocation

2017-08-25 Thread Jeff Kirsher
From: Anjali Singhai Jain The X722 pf flag setup should happen before the VMDq RSS queue count is initialized for VMDq VSI to get the right number of queues for RSS in case of X722 devices. Signed-off-by: Anjali Singhai Jain Signed-off-by:

Re: UDP sockets oddities

2017-08-25 Thread Florian Fainelli
On 08/23/2017 07:23 PM, Florian Fainelli wrote: > On 08/23/2017 05:43 PM, Eric Dumazet wrote: >> On Wed, 2017-08-23 at 17:03 -0700, Florian Fainelli wrote: >> >>> Attached is the perf report --stdio of: >>> >>> # perf record -a -g -e skb:kfree_skb iperf -c 192.168.1.23 -b 800M -t 60 >>> WARNING:

Re: [PATCH net-next] tcp: fix hang in tcp_sendpage_locked()

2017-08-25 Thread David Miller
From: Eric Dumazet Date: Fri, 25 Aug 2017 06:27:05 -0700 > From: Eric Dumazet > > syszkaller got a hang in tcp stack, related to a bug in > tcp_sendpage_locked() > > root@syzkaller:~# cat /proc/3059/stack > [] __lock_sock+0x1dc/0x2f0 > []

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 18:17 -0700, Florian Fainelli wrote: > On 08/25/2017 04:57 PM, Eric Dumazet wrote: > > On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: > > > >> Eric, are there areas of the stack where we are allowed to drop packets, > >> not propagate that back to write(2) and

Re: [PATCH net-next 0/2] nfp: SR-IOV ndos support

2017-08-25 Thread David Miller
From: Jakub Kicinski Date: Thu, 24 Aug 2017 21:31:48 -0700 > This set adds basic SR-IOV including setting/getting VF MAC addresses, > VLANs, link state and spoofcheck settings. It is wired up for both > vNICs and representors (note: ip link will not report VF

Re: [PATCH net-next v5] net: stmmac: Delete dead code for MDIO registration

2017-08-25 Thread David Miller
From: Romain Perier Date: Fri, 25 Aug 2017 08:49:59 +0200 > This code is no longer used, the logging function was changed by commit > fbca164776e4 ("net: stmmac: Use the right logging function in > stmmac_mdio_register"). > It was previously showing information

Re: [PATCH] net: sxgbe: check memory allocation failure

2017-08-25 Thread David Miller
From: Christophe JAILLET Date: Fri, 25 Aug 2017 07:35:51 +0200 > Check memory allocation failure and return -ENOMEM in such a case, as > already done few lines below for another memory allocation. > > Signed-off-by: Christophe JAILLET

Re: UDP sockets oddities

2017-08-25 Thread David Miller
From: Eric Dumazet Date: Fri, 25 Aug 2017 20:40:44 -0700 > On Fri, 2017-08-25 at 20:25 -0700, Florian Fainelli wrote: > >> It would. Since the call trace involves udp_send_skb() how come we are >> not returning an error to write(2)? are there other code paths where the

Re: UDP sockets oddities

2017-08-25 Thread David Miller
From: Florian Fainelli Date: Fri, 25 Aug 2017 20:25:26 -0700 > It would. Since the call trace involves udp_send_skb() how come we are > not returning an error to write(2)? are there other code paths where the > neighbor code can do drops like these? Keep in mind that the

Re: pull-request: wireless-drivers 2017-08-25

2017-08-25 Thread David Miller
From: Kalle Valo Date: Fri, 25 Aug 2017 16:37:57 +0300 > here's pull request to net tree for 4.13, more info in the signed > tag below. Please let me know if there are any problems. Pulled, thanks Kalle.

Re: UDP sockets oddities

2017-08-25 Thread Florian Fainelli
On 08/25/2017 06:52 PM, Eric Dumazet wrote: > On Fri, 2017-08-25 at 18:17 -0700, Florian Fainelli wrote: >> On 08/25/2017 04:57 PM, Eric Dumazet wrote: >>> On Fri, 2017-08-25 at 16:18 -0700, Florian Fainelli wrote: >>> Eric, are there areas of the stack where we are allowed to drop packets,

Re: [PATCH net-next] bpf: fix oops on allocation failure

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 11:27:14PM +0300, Dan Carpenter wrote: > "err" is set to zero if bpf_map_area_alloc() fails so it means we return > ERR_PTR(0) which is NULL. The caller, find_and_alloc_map(), is not > expecting NULL returns and will oops. > > Fixes: 174a79ff9515 ("bpf: sockmap with sk

[PATCH net-next v2 1/2] inet_diag: allow protocols to provide additional data

2017-08-25 Thread Ivan Delalande
Extend inet_diag_handler to allow individual protocols to report additional data on INET_DIAG_INFO through idiag_get_aux. The size can be dynamic and is computed by idiag_get_aux_size. Signed-off-by: Ivan Delalande --- include/linux/inet_diag.h | 7 +++

[PATCH net-next v2 2/2] tcp_diag: report TCP MD5 signing keys and addresses

2017-08-25 Thread Ivan Delalande
Report TCP MD5 (RFC2385) signing keys, addresses and address prefixes to processes with CAP_NET_ADMIN requesting INET_DIAG_INFO. Currently it is not possible to retrieve these from the kernel once they have been configured on sockets. Signed-off-by: Ivan Delalande ---

Re: [net-next v2 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-08-25

2017-08-25 Thread David Miller
From: Jeff Kirsher Date: Fri, 25 Aug 2017 15:00:44 -0700 > This series contains updates to i40e and i40evf only. Pulled, thanks Jeff.

Re: [PATCH v2 net-next 1/8] bpf: Add support for recursively running cgroup sock filters

2017-08-25 Thread Alexei Starovoitov
On Fri, Aug 25, 2017 at 12:05:34PM -0700, David Ahern wrote: > Add support for recursively applying sock filters attached to a cgroup. > For now, start with the inner cgroup attached to the socket and work back > to the root or first cgroup without the recursive flag set. Once the > recursive flag

Re: [PATCH net-next 3/3 v9] drivers: net: ethernet: qualcomm: rmnet: Initial implementation

2017-08-25 Thread David Miller
From: Subash Abhinov Kasiviswanathan Date: Thu, 24 Aug 2017 22:39:26 -0600 > +static void rmnet_force_unassociate_device(struct net_device *dev) > +{ > + struct net_device *real_dev = dev; > + struct rmnet_walk_data d; > + LIST_HEAD(list); > + > + if

Re: [PATCH net] udp6: set rx_dst_cookie on rx_dst updates

2017-08-25 Thread David Miller
From: Paolo Abeni Date: Fri, 25 Aug 2017 14:31:01 +0200 > Currently, in the udp6 code, the dst cookie is not initialized/updated > concurrently with the RX dst used by early demux. > > As a result, the dst_check() in the early_demux path always fails, > the rx dst cache is

Re: [PATCH net-next] net: mvpp2: fix the packet size configuration for 10G

2017-08-25 Thread David Miller
From: Antoine Tenart Date: Fri, 25 Aug 2017 15:24:46 +0200 > The MVPP22_XLG_CTRL1_FRAMESIZELIMIT define is used as an offset, but is > defined as BIT(0). Updated its name to contains "OFFS" as in offset and > fix its value using the offset value, 0. > >

Re: UDP sockets oddities

2017-08-25 Thread Eric Dumazet
On Fri, 2017-08-25 at 18:52 -0700, Eric Dumazet wrote: > I guess we should an SNMP counter for packets dropped in neigh queues. Info is already there : cat /proc/net/stat/arp_cache

  1   2   3   >