Re: [PATCH v4 net] bpf: add bpf_sk_netns_id() helper

2017-02-13 Thread Eric W. Biederman
Alexei Starovoitov writes: > in cases where bpf programs are looking at sockets and packets > that belong to different netns, it could be useful to get an id > that uniquely identify a netns within the whole system. It could be useful but there is no unique namespace id. >

Re: xfrm_neigh_lookup and dst->path

2017-02-13 Thread Steffen Klassert
On Sat, Feb 11, 2017 at 03:12:44PM +0200, Julian Anastasov wrote: > > Hello, > > On Fri, 3 Feb 2017, Steffen Klassert wrote: > > > On Thu, Feb 02, 2017 at 01:04:34AM +0200, Julian Anastasov wrote: > > > > > > For now I installed common handler, just like > > > xfrm_neigh_lookup. BTW

Re: net/xfrm: stack out-of-bounds in xfrm_flowi_sport

2017-02-13 Thread Steffen Klassert
On Mon, Feb 13, 2017 at 03:46:56PM +0100, Dmitry Vyukov wrote: > > On commit 7089db84e356562f8ba737c29e472cc42d530dbc. > > > struct flowi4 fl4_stack allocated on stack in udp_sendmsg is being > casted to larger struct flowi and then accessed. Looks like the problem is when using IPv4-mapped

Re: linux-next: build failure after merge of the net tree

2017-02-13 Thread Ingo Molnar
* Stephen Rothwell wrote: > Hi all, > > After merging the net tree, today's linux-next build (powerpc64le perf) > failed like this: > > Warning: tools/include/uapi/linux/bpf.h differs from kernel > bpf.c: In function 'bpf_prog_attach': > bpf.c:180:6: error: 'union

Re: linux-next: build failure after merge of the net tree

2017-02-13 Thread Ingo Molnar
* Stephen Rothwell wrote: > --- a/tools/include/uapi/linux/bpf.h > +++ b/tools/include/uapi/linux/bpf.h > @@ -116,6 +116,12 @@ enum bpf_attach_type { > > #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE > > +/* If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH

Re: [GIT PULL 00/15] perf/core improvements and fixes

2017-02-13 Thread Ingo Molnar
perf/x86/intel: Add Kaby Lake support (2017-02-11 21:28:23 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git > tags/perf-core-for-mingo-4.11-20170213 > > for you to fetch changes up to a734fb5d60067a

[PATCH iproute2] devlink: Call dl_free in early exit case

2017-02-13 Thread Leon Romanovsky
From: Leon Romanovsky Prior to parsing command options, the devlink tool allocates memory to store results. In case of early exit (wrong parameters or version check), this memory wasn't freed. Signed-off-by: Leon Romanovsky Acked-by: Jiri Pirko

[PATCH 2/4] ptp: use kcalloc/kmallco_array when allocating arrays

2017-02-13 Thread Dmitry Torokhov
kcalloc/kmalloc_array are more semantically correct when allocating arrays of objects, and overflow-safe. Signed-off-by: Dmitry Torokhov --- drivers/ptp/ptp_sysfs.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/ptp/ptp_sysfs.c

[PATCH 1/4] ptp: do not explicitly set drvdata in ptp_clock_register()

2017-02-13 Thread Dmitry Torokhov
We do not need explicitly call dev_set_drvdata(), as it is done for us by device_create(). Signed-off-by: Dmitry Torokhov --- drivers/ptp/ptp_clock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c index

[PATCH 4/4] ptp: create "pins" together with the rest of attributes

2017-02-13 Thread Dmitry Torokhov
Let's switch to using device_create_with_groups(), which will allow us to create "pins" attribute group together with the rest of ptp device attributes, and before userspace gets notified about ptp device creation. Signed-off-by: Dmitry Torokhov ---

[PATCH 3/4] ptp: use is_visible method to hide unused attributes

2017-02-13 Thread Dmitry Torokhov
Instead of creating selected attributes after the device is created (and after userspace potentially seen uevent), lets use attribute group is_visible() method to control which attributes are shown. This will allow us to create all attributes (except "pins" group, which will be taken care of

Re: [patch net-next] net: qcom/emac: fix a sizeof() typo

2017-02-13 Thread David Miller
From: Dan Carpenter Date: Mon, 13 Feb 2017 14:00:22 +0300 > We had intended to say "sizeof(u32)" but the "u" is missing. > Fortunately, sizeof(32) is also 4, so the original code still works. > > Fixes: c4e7beea2192 ("net: qcom/emac: add ethtool support for reading >

Re: [v2 PATCH 0/3] rhashtable: Handle table allocation failure during insertion

2017-02-13 Thread David Miller
From: Herbert Xu Date: Sat, 11 Feb 2017 19:24:22 +0800 > This series tackles the problem of table allocation failures during > insertion. The issue is that we cannot vmalloc during insertion. > This series deals with this by introducing nested tables. > > The first

Re: [PATCH] NET: Fix /proc/net/arp for AX.25

2017-02-13 Thread David Miller
From: Ralf Baechle Date: Sat, 11 Feb 2017 00:38:57 +0100 > When sending ARP requests over AX.25 links the hwaddress in the neighbour > cache are not getting initialized. For such an incomplete arp entry > ax2asc2 will generate an empty string resulting in /proc/net/arp

Re: [PATCH 2/2] net: fs_enet: Simplify code

2017-02-13 Thread David Miller
From: Christophe JAILLET Date: Fri, 10 Feb 2017 21:17:19 +0100 > There is no need to use an intermediate variable to handle an error code > in this case. > > Signed-off-by: Christophe JAILLET Applied.

Re: [PATCH 1/2] net: fs_enet: Fix an error handling path

2017-02-13 Thread David Miller
From: Christophe JAILLET Date: Fri, 10 Feb 2017 21:17:06 +0100 > 'of_node_put(fpi->phy_node)' should also be called if we branch to > 'out_deregister_fixed_link' error handling path. > > Signed-off-by: Christophe JAILLET Applied.

Re: [PATCH net-next 0/2] afs: Use system UUID generation

2017-02-13 Thread David Miller
From: David Howells Date: Fri, 10 Feb 2017 16:46:12 + > There is now a general function for generating a UUID and AFS should make > use of it. It's also been recommended to me that I switch to using random > rather than time plus MAC address-based UUIDs which this

Re: [PATCH net-next] net: make net_device members garp_port and mrp_port conditional

2017-02-13 Thread David Miller
From: Tobias Klauser Date: Fri, 10 Feb 2017 16:43:50 +0100 > garp_port is only used in net/802/garp.c which is only compiled with > CONFIG_GARP enabled. Same goes for mrp_port which is only used in > net/802/mrp.c with CONFIG_MRP enabled. > > Only include the two members in

Re: [PATCH net-next] net: busy-poll: remove LL_FLUSH_FAILED and LL_FLUSH_BUSY

2017-02-13 Thread David Miller
From: Eric Dumazet Date: Fri, 10 Feb 2017 05:46:46 -0800 > From: Eric Dumazet > > Commit 79e7fff47b7b ("net: remove support for per driver > ndo_busy_poll()") made them obsolete. > > Signed-off-by: Eric Dumazet Applied,

Re: [PATCH V4 2/2] qedf: Add QLogic FastLinQ offload FCoE driver framework.

2017-02-13 Thread kbuild test robot
Hi Chad, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Dupuis-Chad/qed-Add-support-for-hardware-offloaded-FCoE/20170214-040339 coccinelle warnings: (new ones prefixed by >>) >> drivers/scsi/qedf/qedf_main.c:2742:2-7: WARNING: NULL check before

[PATCH] qedf: fix ifnullfree.cocci warnings

2017-02-13 Thread kbuild test robot
drivers/scsi/qedf/qedf_main.c:2742:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not

[PATCH][CFT] Saner error handling in skb_copy_datagram_iter() et.al. (was Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b))

2017-02-13 Thread Al Viro
On Mon, Feb 13, 2017 at 10:56:46PM +0100, Christian Lamparter wrote: > Ok, thank you for sticking around. As for the patch: I've tested it with > the dlbug program from (modified to > pull from a local server) and the netem corruption policy as described > in

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Alexander Duyck
On Mon, Feb 13, 2017 at 4:57 PM, Eric Dumazet wrote: > >> Alex, be assured that I implemented the full thing, of course. > > Patch was : > > diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c > b/drivers/net/ethernet/mellanox/mlx4/en_rx.c > index >

[GIT PULL 00/15] perf/core improvements and fixes

2017-02-13 Thread Arnaldo Carvalho de Melo
at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.11-20170213 for you to fetch changes up to a734fb5d60067a73dd7099a58756847c07f9cd68: samples/bpf: Reset global variables (2017-02-13 17:22:53 -0300

[PATCH 13/15] samples/bpf: Add missing header

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Mickaël Salaün Include unistd.h to define __NR_getuid and __NR_getsid. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann

[PATCH 14/15] samples/bpf: Ignore already processed ELF sections

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Mickaël Salaün Add a missing check for the map fixup loop. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc:

[PATCH 15/15] samples/bpf: Reset global variables

2017-02-13 Thread Arnaldo Carvalho de Melo
From: Mickaël Salaün Before loading a new ELF, clean previous kernel version, license and processed sections. Signed-off-by: Mickaël Salaün Acked-by: Joe Stringer Acked-by: Wang Nan Cc: Alexei Starovoitov

Re: [PATCH v3 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-13 Thread jeffy
Hi Dmitry, On 02/14/2017 05:27 AM, Dmitry Torokhov wrote: Hi Jeffy, On Sun, Feb 12, 2017 at 8:12 PM, Jeffy Chen wrote: It looks like hidp_session_thread has same pattern as the issue reported in old rfcomm: while (1) {

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
> Alex, be assured that I implemented the full thing, of course. Patch was : diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index aa074e57ce06fb2842fa1faabd156c3cd2fe10f5..0ae1b544668d26c24044dbdefdd9b12253596ff9 100644 ---

[PATCH v4 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-13 Thread Jeffy Chen
It looks like hidp_session_thread has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule();

[PATCH v4 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-02-13 Thread Jeffy Chen
It looks like cmtp_session has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule();

[PATCH v4 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-02-13 Thread Jeffy Chen
It looks like bnep_session has same pattern as the issue reported in old rfcomm: while (1) { set_current_state(TASK_INTERRUPTIBLE); if (condition) break; // may call might_sleep here schedule();

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
On Mon, 2017-02-13 at 16:46 -0800, Eric Dumazet wrote: > Alex, be assured that I implemented the full thing, of course. > > ( The pagecnt_bias field, .. refilled every 16K rounds ) Correction, USHRT_MAX is ~64K, not 16K

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
On Mon, 2017-02-13 at 16:34 -0800, Alexander Duyck wrote: > On Mon, Feb 13, 2017 at 4:22 PM, Eric Dumazet wrote: > > On Mon, Feb 13, 2017 at 3:47 PM, Alexander Duyck > > wrote: > > > >> Actually it depends on the use case. In the case of pktgen

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Alexander Duyck
On Mon, Feb 13, 2017 at 4:22 PM, Eric Dumazet wrote: > On Mon, Feb 13, 2017 at 3:47 PM, Alexander Duyck > wrote: > >> Actually it depends on the use case. In the case of pktgen packets >> they are usually dropped pretty early in the receive path.

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
On Mon, Feb 13, 2017 at 3:47 PM, Alexander Duyck wrote: > Actually it depends on the use case. In the case of pktgen packets > they are usually dropped pretty early in the receive path. Think > something more along the lines of a TCP syn flood versus something > that

Re: [PATCH] bpf: reduce compiler warnings by adding fallthrough comments

2017-02-13 Thread Alexei Starovoitov
On Tue, Feb 14, 2017 at 12:18:05AM +0100, Daniel Borkmann wrote: > >kernel/bpf/verifier.c:2019:24: warning: this statement may fall through > >[-Wimplicit-fallthrough=] > >false_reg->min_value = 0; > >~^~~ > > > >Reported-by: David Binderman >

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Alexander Duyck
On Mon, Feb 13, 2017 at 3:29 PM, Eric Dumazet wrote: > On Mon, Feb 13, 2017 at 3:26 PM, Alexander Duyck > wrote: > >> >> Odds are for a single TCP flow you won't notice. This tends to be >> more of a small packets type performance issue. If you

Re: [RFC 2/2] net: emac: add support for device-tree based PHY discovery and setup

2017-02-13 Thread Christian Lamparter
On Saturday, February 11, 2017 3:07:04 PM CET Florian Fainelli wrote: > Le 02/11/17 à 14:45, Christian Lamparter a écrit : > > On Sunday, February 5, 2017 2:44:54 PM CET Florian Fainelli wrote: > >> Le 02/05/17 à 14:25, Christian Lamparter a écrit : > >>> From: Christian Lamparter

RE: [PATCHv6 0/7] Refactor macvtap to re-use tap functionality by other virtual intefaces

2017-02-13 Thread Grandhi, Sainath
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Saturday, February 11, 2017 6:00 PM > To: Grandhi, Sainath > Cc: netdev@vger.kernel.org; mah...@bandewar.net; linux- > ker...@vger.kernel.org > Subject: Re: [PATCHv6 0/7] Refactor

Re: linux-next: build failure after merge of the net tree

2017-02-13 Thread Alexei Starovoitov
On 2/13/17 2:12 PM, Stephen Rothwell wrote: Hi all, After merging the net tree, today's linux-next build (powerpc64le perf) failed like this: Warning: tools/include/uapi/linux/bpf.h differs from kernel bpf.c: In function 'bpf_prog_attach': bpf.c:180:6: error: 'union bpf_attr' has no member

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
On Mon, Feb 13, 2017 at 3:26 PM, Alexander Duyck wrote: > > Odds are for a single TCP flow you won't notice. This tends to be > more of a small packets type performance issue. If you hammer on he > Rx using pktgen you would be more likely to see it. > > Anyway patch

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Alexander Duyck
On Mon, Feb 13, 2017 at 3:22 PM, Eric Dumazet wrote: > On Mon, Feb 13, 2017 at 3:16 PM, Alexander Duyck > wrote: > >> Any plans to add the bulk page count updates back at some point? I >> just got around to adding it for igb in commit bd4171a5d4c2

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
On Mon, Feb 13, 2017 at 3:16 PM, Alexander Duyck wrote: > Any plans to add the bulk page count updates back at some point? I > just got around to adding it for igb in commit bd4171a5d4c2 ("igb: > update code to better handle incrementing page count"). I should have >

Re: [PATCH] bpf: reduce compiler warnings by adding fallthrough comments

2017-02-13 Thread Daniel Borkmann
On 02/14/2017 12:02 AM, Alexander Alemayhu wrote: Fixes the following warnings: kernel/bpf/verifier.c: In function ‘may_access_direct_pkt_data’: kernel/bpf/verifier.c:702:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (t == BPF_WRITE) ^

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Alexander Duyck
On Mon, Feb 13, 2017 at 1:09 PM, Eric Dumazet wrote: > On Mon, Feb 13, 2017 at 12:51 PM, Alexander Duyck > wrote: >> On Mon, Feb 13, 2017 at 11:58 AM, Eric Dumazet wrote: > >>> + PAGE_SIZE,

[PATCH] bpf: reduce compiler warnings by adding fallthrough comments

2017-02-13 Thread Alexander Alemayhu
Fixes the following warnings: kernel/bpf/verifier.c: In function ‘may_access_direct_pkt_data’: kernel/bpf/verifier.c:702:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (t == BPF_WRITE) ^ kernel/bpf/verifier.c:704:2: note: here case BPF_PROG_TYPE_SCHED_CLS:

[PATCH 2/2] pcnet32: fix BNC/AUI port on AM79C970A

2017-02-13 Thread Ondrej Zary
Even though the port autoselection is enabled by default on AM79C970A, BNC/AUI port does not work because the link is always reported to be down. The link state reported by the chip belongs only to the TP port but the driver uses it regardless of the port used. The chip can't detect BNC/AUI link

[PATCH 1/2] pcnet32: factor out pcnet32_clr_suspend()

2017-02-13 Thread Ondrej Zary
Move the code to clear SUSPEND flag to a separate function to simplify code. Signed-off-by: Ondrej Zary --- drivers/net/ethernet/amd/pcnet32.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git

Re: net/dccp: use-after-free in dccp_feat_activate_values

2017-02-13 Thread Cong Wang
On Mon, Feb 13, 2017 at 11:19 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 926af6273fc683cd98cd0ce7bf0d04a02eed6742. > > A reproducer and .config are attached. > Note, that it takes quite

linux-next: build failure after merge of the net tree

2017-02-13 Thread Stephen Rothwell
Hi all, After merging the net tree, today's linux-next build (powerpc64le perf) failed like this: Warning: tools/include/uapi/linux/bpf.h differs from kernel bpf.c: In function 'bpf_prog_attach': bpf.c:180:6: error: 'union bpf_attr' has no member named 'attach_flags'; did you mean 'map_flags'?

Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b)

2017-02-13 Thread Christian Lamparter
On Sunday, February 12, 2017 5:42:18 AM CET Al Viro wrote: > On Sat, Feb 11, 2017 at 08:37:06PM +0100, Christian Lamparter wrote: > > > I think if you follow through with this argument. You have the problem of: > > How to handle EFAULT from skb_copy_datagram_* (and all it's "wrappers")? > > > >

Re: net: BUG in __skb_gso_segment

2017-02-13 Thread Eric Dumazet
On Mon, Feb 13, 2017 at 11:54 AM, Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > A reproducer and .config are attached. > > On commit 926af6273fc683cd98cd0ce7bf0d04a02eed6742. > > kernel BUG at

RE: [PATCH net-next v5 1/2] qed: Add infrastructure for PTP support

2017-02-13 Thread Mintz, Yuval
> > +static int qed_ptp_hw_adjfreq(struct qed_dev *cdev, s32 ppb) { > > + struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); > > + struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt; > > + int drift_dir, best_val, best_period; > > + s64 period, dif, dif2; > > + u32 drift_ctr_cfg = 0; > > + s64

Re: [PATCH] Make EN2 pin optional in the TRF7970A driver

2017-02-13 Thread Rob Herring
On Mon, Feb 13, 2017 at 12:38 AM, Heiko Schocher wrote: > Hello Rob, > > > Am 10.02.2017 um 16:51 schrieb Rob Herring: >> >> On Tue, Feb 07, 2017 at 06:22:04AM +0100, Heiko Schocher wrote: >>> >>> From: Guan Ben >>> >>> Make the EN2 pin optional. This is

Re: [PATCH v3 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-13 Thread Dmitry Torokhov
Hi Jeffy, On Sun, Feb 12, 2017 at 8:12 PM, Jeffy Chen wrote: > It looks like hidp_session_thread has same pattern as the issue reported in > old rfcomm: > > while (1) { > set_current_state(TASK_INTERRUPTIBLE); > if (condition) >

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
On Mon, Feb 13, 2017 at 12:51 PM, Alexander Duyck wrote: > On Mon, Feb 13, 2017 at 11:58 AM, Eric Dumazet wrote: >> + PAGE_SIZE, priv->dma_dir); >> page = page_alloc->page; >> /* Revert

Re: [PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Alexander Duyck
On Mon, Feb 13, 2017 at 11:58 AM, Eric Dumazet wrote: > Use of order-3 pages is problematic in some cases. > > This patch might add three kinds of regression : > > 1) a CPU performance regression, but we will add later page > recycling and performance should be back. > > 2)

Re: [PATCH v4 0/3] Miscellaneous fixes for BPF (perf tree)

2017-02-13 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 13, 2017 at 09:42:31AM +0800, Wangnan (F) escreveu: > On 2017/2/9 4:27, Mickaël Salaün wrote: > >Mickaël Salaün (3): > > samples/bpf: Ignore already processed ELF sections > > samples/bpf: Reset global variables > > samples/bpf: Add missing header > > > > samples/bpf/bpf_load.c

Re: [PATCH net-next v5 1/2] qed: Add infrastructure for PTP support

2017-02-13 Thread Richard Cochran
On Mon, Feb 13, 2017 at 03:46:25PM +0200, Yuval Mintz wrote: > +static int qed_ptp_hw_adjfreq(struct qed_dev *cdev, s32 ppb) > +{ > + struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev); > + struct qed_ptt *p_ptt = p_hwfn->p_ptp_ptt; > + int drift_dir, best_val, best_period; > + s64

[PATCH iproute2 v2] ip route: Make name of protocol 0 consistent

2017-02-13 Thread David Ahern
iproute2 can inconsistently show the name of protocol 0 if a route with a custom protocol is added. For example: dsa@cartman:~$ ip -6 ro ls table all | egrep 'proto none|proto unspec' local ::1 dev lo table local proto none metric 0 pref medium local fe80::225:90ff:fecb:1c18 dev lo

Re: [PATCH v5] net: dev_weight: TX/RX orthogonality

2017-02-13 Thread Matthias Tafelmeier
>> Oftenly, introducing side effects on packet processing on the other half >> of the stack by adjusting one of TX/RX via sysctl is not desirable. >> There are cases of demand for asymmetric, orthogonal configurability. >> >> This holds true especially for nodes where RPS for RFS usage on top is

IT System Alerts

2017-02-13 Thread Melanie Fries
Help Desk This e-mail has been sent to you by Outlook Web App If you do not agree to update your account, your email account will be blocked. Click Her to update Sincerely, IT-Service Help Desk

[patch net-next] mlxsw: spectrum: Change ipv6 unregistered mc table

2017-02-13 Thread Jiri Pirko
From: Nogah Frankel Point back the unregister IPv6 mc table to the bc table. It is done since IPv6 mcast snooping is not supported for Spectrum yet. Reported-by: Jiri Pirko Fixes: 71c365bdc439 ("mlxsw: spectrum: Separate bc and mc floods") Signed-off-by:

[PATCH v3 net-next 14/14] mlx4: remove duplicate code in mlx4_en_process_rx_cq()

2017-02-13 Thread Eric Dumazet
We should keep one way to build skbs, regardless of GRO being on or off. Note that I made sure to defer as much as possible the point we need to pull data from the frame, so that future prefetch() we might add are more effective. These skb attributes derive from the CQE or ring : ip_summed,

[PATCH v3 net-next 13/14] mlx4: make validate_loopback() more generic

2017-02-13 Thread Eric Dumazet
Testing a boolean in fast path is not worth duplicating the code allocating packets, when GRO is on or off. If this proves to be a problem, we might later use a jump label. Next patch will remove this duplicated code and ease code review. Signed-off-by: Eric Dumazet ---

[PATCH v3 net-next 11/14] mlx4: do not access rx_desc from mlx4_en_process_rx_cq()

2017-02-13 Thread Eric Dumazet
Instead of fetching dma address from rx_desc->data[0].addr, prefer using frags[0].dma + frags[0].page_offset to avoid a potential cache line miss. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 9 +++-- 1 file changed, 3 insertions(+), 6

[PATCH v3 net-next 08/14] mlx4: use order-0 pages for RX

2017-02-13 Thread Eric Dumazet
Use of order-3 pages is problematic in some cases. This patch might add three kinds of regression : 1) a CPU performance regression, but we will add later page recycling and performance should be back. 2) TCP receiver could grow its receive window slightly slower, because

[PATCH v3 net-next 12/14] mlx4: factorize page_address() calls

2017-02-13 Thread Eric Dumazet
We need to compute the frame virtual address at different points. Do it once. Following patch will use the new va address for validate_loopback() Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 15 +++ 1 file changed, 7

[PATCH v3 net-next 10/14] mlx4: add rx_alloc_pages counter in ethtool -S

2017-02-13 Thread Eric Dumazet
This new counter tracks number of pages that we allocated for one port. lpaa24:~# ethtool -S eth0 | egrep 'rx_alloc_pages|rx_packets' rx_packets: 306755183 rx_alloc_pages: 932897 Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2

[PATCH v3 net-next 09/14] mlx4: add page recycling in receive path

2017-02-13 Thread Eric Dumazet
Same technique than some Intel drivers, for arches where PAGE_SIZE = 4096 In most cases, pages are reused because they were consumed before we could loop around the RX ring. This brings back performance, and is even better, a single TCP flow reaches 30Gbit on my hosts. v2: added full memset()

[PATCH v3 net-next 07/14] mlx4: removal of frag_sizes[]

2017-02-13 Thread Eric Dumazet
We will soon use order-0 pages, and frag truesize will more precisely match real sizes. In the new model, we prefer to use <= 2048 bytes fragments, so that we can use page-recycle technique on PAGE_SIZE=4096 arches. We will still pack as much frames as possible on arches with big pages, like

[PATCH v3 net-next 04/14] mlx4: get rid of frag_prefix_size

2017-02-13 Thread Eric Dumazet
Using per frag storage for frag_prefix_size is really silly. mlx4_en_complete_rx_desc() has all needed info already. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 27 --- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h

[PATCH v3 net-next 03/14] mlx4: remove order field from mlx4_en_frag_info

2017-02-13 Thread Eric Dumazet
This is really a port attribute, no need to duplicate it per RX queue and per frag. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH v3 net-next 06/14] mlx4: reduce rx ring page_cache size

2017-02-13 Thread Eric Dumazet
We only need to store the page and dma address. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 17 ++--- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 -- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 6 +- 3 files

[PATCH v3 net-next 05/14] mlx4: rx_headroom is a per port attribute

2017-02-13 Thread Eric Dumazet
No need to duplicate it per RX queue / frags. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 6 +++--- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v3 net-next 01/14] mlx4: use __skb_fill_page_desc()

2017-02-13 Thread Eric Dumazet
Or we might miss the fact that a page was allocated from memory reserves. Fixes: dceeab0e5258 ("mlx4: support __GFP_MEMALLOC for rx") Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH v3 net-next 02/14] mlx4: dma_dir is a mlx4_en_priv attribute

2017-02-13 Thread Eric Dumazet
No need to duplicate it for all queues and frags. num_frags & log_rx_info become u8 to save space. u8 accesses are a bit faster than u16 anyway. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 16

[PATCH v3 net-next 00/14] mlx4: order-0 allocations and page recycling

2017-02-13 Thread Eric Dumazet
As mentioned half a year ago, we better switch mlx4 driver to order-0 allocations and page recycling. This reduces vulnerability surface thanks to better skb->truesize tracking and provides better performance in most cases. v2 provides an ethtool -S new counter (rx_alloc_pages) and code

Re: [PATCH v2 net-next 00/14] mlx4: order-0 allocations and page recycling

2017-02-13 Thread Eric Dumazet
On Mon, Feb 13, 2017 at 12:50 AM, Tariq Toukan wrote: > > > MTU is changed from 1500 to 500, with VLAN configured. Thanks, I now see what is happening. mlx4_en_free_rx_buf() needs to clean whole rx_info buffer, not the part between ring->cons & ring->prod, otherwise we

Re: [Patch net] kcm: fix a null pointer dereference in kcm_sendmsg()

2017-02-13 Thread Tom Herbert
On Mon, Feb 13, 2017 at 11:13 AM, Cong Wang wrote: > In commit 98e3862ca2b1 ("kcm: fix 0-length case for kcm_sendmsg()") > I tried to avoid skb allocation for 0-length case, but missed > a check for NULL pointer in the non EOR case. > > Fixes: 98e3862ca2b1 ("kcm: fix

Re: [PATCH v4 net-next 5/8] sunvnet: straighten up message event handling logic

2017-02-13 Thread Shannon Nelson
On 2/13/2017 11:06 AM, Joe Perches wrote: On Mon, 2017-02-13 at 10:57 -0800, Shannon Nelson wrote: The use of gotos for handling the incoming events made this code harder to read and support than it should be. This patch straightens out and clears up the logic. Signed-off-by: Shannon Nelson

[PATCH V4 0/2] Add QLogic FastLinQ FCoE (qedf) driver

2017-02-13 Thread Dupuis, Chad
From: "Dupuis, Chad" Dave, please apply the qed patch to net-next at your earliest convenience. Martin, the qed patch needs to be applied first as the qedf patch is dependent on the FCoE bits in the first qed driver patch. This series introduces the hardware offload FCoE

[PATCH V4 net-next 1/2] qed: Add support for hardware offloaded FCoE.

2017-02-13 Thread Dupuis, Chad
From: Arun Easi This adds the backbone required for the various HW initalizations which are necessary for the FCoE driver (qedf) for QLogic FastLinQ 4 line of adapters - FW notification, resource initializations, etc. Signed-off-by: Arun Easi

[Patch net] kcm: fix a null pointer dereference in kcm_sendmsg()

2017-02-13 Thread Cong Wang
In commit 98e3862ca2b1 ("kcm: fix 0-length case for kcm_sendmsg()") I tried to avoid skb allocation for 0-length case, but missed a check for NULL pointer in the non EOR case. Fixes: 98e3862ca2b1 ("kcm: fix 0-length case for kcm_sendmsg()") Reported-by: Dmitry Vyukov Cc: Tom

Re: [PATCH v4 net-next 5/8] sunvnet: straighten up message event handling logic

2017-02-13 Thread Joe Perches
On Mon, 2017-02-13 at 10:57 -0800, Shannon Nelson wrote: > The use of gotos for handling the incoming events made this code > harder to read and support than it should be. This patch straightens > out and clears up the logic. > > Signed-off-by: Shannon Nelson > --- >

[PATCH v4 net-next 0/8] sunvnet driver updates

2017-02-13 Thread Shannon Nelson
The sunvnet ldom virtual network driver was due for some updates and a bugfix or two. These patches address a few items left over from last year's make-over. v2: - changed memory barrier fix to use smp_wmb - put NETIF_F_SG back into the advertised ldmvsw hw_features v3: - the sunvnet_common

[PATCH v4 net-next 2/8] sunvnet: remove unused variable in maybe_tx_wakeup

2017-02-13 Thread Shannon Nelson
From: Sowmini Varadhan The vio_dring_state *dr variable is unused in maybe_tx_wakeup(). As the comments indicate, we call maybe_tx_wakeup() whenever we get a STOPPED LDC message on the port. If the queue is stopped, we want to wake it up so that we will send another

[PATCH v4 net-next 1/8] sunvnet: make sunvnet common code dynamically loadable

2017-02-13 Thread Shannon Nelson
When the sunvnet_common code was split out for use by both sunvnet and the newer ldmvsw, it was made into a static kernel library, which limits the usefulness of sunvnet and ldmvsw as loadables, since most of the real work is being done in the shared code. Also, this is simply dead code in

[PATCH v4 net-next 3/8] sunvnet: update version and version printing

2017-02-13 Thread Shannon Nelson
There have been several changes since the first version of this code, so we bump the version number. While we're at it, we can simplify the version printing a bit and drop a couple lines of code. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/sun/sunvnet.c |

[PATCH v4 net-next 4/8] sunvnet: add memory barrier before check for tx enable

2017-02-13 Thread Shannon Nelson
In order to allow the underlying LDC and outstanding memory operations to potentially catch up with the driver's Tx requests, add a memory barrier before checking again for available tx descriptors. Signed-off-by: Shannon Nelson ---

[PATCH v4 net-next 5/8] sunvnet: straighten up message event handling logic

2017-02-13 Thread Shannon Nelson
The use of gotos for handling the incoming events made this code harder to read and support than it should be. This patch straightens out and clears up the logic. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/sun/sunvnet_common.c | 94

[PATCH v4 net-next 7/8] ldmvsw: update and simplify version string

2017-02-13 Thread Shannon Nelson
New version and simplify the print code. Signed-off-by: Shannon Nelson --- drivers/net/ethernet/sun/ldmvsw.c | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c

[PATCH v4 net-next 8/8] ldmvsw: disable tso and gso for bridge operations

2017-02-13 Thread Shannon Nelson
The ldmvsw driver is specifically for supporting the ldom virtual networking by running in the primary ldom and using the LDC to connect the remaining ldoms to the outside world via a bridge. With TSO and GSO supported while connected the bridge, things tend to misbehave as seen in our case by

[PATCH v4 net-next 6/8] sunvnet: remove extra rcu_read_unlocks

2017-02-13 Thread Shannon Nelson
The RCU read lock is grabbed first thing in sunvnet_start_xmit_common() so it always needs to be released. This removes the conditional release in the dropped packet error path and removes a couple of superfluous calls in the middle of the code. Reported-by: Bijan Mottahedeh

Re: [PATCH net-next 0/4] net/sched: Use TC skip flags to reflect HW offload status

2017-02-13 Thread Or Gerlitz
On Fri, Feb 10, 2017 at 9:36 PM, David Miller wrote: > From: Or Gerlitz > Date: Thu, 9 Feb 2017 16:18:04 +0200 > >> Currently there is no way of querying whether a filter is >> offloaded to HW or not when using both policy (no flag). >> >> Reuse the

Re: Linux HSR driver question

2017-02-13 Thread Murali Karicheri
On 02/13/2017 10:38 AM, Arvid Brodin wrote: > On 2017-02-09 21:32, Murali Karicheri wrote: >> Hi Arvid, >> >> While I work to add PRP support to the existing Linux HSR driver, I came >> across >> a piece of code related to prune node function. The hsr_device.c adds the >> prune timer in

Re: [PATCH net] at803x: insure minimum delay for SGMII link AN completion ckeck

2017-02-13 Thread Andrew Lunn
> Yes, the phy is operating in interrupt mode. > The phy nodes from the board's device tree have their interrupt properties > set: > http://lxr.free-electrons.com/source/arch/powerpc/boot/dts/fsl/p1010rdb-pb.dts > > I can confirm that link status changes are signaled via interrupts >

Re: [PATCH] net:ethernet:aquantia: Add 2500/5000 mbit link modes support.

2017-02-13 Thread David Miller
From: Pavel Belous Date: Thu, 9 Feb 2017 23:53:10 +0300 > From: Pavel Belous > > Using new link mode indices instead deprecated SUPPORTED_/ADVERTISED_ > macro. > > Added indication for 2500 and 5000mbit link modes (AQtion adapter already

Re: [PATCH 1/1] MAINTAINERS: Remove old e-mail address

2017-02-13 Thread David Miller
From: Arnaldo Carvalho de Melo Date: Mon, 13 Feb 2017 14:15:44 -0300 > The ghostprotocols.net domain is not working, remove it from CREDITS and > MAINTAINERS, and change the status to "Odd fixes", and since I haven't > been maintaining those, remove my address from there. > >

  1   2   >