Re: DQL and TCQ_F_CAN_BYPASS destroy performance under virtualizaiton (Was: "Re: net_sched strange in 4.11")

2017-05-10 Thread Anton Ivanov
On 11/05/17 03:43, Jason Wang wrote: > > > On 2017年05月10日 17:42, Anton Ivanov wrote: >> On 10/05/17 09:56, Jason Wang wrote: >>> >>> >>> On 2017年05月10日 13:28, Anton Ivanov wrote: On 10/05/17 03:18, Jason Wang wrote: > > On 2017年05月09日 23:11, Stefan Hajnoczi wrote: >> On Tue, May

[PATCH net] net: sched: optimize class dumps

2017-05-10 Thread Eric Dumazet
From: Eric Dumazet In commit 59cc1f61f09c ("net: sched: convert qdisc linked list to hashtable") we missed the opportunity to considerably speed up tc_dump_tclass_root() if a qdisc handle is provided by user. Instead of iterating all the qdiscs, use qdisc_match_from_root()

RE: [PATCH] net: fec: select queue depending on VLAN priority

2017-05-10 Thread Andy Duan
From: Stefan Agner Sent: Thursday, May 11, 2017 12:08 PM >To: Andy Duan >Cc: David Miller ; and...@lunn.ch; >feste...@gmail.com; netdev@vger.kernel.org; linux- >ker...@vger.kernel.org >Subject: Re: [PATCH] net: fec: select queue

Re: [PATCH] net: fec: select queue depending on VLAN priority

2017-05-10 Thread Stefan Agner
On 2017-05-09 19:42, Andy Duan wrote: > From: David Miller Sent: Tuesday, May 09, 2017 9:39 PM >>To: ste...@agner.ch >>Cc: Andy Duan ; and...@lunn.ch; >>feste...@gmail.com; netdev@vger.kernel.org; linux- >>ker...@vger.kernel.org >>Subject: Re: [PATCH]

Re: [PATCH] libertas: Avoid reading past end of buffer

2017-05-10 Thread Kalle Valo
Joe Perches writes: > unrelated trivia: > > lbs_deb_enter is used incorrectly here at > function exit as both enter and leave calls. > > That type of copy/paste defect may be common. > > $ git grep -w lbs_deb_enter | wc -l > 148 > $ git grep -w lbs_deb_leave | wc -l > 71 > >

Re: [PATCH net-next V4 10/10] vhost_net: try batch dequing from skb array

2017-05-10 Thread Jason Wang
On 2017年05月10日 20:34, Michael S. Tsirkin wrote: On Wed, May 10, 2017 at 11:36:22AM +0800, Jason Wang wrote: We used to dequeue one skb during recvmsg() from skb_array, this could be inefficient because of the bad cache utilization and spinlock touching for each packet. This patch tries to

Re: DQL and TCQ_F_CAN_BYPASS destroy performance under virtualizaiton (Was: "Re: net_sched strange in 4.11")

2017-05-10 Thread Jason Wang
On 2017年05月10日 17:42, Anton Ivanov wrote: On 10/05/17 09:56, Jason Wang wrote: On 2017年05月10日 13:28, Anton Ivanov wrote: On 10/05/17 03:18, Jason Wang wrote: On 2017年05月09日 23:11, Stefan Hajnoczi wrote: On Tue, May 09, 2017 at 08:46:46AM +0100, Anton Ivanov wrote: I have figured it

Re: openvswitch MTU patch needed in 4.10 stable

2017-05-10 Thread David Miller
From: Stephen Hemminger Date: Tue, 9 May 2017 08:46:56 -0700 > Could you queue the patch to stable? It speeds things along if you actually specify the SHA1 ID of the specific commit being requested for a -stable backport. I did this work, but you could have taken a

Re: [PATCH net] tcp: avoid fragmenting peculiar skbs in SACK

2017-05-10 Thread Neal Cardwell
On Wed, May 10, 2017 at 8:01 PM, Yuchung Cheng wrote: > > This patch fixes a bug in splitting an SKB during SACK > processing. Specifically if an skb contains multiple > packets and is only partially sacked in the higher sequences, > tcp_match_sack_to_skb() splits the skb and

Re: [PATCH 1/2] PCI: Add new PCIe Fabric End Node flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING

2017-05-10 Thread Ding Tianhong
On 2017/5/9 8:48, Casey Leedom wrote: > > | From: Alexander Duyck > | Date: Saturday, May 6, 2017 11:07 AM > | > | | From: Ding Tianhong > | | Date: Fri, May 5, 2017 at 8:08 PM > | | > | | According the suggestion, I could only think of

[PATCH net] tcp: avoid fragmenting peculiar skbs in SACK

2017-05-10 Thread Yuchung Cheng
This patch fixes a bug in splitting an SKB during SACK processing. Specifically if an skb contains multiple packets and is only partially sacked in the higher sequences, tcp_match_sack_to_skb() splits the skb and marks the second fragment as SACKed. The current code further attempts rounding up

[PATCH net] bpf, arm64: fix faulty emission of map access in tail calls

2017-05-10 Thread Daniel Borkmann
Shubham was recently asking on netdev why in arm64 JIT we don't multiply the index for accessing the tail call map by 8. That led me into testing out arm64 JIT wrt tail calls and it turned out I got a NULL pointer dereference on the tail call. The buggy access is at: prog = array->ptrs[index];

Re: [PATCH] libertas: Avoid reading past end of buffer

2017-05-10 Thread Joe Perches
On Wed, 2017-05-10 at 12:24 -0700, Kees Cook wrote: > Using memcpy() from a string that is shorter than the length copied means > the destination buffer is being filled with arbitrary data from the kernel > rodata segment. another bit of trivia: > diff --git

Re: [PATCH] libertas: Avoid reading past end of buffer

2017-05-10 Thread Joe Perches
On Wed, 2017-05-10 at 12:24 -0700, Kees Cook wrote: > Using memcpy() from a string that is shorter than the length copied means [] > diff --git a/drivers/net/wireless/marvell/libertas/mesh.c > b/drivers/net/wireless/marvell/libertas/mesh.c [] > @@ -1170,17 +1170,11 @@ int

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Daniel Borkmann
On 05/11/2017 12:46 AM, Jakub Kicinski wrote: On Thu, 11 May 2017 00:24:56 +0200, Daniel Borkmann wrote: I understand the counter argument that from user space perspective it would make things slightly more complicated because there would be two conditions in which driver hook is used: 1)

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Jakub Kicinski
On Thu, 11 May 2017 00:24:56 +0200, Daniel Borkmann wrote: > > I understand the counter argument that from user space perspective it > > would make things slightly more complicated because there would be two > > conditions in which driver hook is used: > > 1) DRV_MODE set on dump; > > 2) flags

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Daniel Borkmann
On 05/10/2017 11:07 PM, Jakub Kicinski wrote: On Wed, 10 May 2017 11:36:22 +0200, Daniel Borkmann wrote: On 05/10/2017 05:18 AM, Jakub Kicinski wrote: On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: [...] xdp = nla_nest_start(skb, IFLA_XDP); if (!xdp)

Re: Requirements for a shutdown function?

2017-05-10 Thread Florian Fainelli
On 05/10/2017 03:11 PM, Timur Tabi wrote: > On 05/10/2017 04:47 PM, Florian Fainelli wrote: >> AFAIR kexec takes care of shutting down network devices explicitly >> (unless instructed otherwise with -x/--no-ifdown) so this may be where >> this is coming from. >> >> Reading through

Re: Requirements for a shutdown function?

2017-05-10 Thread Timur Tabi
On 05/10/2017 04:47 PM, Florian Fainelli wrote: > AFAIR kexec takes care of shutting down network devices explicitly > (unless instructed otherwise with -x/--no-ifdown) so this may be where > this is coming from. > > Reading through drivers/base/core.c it does not appear that ->remove() > is

Re: [PATCH v2 net-next 03/12] drivers: net: xgene: Use rgmii mdio mac access

2017-05-10 Thread Florian Fainelli
On 05/10/2017 01:45 PM, Iyappan Subramanian wrote: > From: Quan Nguyen > > This patch switches to use rgmii mdio mac access routines if available, > as they share the same HW. > > Signed-off-by: Quan Nguyen > Signed-off-by: Iyappan Subramanian

Re: Requirements for a shutdown function?

2017-05-10 Thread Florian Fainelli
On 05/10/2017 01:17 PM, Timur Tabi wrote: > On 05/09/2017 02:06 PM, Florian Fainelli wrote: >> On 05/09/2017 11:51 AM, Timur Tabi wrote: > >>> Is it possible that the network stack detects a kexec and automatically >>> stops all network devices? >> >> No. why would it? However the device driver

[PATCH net-next] ipv6: Implement limits on hop by hop and destination options

2017-05-10 Thread Tom Herbert
RFC 2460 (IPv6) defines hop by hop options and destination options extension headers. Both of these carry a list of TLVs which is only limited by the maximum length of the extension header (2048 bytes). By the spec a host must process all the TLVs in these options, however these could be used as a

Re: Hello

2017-05-10 Thread Rechel Diarra
-- Hello, I have something important to discuss with you as soon as you reply back. Regards. Miss.Rechel

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Jakub Kicinski
On Wed, 10 May 2017 11:36:22 +0200, Daniel Borkmann wrote: > On 05/10/2017 05:18 AM, Jakub Kicinski wrote: > > On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: > >> @@ -6851,6 +6851,32 @@ int dev_change_proto_down(struct net_device *dev, > >> bool proto_down) > >> } > >>

[PATCH v2 net-next 07/12] drivers: net: xgene: Extend ethtool statistics

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds extended ethtool statistics support. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- .../net/ethernet/apm/xgene/xgene_enet_ethtool.c| 89 +-

[PATCH v2 net-next 06/12] drivers: net: xgene: Remove unused macros

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch cleans up unused macros to improve readability. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 6 -- 1 file changed, 6 deletions(-)

[PATCH v2 net-next 01/12] drivers: net: xgene: Protect indirect MAC access

2017-05-10 Thread Iyappan Subramanian
This patch, - refactors mac read/write functions - adds lock to protect indirect mac access Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c| 119 +-

[PATCH v2 net-next 00/12] drivers: net: xgene: Add ethtool stats and bug fixes

2017-05-10 Thread Iyappan Subramanian
This patch set, - adds ethtool extended statistics support - addresses errata workarounds - fixes bugs related to statistics Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen --- v2: Address review comments from v1 - Adds lock to

[PATCH v2 net-next 12/12] drivers: net: xgene: Fix redundant prefetch buffer cleanup

2017-05-10 Thread Iyappan Subramanian
Prefetch buffer cleanup code was called twice, causing EDAC to report errors during reboot. [ 1130.972475] xgene-edac 7880.edac: IOB bridge agent (BA) transaction error [ 1130.979584] xgene-edac 7880.edac: IOB BA write response error [ 1130.985648] xgene-edac 7880.edac: IOB BA write

[PATCH v2 net-next 02/12] drivers: net: phy: xgene: Add lock to protect mac access

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch, - refactors mac access routine - adds lock to protect mac indirect access Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/phy/mdio-xgene.c | 74

[PATCH v2 net-next 11/12] drivers: net: xgene: Workaround for HW errata 10GE_10/ENET_15

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds workaround for HW errata 10GE_10 and ENET_15: "HW statistic counters value are duplicated". - RFCS duplicates RALN counter - RFLR duplicates RUND counter - TFCS duplicates TFRG counter - RALN should be intepreted as 0 in 10G mode

[PATCH v2 net-next 08/12] drivers: net: xgene: Add rx_overrun/tx_underrun statistics

2017-05-10 Thread Iyappan Subramanian
This patch adds rx_overrun and tx_underrun ethtool statistic counters. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c | 16 +---

[PATCH v2 net-next 03/12] drivers: net: xgene: Use rgmii mdio mac access

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch switches to use rgmii mdio mac access routines if available, as they share the same HW. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 14

[PATCH v2 net-next 10/12] drivers: net: xgene: Add frame recovered statistics counter for errata 10GE_8/ENET_11

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds statistic counter for frames recovered from HW errata 10GE_8 and ENET_11: "HW reports Length error for valid 64 byte frames with len <46 bytes". Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian

[PATCH v2 net-next 05/12] drivers: net: xgene: Refactor statistics error parsing code

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch fixes the tx error counters and adds more rx error counters. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 6 --

[PATCH v2 net-next 04/12] drivers: net: xgene: Remove redundant local stats

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen Commit 5944701df90d ("net: remove useless memset's in drivers get_stats64") makes the pdata->stats redundant. This patch removes pdata->stats and updates get_stats64() callback accordingly. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan

[PATCH v2 net-next 09/12] drivers: net: xgene: Workaround for HW errata 10GE_4

2017-05-10 Thread Iyappan Subramanian
From: Quan Nguyen This patch adds workaround for HW errata 10GE_4: "XGENET_ICM_ECM_DROP_COUNT_REG_0 reg not clear on read". Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c

Re: Requirements for a shutdown function?

2017-05-10 Thread Timur Tabi
On 05/09/2017 02:06 PM, Florian Fainelli wrote: > On 05/09/2017 11:51 AM, Timur Tabi wrote: >> Is it possible that the network stack detects a kexec and automatically >> stops all network devices? > > No. why would it? However the device driver model does call into your > driver's remove

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-10 Thread Julian Anastasov
Hello, On Wed, 10 May 2017, Cong Wang wrote: > On Wed, May 10, 2017 at 12:38 AM, Julian Anastasov wrote: > > > > During NETDEV_UNREGISTER packets for dev should not > > be flying but packets for other devs can walk the nexthops > > for multipath routes. It is the

[PATCH] net-procfs: Adjust buffer output in dev_mc_seq_show()

2017-05-10 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 10 May 2017 21:17:43 +0200 * Use a special format string specification for the desired output of the array "addr" into a sequence. This issue was detected by using the Coccinelle software. * Delete the local variable "i" and a

[PATCH] libertas: Avoid reading past end of buffer

2017-05-10 Thread Kees Cook
Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, redefine the stat strings to be ETH_GSTRING_LEN sizes, like other drivers. This lets us use a single memcpy that does not

[PATCH 4/5] bpf: Add bpf_verify_program() to the library.

2017-05-10 Thread David Miller
This allows a test case to load a BPF program and unconditionally acquire the verifier log. It also allows specification of the strict alignment flag. Signed-off-by: David S. Miller --- tools/lib/bpf/bpf.c | 22 ++ tools/lib/bpf/bpf.h | 4 2

[PATCH 5/5] bpf: Add verifier test case for alignment.

2017-05-10 Thread David Miller
Signed-off-by: David S. Miller --- tools/testing/selftests/bpf/Makefile | 3 +- tools/testing/selftests/bpf/test_align.c | 417 +++ 2 files changed, 419 insertions(+), 1 deletion(-) create mode 100644

[PATCH 3/5] bpf: Add strict alignment flag for BPF_PROG_LOAD.

2017-05-10 Thread David Miller
Add a new field, "prog_flags", and an initial flag value BPF_F_STRCIT_ALIGNMENT. When set, the verifier will enforce strict pointer alignment regardless of the setting of CONFIG_EFFICIENT_UNALIGNED_ACCESS. The verifier, in this mode, will also use a fixed value of "2" in place of NET_IP_ALIGN.

[PATCH 2/5] bpf: Do per-instruction state dumping in verifier when log_level > 1.

2017-05-10 Thread David Miller
If log_level > 1, do a state dump every instruction and emit it in a more compact way (without a leading newline). This will facilitate more sophisticated test cases which inspect the verifier log for register state. Signed-off-by: David S. Miller ---

[PATCH 1/5] bpf: Track alignment of register values in the verifier.

2017-05-10 Thread David Miller
Currently if we add only constant values to pointers we can fully validate the alignment, and properly check if we need to reject the program on CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS architectures. However, once an unknown value is introduced we only allow byte sized memory accesses which is

[PATCH 0/5] bpf: Add alignment tracker to verifier.

2017-05-10 Thread David Miller
This is the whole series, more details in the individual commit messages. First we add the alignment tracking logic to the verifier. Next, we work on building up infrastructure to facilitate regression testing of this facility. Finally, we add the "test_align" test case. Signed-off-by: David

Re: [PATCH] libertas: Avoid reading past end of buffer

2017-05-10 Thread Kees Cook
On Tue, May 9, 2017 at 9:33 PM, Joe Perches wrote: > On Tue, 2017-05-09 at 16:23 -0700, Kees Cook wrote: >> Using memcpy() from a string that is shorter than the length copied means >> the destination buffer is being filled with arbitrary data from the kernel >> rodata segment.

Re: [PATCH] wcn36xx: Close SMD channel on device removal

2017-05-10 Thread Bjorn Andersson
On Wed 10 May 00:27 PDT 2017, Arend van Spriel wrote: > On 5/10/2017 1:03 AM, Bjorn Andersson wrote: > > On Mon 08 May 23:17 PDT 2017, Kalle Valo wrote: > > > > > Bjorn Andersson writes: > > > > > > > The SMD channel is not the primary WCNSS channel and must

[PATCH] net: ethernet: ti: netcp_core: return error while dma channel open issue

2017-05-10 Thread Ivan Khoronzhuk
Fix error path while dma open channel issue. Also, no need to check output on NULL if it's never returned. Signed-off-by: Ivan Khoronzhuk --- Based on net-next drivers/net/ethernet/ti/netcp_core.c | 6 -- drivers/soc/ti/knav_dma.c| 2 +- 2 files

[PATCH net 2/4] s390/qeth: unbreak OSM and OSN support

2017-05-10 Thread Julian Wiedmann
commit b4d72c08b358 ("qeth: bridgeport support - basic control") broke the support for OSM and OSN devices as follows: As OSM and OSN are L2 only, qeth_core_probe_device() does an early setup by loading the l2 discipline and calling qeth_l2_probe_device(). In this context, adding the l2-specific

[PATCH net 3/4] s390/qeth: avoid null pointer dereference on OSN

2017-05-10 Thread Julian Wiedmann
Access card->dev only after checking whether's its valid. Signed-off-by: Julian Wiedmann Reviewed-by: Ursula Braun --- drivers/s390/net/qeth_l2_main.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH net 0/4] s390/net fixes

2017-05-10 Thread Julian Wiedmann
Hello Dave, some qeth fixes for -net, the OSM/OSN one being the most crucial. Please also queue these up for stable. Thanks, Julian Julian Wiedmann (2): s390/qeth: unbreak OSM and OSN support s390/qeth: avoid null pointer dereference on OSN Ursula Braun (2): s390/qeth: handle sysfs error

[PATCH net 1/4] s390/qeth: handle sysfs error during initialization

2017-05-10 Thread Julian Wiedmann
From: Ursula Braun When setting up the device from within the layer discipline's probe routine, creating the layer-specific sysfs attributes can fail. Report this error back to the caller, and handle it by releasing the layer discipline. Signed-off-by: Ursula Braun

[PATCH net 4/4] s390/qeth: add missing hash table initializations

2017-05-10 Thread Julian Wiedmann
From: Ursula Braun commit 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") added new hash tables, but missed to initialize them. Fixes: 5f78e29ceebf ("qeth: optimize IP handling in rx_mode callback") Signed-off-by: Ursula Braun

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-10 Thread Cong Wang
On Wed, May 10, 2017 at 12:38 AM, Julian Anastasov wrote: > > Hello, > > On Tue, 9 May 2017, Cong Wang wrote: > >> > Also setting nexthop_nh->nh_dev to NULL looks quite dangerous >> > >> > We have plenty of sites doing : >> > >> > if (fi->fib_dev) >> > x =

Re: [PATCH net 2/3] net/mlx4_en: Avoid adding steering rules with invalid ring

2017-05-10 Thread Or Gerlitz
On Tue, May 9, 2017 at 2:45 PM, Tariq Toukan wrote: > From: Talat Batheesh > > Inserting steering rules with illegal ring is an invalid operation, block it. Hi Dave, I realized today that the patch introduced a regression, Tariq will see if to revert

Re: bpf pointer alignment validation

2017-05-10 Thread David Miller
From: Daniel Borkmann Date: Wed, 10 May 2017 18:21:50 +0200 > On 05/10/2017 05:57 PM, David Miller wrote: >> From: Daniel Borkmann >> Date: Wed, 10 May 2017 17:51:50 +0200 >> >>> Would probably be good nevertheless to have this as a flag for >>>

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-10 Thread Cong Wang
On Tue, May 9, 2017 at 4:51 PM, Eric Dumazet wrote: > On Tue, 2017-05-09 at 16:35 -0700, Cong Wang wrote: > >> This statement is only used to ensure we pass the "dead == fi->fib_nhs" >> check right below the inner loop, it is fine to keep it without break since >> fi is

Re: [Patch net] ipv4: restore rt->fi for reference counting

2017-05-10 Thread Cong Wang
On Tue, May 9, 2017 at 4:50 PM, Eric Dumazet wrote: > On Tue, 2017-05-09 at 16:35 -0700, Cong Wang wrote: > >> All of them take RCU read lock, so, as I explained in the code comment, >> they all should be fine because of synchronize_net() on unregister path. >> Do you see

Re: bpf pointer alignment validation

2017-05-10 Thread Daniel Borkmann
On 05/10/2017 05:57 PM, David Miller wrote: From: Daniel Borkmann Date: Wed, 10 May 2017 17:51:50 +0200 Would probably be good nevertheless to have this as a flag for program loads, which gets then passed through to the verifier to explicitly enable strict alignment

Re: bpf pointer alignment validation

2017-05-10 Thread Alexei Starovoitov
On 5/10/17 8:57 AM, David Miller wrote: From: Daniel Borkmann Date: Wed, 10 May 2017 17:51:50 +0200 Would probably be good nevertheless to have this as a flag for program loads, which gets then passed through to the verifier to explicitly enable strict alignment checks.

Re: [net-mellanox] question about potential null pointer dereference

2017-05-10 Thread Gustavo A. R. Silva
Quoting Ido Schimmel : On Wed, May 10, 2017 at 10:36:59AM -0500, Gustavo A. R. Silva wrote: Hello everybody, While looking into Coverity ID 1350941 I ran into the following piece of code at drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:1483: 1483static void

Re: bpf pointer alignment validation

2017-05-10 Thread David Miller
From: Daniel Borkmann Date: Wed, 10 May 2017 17:51:50 +0200 > Would probably be good nevertheless to have this as a flag for > program loads, which gets then passed through to the verifier to > explicitly enable strict alignment checks. > > Might certainly aide developing

Re: [net-mellanox] question about potential null pointer dereference

2017-05-10 Thread Ido Schimmel
On Wed, May 10, 2017 at 10:36:59AM -0500, Gustavo A. R. Silva wrote: > > Hello everybody, > > While looking into Coverity ID 1350941 I ran into the following piece of > code at drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:1483: > > 1483static void

Re: bpf pointer alignment validation

2017-05-10 Thread Daniel Borkmann
On 05/10/2017 05:33 PM, David Miller wrote: From: Alexei Starovoitov Date: Tue, 9 May 2017 22:57:37 -0700 On Tue, May 09, 2017 at 02:32:34PM -0400, David Miller wrote: +static u32 calc_align(u32 imm) +{ + u32 align = 1; + + if (!imm) +

[net-mellanox] question about potential null pointer dereference

2017-05-10 Thread Gustavo A. R. Silva
Hello everybody, While looking into Coverity ID 1350941 I ran into the following piece of code at drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:1483: 1483static void mlxsw_sp_fdb_notify_mac_process(struct mlxsw_sp *mlxsw_sp, 1484char

Re: bpf pointer alignment validation

2017-05-10 Thread David Miller
From: Alexei Starovoitov Date: Tue, 9 May 2017 22:57:37 -0700 > On Tue, May 09, 2017 at 02:32:34PM -0400, David Miller wrote: >> >> +static u32 calc_align(u32 imm) >> +{ >> +u32 align = 1; >> + >> +if (!imm) >> +return 1U << 31; >> + >> +

[PATCH] mdio: mux: Correct mdio_mux_init error path issues

2017-05-10 Thread Jon Mason
There is a potential unnecessary refcount decriment on error path of put_device(>mii_bus->dev), as it is possible to avoid the of_mdio_find_bus() call if mux_bus is specified by the calling function. The same put_device() is not called in the error path if the devm_kzalloc of pb fails. This

Re: [PATCH net-next V4 00/10] vhost_net batch dequeuing

2017-05-10 Thread Michael S. Tsirkin
On Wed, May 10, 2017 at 11:36:12AM +0800, Jason Wang wrote: > This series tries to implement rx batching for vhost-net. This is done > by batching the dequeuing from skb_array which was exported by > underlayer socket and pass the sbk back through msg_control to finish > userspace copying. This is

Re: [PATCH net-next V4 10/10] vhost_net: try batch dequing from skb array

2017-05-10 Thread Michael S. Tsirkin
On Wed, May 10, 2017 at 11:36:22AM +0800, Jason Wang wrote: > We used to dequeue one skb during recvmsg() from skb_array, this could > be inefficient because of the bad cache utilization and spinlock > touching for each packet. This patch tries to batch them by calling > batch dequeuing helpers

[PULL] virtio: fixes, cleanups, performance

2017-05-10 Thread Michael S. Tsirkin
The following changes since commit a351e9b9fc24e982ec2f0e76379a49826036da12: Linux 4.11 (2017-04-30 19:47:48 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to

Re: [PATCH 1/3] ptr_ring: batch ring zeroing

2017-05-10 Thread Michael S. Tsirkin
On Wed, May 10, 2017 at 11:18:13AM +0200, Jesper Dangaard Brouer wrote: > On Tue, 9 May 2017 16:33:14 +0300 > "Michael S. Tsirkin" wrote: > > > On Sat, Apr 08, 2017 at 02:14:08PM +0200, Jesper Dangaard Brouer wrote: > > > On Fri, 7 Apr 2017 08:49:57 +0300 > > > "Michael S.

Re: [PATCH 1/2] net: Added mtu parameter to dev_forward_skb calls

2017-05-10 Thread kbuild test robot
Hi Fredrik, [auto build test ERROR on net/master] [also build test ERROR on v4.11 next-20170510] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Fredrik-Markstrom/net-Added-mtu-parameter

RE: bpf pointer alignment validation

2017-05-10 Thread David Laight
From: Alexei Starovoitov > Sent: 10 May 2017 06:58 > > +static u32 calc_align(u32 imm) > > +{ > > + u32 align = 1; > > + > > + if (!imm) > > + return 1U << 31; > > + > > + while (!(imm & 1)) { > > + imm >>= 1; > > + align <<= 1; > > + } > > + return align; >

Re: iproute2 ss outputs duplicate tcp sockets info on kernel 3.10.105

2017-05-10 Thread Phil Sutter
Hi, Cc'ing Cyrill who wrote the code in question. Maybe he has an idea what's going wrong here. Cheers, Phil On Mon, May 08, 2017 at 06:56:04PM -0700, Li Er wrote: > i'm using v4.11.0 release of iproute2 and kernel 3.10.105, simply > running > > $ ss > Netid State Recv-Q

Re: [PATCH] ip: mpls: fix printing of mpls labels

2017-05-10 Thread Simon Horman
On Mon, May 08, 2017 at 11:04:13PM -0700, David Ahern wrote: > If the kernel returns more labels than iproute2 expects, none of > the labels are printed and (null) is shown instead: > $ ip -f mpls ro ls > 101 as to (null) via inet 172.16.2.2 dev virt12 > 201 as to 202/203 via inet6

Re: DQL and TCQ_F_CAN_BYPASS destroy performance under virtualizaiton (Was: "Re: net_sched strange in 4.11")

2017-05-10 Thread Anton Ivanov
On 10/05/17 09:56, Jason Wang wrote: On 2017年05月10日 13:28, Anton Ivanov wrote: On 10/05/17 03:18, Jason Wang wrote: On 2017年05月09日 23:11, Stefan Hajnoczi wrote: On Tue, May 09, 2017 at 08:46:46AM +0100, Anton Ivanov wrote: I have figured it out. Two issues. 1) skb->xmit_more is hardly

Re: [PATCH net 2/2] xdp: disallow use of native and generic hook at once

2017-05-10 Thread Daniel Borkmann
On 05/10/2017 05:18 AM, Jakub Kicinski wrote: On Wed, 10 May 2017 03:31:31 +0200, Daniel Borkmann wrote: While working on the iproute2 generic XDP frontend, I noticed that as of right now it's possible to have native *and* generic XDP programs loaded both at the same time for the case when a

Re: [PATCH 1/3] ptr_ring: batch ring zeroing

2017-05-10 Thread Jesper Dangaard Brouer
On Tue, 9 May 2017 16:33:14 +0300 "Michael S. Tsirkin" wrote: > On Sat, Apr 08, 2017 at 02:14:08PM +0200, Jesper Dangaard Brouer wrote: > > On Fri, 7 Apr 2017 08:49:57 +0300 > > "Michael S. Tsirkin" wrote: > > > > > A known weakness in ptr_ring design is

[PATCH v5 11/17] net: qualcomm: make qca_7k_common a separate kernel module

2017-05-10 Thread Stefan Wahren
In order to share common functions between QCA7000 SPI and UART protocol driver the qca_7k_common needs to be a separate kernel module. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Kconfig | 8 +++- drivers/net/ethernet/qualcomm/Makefile

[PATCH v5 04/17] net: qualcomm: use net_device_ops instead of direct call

2017-05-10 Thread Stefan Wahren
There is no need to export qcaspi_netdev_open and qcaspi_netdev_close because they are also accessible via the net_device_ops. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_debug.c | 5 +++-- drivers/net/ethernet/qualcomm/qca_spi.c | 4 ++--

[PATCH v5 07/17] net: qualcomm: move qcaspi_tx_cmd to qca_spi.c

2017-05-10 Thread Stefan Wahren
The function qcaspi_tx_cmd() is only called from qca_spi.c. So we better move it there. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.c | 24 drivers/net/ethernet/qualcomm/qca_7k.h | 1 -

[PATCH v5 00/17] net: qualcomm: add QCA7000 UART driver

2017-05-10 Thread Stefan Wahren
The Qualcomm QCA7000 HomePlug GreenPHY supports two interfaces: UART and SPI. This patch series adds the missing support for UART. This driver based on the Qualcomm code [1], but contains some changes: * use random MAC address per default * use net_device_stats from device * share frame decoding

[PATCH v5 10/17] net: qualcomm: prepare frame decoding for UART driver

2017-05-10 Thread Stefan Wahren
Unfortunately the frame format is not exactly identical between SPI and UART. In case of SPI there is an additional HW length at the beginning. So store the initial state to make the decoding state machine more flexible and easy to extend for UART support. Signed-off-by: Stefan Wahren

[PATCH v5 08/17] net: qca_spi: Clarify MODULE_DESCRIPTION

2017-05-10 Thread Stefan Wahren
Since this driver is specific to the QCA7000, we should make the module description more precisely. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v5 13/17] dt-bindings: qca7000: rename binding

2017-05-10 Thread Stefan Wahren
Before we can merge the QCA7000 UART binding the document needs to be renamed. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/net/{qca-qca7000-spi.txt => qca-qca7000.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename

[PATCH v5 12/17] dt-bindings: qca7000-spi: Rework binding

2017-05-10 Thread Stefan Wahren
In preparation for the QCA7000 UART binding rework the binding document. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/net/qca-qca7000-spi.txt| 49 +- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git

[PATCH v5 17/17] net: qualcomm: add QCA7000 UART driver

2017-05-10 Thread Stefan Wahren
This patch adds the Ethernet over UART driver for the Qualcomm QCA7000 HomePlug GreenPHY. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/Kconfig | 16 + drivers/net/ethernet/qualcomm/Makefile| 2 +

[PATCH v5 14/17] dt-bindings: slave-device: add current-speed property

2017-05-10 Thread Stefan Wahren
This adds a new DT property to define the current baud rate of the slave device. Signed-off-by: Stefan Wahren --- Documentation/devicetree/bindings/serial/slave-device.txt | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v5 15/17] dt-bindings: qca7000: append UART interface to binding

2017-05-10 Thread Stefan Wahren
This merges the serdev binding for the QCA7000 UART driver (Ethernet over UART) into the existing document. Signed-off-by: Stefan Wahren --- .../devicetree/bindings/net/qca-qca7000.txt| 32 ++ 1 file changed, 32 insertions(+) diff --git

[PATCH v5 02/17] net: qca_framing: use u16 for frame offset

2017-05-10 Thread Stefan Wahren
It doesn't make sense to use a signed variable for offset here, so fix it up. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_framing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qualcomm/qca_framing.h

[PATCH v5 01/17] net: qualcomm: remove unnecessary includes

2017-05-10 Thread Stefan Wahren
Most of the includes in qca_7k.c are unnecessary so we better remove them. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/qca_7k.c

[PATCH v5 06/17] net: qca_spi: remove QCASPI_MTU

2017-05-10 Thread Stefan Wahren
There is no need for an additional MTU define. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c

Re: DQL and TCQ_F_CAN_BYPASS destroy performance under virtualizaiton (Was: "Re: net_sched strange in 4.11")

2017-05-10 Thread Jason Wang
On 2017年05月10日 13:28, Anton Ivanov wrote: On 10/05/17 03:18, Jason Wang wrote: On 2017年05月09日 23:11, Stefan Hajnoczi wrote: On Tue, May 09, 2017 at 08:46:46AM +0100, Anton Ivanov wrote: I have figured it out. Two issues. 1) skb->xmit_more is hardly ever set under virtualization because

[PATCH v5 05/17] net: qualcomm: Improve readability of length defines

2017-05-10 Thread Stefan Wahren
In order to avoid mixing things up, make the MTU and frame length defines easier to read. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_framing.c | 2 +- drivers/net/ethernet/qualcomm/qca_framing.h | 8

[PATCH v5 09/17] net: qualcomm: rename qca_framing.c to qca_7k_common.c

2017-05-10 Thread Stefan Wahren
As preparation for the upcoming UART driver we need a module which contains common functions for both interfaces. The module qca_framing is a good candidate but renaming to qca_7k_common would make it clear. Signed-off-by: Stefan Wahren ---

[PATCH v5 03/17] net: qca_7k: Use BIT macro

2017-05-10 Thread Stefan Wahren
Use the BIT macro for the CONFIG and INT register values. Signed-off-by: Stefan Wahren --- drivers/net/ethernet/qualcomm/qca_7k.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/qca_7k.h

[PATCH v5 16/17] tty: serdev-ttyport: return actual baudrate from ttyport_set_baudrate

2017-05-10 Thread Stefan Wahren
Instead of returning the requested baudrate, we better return the actual one because it isn't always the same. Signed-off-by: Stefan Wahren Acked-by: Rob Herring --- drivers/tty/serdev/serdev-ttyport.c | 2 +- 1 file changed, 1 insertion(+), 1

RE: [PATCH 1/4] hamradio: Combine two seq_printf() calls into one in yam_seq_show()

2017-05-10 Thread David Laight
From: SF Markus Elfring > Sent: 09 May 2017 15:22 > A bit of data was put into a sequence by two separate function calls. > Print the same data by a single function call instead. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring

  1   2   >