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

2018-08-23 Thread David Miller
From: Daniel Borkmann Date: Fri, 24 Aug 2018 01:09:29 +0200 > The following pull-request contains BPF updates for your *net* tree. Pulled, thanks Daniel.

[Patch net] tipc: fix a missing rhashtable_walk_exit()

2018-08-23 Thread Cong Wang
rhashtable_walk_exit() must be paired with rhashtable_walk_enter(). Fixes: 40f9f4397060 ("tipc: Fix tipc_sk_reinit race conditions") Cc: Herbert Xu Cc: Ying Xue Signed-off-by: Cong Wang --- net/tipc/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/socket.c b/net/tipc/soc

Re: [PATCH bpf] xsk: fix return value of xdp_umem_assign_dev()

2018-08-23 Thread Daniel Borkmann
On 08/23/2018 08:29 PM, Jakub Kicinski wrote: > On Mon, 20 Aug 2018 09:54:25 +0900, Prashant Bhole wrote: >> s/ENOTSUPP/EOPNOTSUPP/ in function umem_assign_dev(). >> This function's return value is directly returned by xsk_bind(). >> EOPNOTSUPP is bind()'s possible return value. >> >> Fixes: f73460

pull-request: bpf 2018-08-24

2018-08-23 Thread Daniel Borkmann
Hi David, The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix BPF sockmap and tls where we get a hang in do_tcp_sendpages() when sndbuf is full due to missing calls into underlying socket's sk_write_space(), from John. 2) Two BPF sockmap fixes

RE: [Intel-wired-lan] [PATCH v1 net-next] igb: Use an advanced ctx descriptor for launchtime

2018-08-23 Thread Brown, Aaron F
> From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Jesus Sanchez-Palencia > Sent: Thursday, July 26, 2018 10:21 AM > To: intel-wired-...@lists.osuosl.org > Cc: netdev@vger.kernel.org; Sanchez-Palencia, Jesus palen...@intel.com> > Subject: [Intel-wired-lan] [PATCH v1

RE: [PATCH net 1/1] qlge: Fix netdev features configuration.

2018-08-23 Thread Chopra, Manish
> -Original Message- > From: Manish Chopra > Sent: Friday, August 24, 2018 2:02 AM > To: da...@davemloft.net > Cc: netdev@vger.kernel.org; Dept-GE Linux NIC Dev gelinuxnic...@cavium.com>; bpoir...@suse.com > Subject: [PATCH net 1/1] qlge: Fix netdev features configuration. > > qlge_fix_f

broken behaviour of TC filter delete

2018-08-23 Thread Roman Mashak
It appears that the following commit changed the behaviour of scenario where a filter is deleted twice: commit f71e0ca4db187af7c44987e9d21e9042c3046070 Author: Jiri Pirko Date: Mon Jul 23 09:23:05 2018 +0200 net: sched: Avoid implicit chain 0 creation Steps to reproduce : 1) create d

[PATCH net 1/1] qlge: Fix netdev features configuration.

2018-08-23 Thread Manish Chopra
qlge_fix_features() is not supposed to modify hardware or driver state, rather it is supposed to only fix requested fetures bits. Currently qlge_fix_features() also goes for interface down and up unnecessarily if there is not even any change in features set. This patch changes/fixes following - 1

[PATCH net 1/1] qlge: Fix netdev features configuration.

2018-08-23 Thread Manish Chopra
qlge_fix_features() is not supposed to modify hardware or driver state, rather it is supposed to only fix requested fetures bits. Currently qlge_fix_features() also goes for interface down and up unnecessarily if there is not even any change in features set. This patch changes/fixes following - 1

Re: [net 00/13][pull request] Intel Wired LAN Driver Fixes 2018-08-23

2018-08-23 Thread David Miller
From: Jeff Kirsher Date: Thu, 23 Aug 2018 12:14:50 -0700 > This series contains bug fixes to the ice driver. Pulled, thanks Jeff.

[net 00/13][pull request] Intel Wired LAN Driver Fixes 2018-08-23

2018-08-23 Thread Jeff Kirsher
This series contains bug fixes to the ice driver. Anirudh provides several fixes, starting with static analysis fixes by replacing a bitwise-and with a constant value and replace "magic" numbers with defines. Fixed the control queue processing by removing unnecessary read/writes to registers, as

[net 03/13] ice: Cleanup magic number

2018-08-23 Thread Jeff Kirsher
From: Anirudh Venkataramanan Use define for the unit size shift of the Rx LAN context descriptor base address instead of the magic number 7. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 1 + d

[net 04/13] ice: Report stats for allocated queues via ethtool stats

2018-08-23 Thread Jeff Kirsher
From: Jacob Keller It is not safe to have the string table for statistics change order or size over the lifetime of a given netdevice. This is because of the nature of the 3-step process for obtaining stats. First, user space performs a request for the size of the strings table. Second it perform

[net 06/13] ice: Fix bugs in control queue processing

2018-08-23 Thread Jeff Kirsher
From: Anirudh Venkataramanan This patch is a consolidation of multiple bug fixes for control queue processing. 1) In ice_clean_adminq_subtask() remove unnecessary reads/writes to registers. The bits PFINT_FW_CTL, PFINT_MBX_CTL and PFINT_SB_CTL are not set when an interrupt arrives, whic

[net 02/13] ice: Remove unnecessary node owner check

2018-08-23 Thread Jeff Kirsher
From: Bruce Allan There is already a check for owner == ICE_SCHED_NODE_OWNER_LAN at the beginning of ice_sched_update_vsi_child_nodes. Remove the additional check to address the static analysis tool smatch issue "warn: we tested 'owner' before and it was 'false'". Signed-off-by: Bruce Allan Sig

[net 01/13] ice: Fix multiple static analyser warnings

2018-08-23 Thread Jeff Kirsher
From: Anirudh Venkataramanan This patch fixes the following smatch errors: 1) Fix "odd binop '0x0 & 0xc'" when performing the bitwise-and with a constant value of zero (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG). Remove a similar bitwise-and with 0 in ice_add_marker_act() and use the rig

[net 05/13] ice: Clean control queues only when they are initialized

2018-08-23 Thread Jeff Kirsher
From: Preethi Banala Clean control queues only when they are initialized. One of the ways to validate if the basic initialization is done is by checking value of cq->sq.head and cq->rq.head variables that specify the register address. This patch adds a check to avoid NULL pointer dereference cras

[net 11/13] ice: Fix potential return of uninitialized value

2018-08-23 Thread Jeff Kirsher
From: Jesse Brandeburg In ice_vsi_setup_[tx|rx]_rings, err is uninitialized which can result in a garbage value return to the caller. Fix that. Signed-off-by: Jesse Brandeburg Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Jeff Kirsher --- drivers/net/etherne

[net 12/13] ice: Change struct members from bool to u8

2018-08-23 Thread Jeff Kirsher
From: Bruce Allan Recent versions of checkpatch have a new warning based on a documented preference of Linus to not use bool in structures due to wasted space and the size of bool is implementation dependent. For more information, see the email thread at https://lkml.org/lkml/2017/11/21/384. Si

[net 09/13] ice: Update to interrupts enabled in OICR

2018-08-23 Thread Jeff Kirsher
From: Bruce Allan Remove the following interrupt causes that are not applicable or not handled: - PFINT_OICR_HLP_RDY_M - PFINT_OICR_CPM_RDY_M - PFINT_OICR_GPIO_M - PFINT_OICR_STORM_DETECT_M Add the following interrupt cause that's actually handled in ice_misc_intr: - PFINT_OICR_PE_CRITERR_M Sig

[net 08/13] ice: Set VLAN flags correctly

2018-08-23 Thread Jeff Kirsher
From: Brett Creeley In the struct ice_aqc_vsi_props the field port_vlan_flags is an overloaded term because it is used for both port VLANs (PVLANs) and regular VLANs. This is an issue and is very confusing especially when dealing with VFs because normal VLANs and port VLANs are not the same. To f

[net 07/13] ice: Use order_base_2 to calculate higher power of 2

2018-08-23 Thread Jeff Kirsher
From: Jacob Keller Currently, we use a combination of ilog2 and is_power_of_2() to calculate the next power of 2 for the qcount. This appears to be causing a warning on some combinations of GCC and the Linux kernel: MODPOST 1 modules WARNING: "ilog2_NaN" [ice.ko] undefined! This appears to

[net 13/13] ice: Trivial formatting fixes

2018-08-23 Thread Jeff Kirsher
From: Anirudh Venkataramanan 1) Add missing "\n" when printing link event error message. 2) Update dev_err statement in probe. 3) Add function description for ice_clear_pf_cfg. 4) Fix coding style for ice_acquire_nvm. 5) netdev->mtu is unsigned so use %u. Signed-off-by: Anirudh Venkataramana

[net 10/13] ice: Fix a few null pointer dereference issues

2018-08-23 Thread Jeff Kirsher
From: Anirudh Venkataramanan 1) When ice_ena_msix_range() fails to reserve vectors, a devm_kfree() warning was seen in the error flow path. So check pf->irq_tracker before use in ice_clear_interrupt_scheme(). 2) In ice_vsi_cfg(), check vsi->netdev before use. 3) In ice_get_link_status, ch

Re: [v3, net-next, 02/12] net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit

2018-08-23 Thread Martin Blumenstingl
Hi, On Fri, Aug 17, 2018 at 9:32 AM Jerome Brunet wrote: > > On Fri, 2018-05-18 at 14:55 +0100, Jose Abreu wrote: > > This is cutting down performance. Once the timer is armed it should run > > after the time expires for the first packet sent and not the last one. > > > > After this change, runni

Re: [PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Daniel Borkmann
On 08/23/2018 07:48 PM, Quentin Monnet wrote: > 2018-08-23 20:35 UTC+0300 ~ Sergei Shtylyov > >> Hello! >> >> On 08/23/2018 07:46 PM, Quentin Monnet wrote: >> >>> When command line parsing fails in the while loop in do_event_pipe() >>> because the number of arguments is incorrect or because the ke

Re: [PATCH bpf] xsk: fix return value of xdp_umem_assign_dev()

2018-08-23 Thread Jakub Kicinski
On Mon, 20 Aug 2018 09:54:25 +0900, Prashant Bhole wrote: > s/ENOTSUPP/EOPNOTSUPP/ in function umem_assign_dev(). > This function's return value is directly returned by xsk_bind(). > EOPNOTSUPP is bind()'s possible return value. > > Fixes: f734607e819b ("xsk: refactor xdp_umem_assign_dev()") > Sig

Re: [PATCH 0/2] net/sched: Add hardware specific counters to TC actions

2018-08-23 Thread Jakub Kicinski
On Mon, 20 Aug 2018 16:03:40 +0200, Eelco Chaudron wrote: > On 17 Aug 2018, at 13:27, Jakub Kicinski wrote: > > On Thu, 16 Aug 2018 14:02:44 +0200, Eelco Chaudron wrote: > >> On 11 Aug 2018, at 21:06, David Miller wrote: > >> > >>> From: Jakub Kicinski > >>> Date: Thu, 9 Aug 2018 20:26:08 -070

Re: [PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Quentin Monnet
2018-08-23 20:35 UTC+0300 ~ Sergei Shtylyov > Hello! > > On 08/23/2018 07:46 PM, Quentin Monnet wrote: > >> When command line parsing fails in the while loop in do_event_pipe() >> because the number of arguments is incorrect or because the keyword is >> unknown, an error message is displayed, bu

Re: [PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Sergei Shtylyov
Hello! On 08/23/2018 07:46 PM, Quentin Monnet wrote: > When command line parsing fails in the while loop in do_event_pipe() > because the number of arguments is incorrect or because the keyword is > unknown, an error message is displayed, but bpfool bp-who? ;-) > remains stucked in Stuck

Re: [PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Daniel Borkmann
On 08/23/2018 06:46 PM, Quentin Monnet wrote: > When command line parsing fails in the while loop in do_event_pipe() > because the number of arguments is incorrect or because the keyword is > unknown, an error message is displayed, but bpfool remains stucked in > the loop. Make sure we exit the loo

Re: [PATCH bpf] bpf: use per htab salt for bucket hash

2018-08-23 Thread Eduardo Valentin
On Wed, Aug 22, 2018 at 11:49:37PM +0200, Daniel Borkmann wrote: > All BPF hash and LRU maps currently have a known and global seed > we feed into jhash() which is 0. This is suboptimal, thus fix it > by generating a random seed upon hashtab setup time which we can > later on feed into jhash() on l

[PATCH bpf] tools: bpftool: return from do_event_pipe() on bad arguments

2018-08-23 Thread Quentin Monnet
When command line parsing fails in the while loop in do_event_pipe() because the number of arguments is incorrect or because the keyword is unknown, an error message is displayed, but bpfool remains stucked in the loop. Make sure we exit the loop upon failure. Fixes: f412eed9dfde ("tools: bpftool:

[PATCH net] vti6: remove !skb->ignore_df check from vti6_xmit()

2018-08-23 Thread Alexey Kodanev
Before the commit d6990976af7c ("vti6: fix PMTU caching and reporting on xmit") '!skb->ignore_df' check was always true because the function skb_scrub_packet() was called before it, resetting ignore_df to zero. In the commit, skb_scrub_packet() was moved below, and now this check can be false for

Re: is "volatile" the cause of ifconfig flags not matching sysfs flags?

2018-08-23 Thread Robert P. J. Day
On Wed, 22 Aug 2018, Stephen Hemminger wrote: > On Wed, 22 Aug 2018 18:32:36 -0400 (EDT) > "Robert P. J. Day" wrote: > > > almost certainly another dumb question, but i was poking around the > > sysfs, particularly /sys/class/net//*, to familiarize myself > > with what i can glean (or set) re i

Re: [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean

2018-08-23 Thread Luca Boccassi
On Thu, 2018-08-23 at 09:07 +0200, Stefan Bader wrote: > On 22.08.2018 20:09, Luca Boccassi wrote: > > Some generated test files were not removed, including one > > executable in > > the testsuite/tools directory. > > Ensure make clean from the top level directory works for the > > testsuite > > su

[PATCH v2] net: macb: do not disable MDIO bus at open/close time

2018-08-23 Thread Anssi Hannula
macb_reset_hw() is called from macb_close() and indirectly from macb_open(). macb_reset_hw() zeroes the NCR register, including the MPE (Management Port Enable) bit. This will prevent accessing any other PHYs for other Ethernet MACs on the MDIO bus, which remains registered at macb_reset_hw() time

Re: Failed to call bpf_l3_csum_replace() twice for IPIP tunnel

2018-08-23 Thread Daniel Borkmann
On 08/23/2018 08:39 AM, IMBRIUS AGER wrote: > hello, I am trying to modify the src addr (both inner and outer) of IPIP > tunnel. > > this is the testing code: > > === > > void *data = (void *)(long)skb->data; > void *data_end = (void *)(long)skb->data_end; >

Re: [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean

2018-08-23 Thread Stefan Bader
On 22.08.2018 20:09, Luca Boccassi wrote: > Some generated test files were not removed, including one executable in > the testsuite/tools directory. > Ensure make clean from the top level directory works for the testsuite > subdirs too, and that all the files are removed. > > Signed-off-by: Luca B