Re: [net-intel-i40e] question about assignment overwrite

2017-05-17 Thread Jeff Kirsher
On Wed, 2017-05-17 at 15:48 -0500, Gustavo A. R. Silva wrote: > While looking into Coverity ID 1408956 I ran into the following > piece   > of code at drivers/net/ethernet/intel/i40e/i40e_main.c:8807: > > 8807    if (pf->hw.mac.type == I40E_MAC_X722) { > 8808    pf->flags |=

Re: [PATCH 0/7] crypto: aesni: provide generic gcm(aes)

2017-05-17 Thread Herbert Xu
On Fri, Apr 28, 2017 at 06:11:55PM +0200, Sabrina Dubroca wrote: > The current aesni AES-GCM implementation only offers support for > rfc4106(gcm(aes)). This makes some things a little bit simpler > (handling of associated data and authentication tag), but it means > that non-IPsec users of

Re: [PATCH 1/2] wcn36xx: Pass used skb to ieee80211_tx_status()

2017-05-17 Thread Bjorn Andersson
On Wed 17 May 06:14 PDT 2017, Johannes Berg wrote: > On Thu, 2017-05-04 at 13:13 +, Kalle Valo wrote: > > > > > > This code intentionally checked if TX status was requested, and > > > > if not then it doesn't go to the effort of building it. > > > > > > > > > > What I'm finding puzzling is

RE: [PATCH net 5/5] qede: Split PF/VF ndos.

2017-05-17 Thread Mintz, Yuval
> > Looking at my alternatives for solving this, I can't see any 'good' > > options - it seems mightily unorthodox to modify net_device_ops, I.e., > > add/remove an NDO function-pointer based on some device property, and > > having multiple ops declared for the sake of a single feature seems > >

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Quan Nguyen
On Thu, May 18, 2017 at 3:26 AM, Andrew Lunn wrote: >> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) >> +{ >> + struct xgene_enet_pdata *pdata = netdev_priv(ndev); >> + int phy_mode = pdata->phy_mode; >> + bool ret; >> + >> + ret = phy_mode ==

Re: [PATCH] net/smc: mark as BROKEN due to remote memory exposure

2017-05-17 Thread Leon Romanovsky
On Wed, May 17, 2017 at 08:07:00PM -0400, Doug Ledford wrote: > On 5/17/2017 6:37 PM, Parav Pandit wrote: > > Hi Doug, > > > > >> It would have been better with AF_INET/AF_INET6 and an option to enable > >> SMC than AF_SMC. The first implementation simply assumes AF_INET in > >> the presence of

[[PATCH v1]] hdlcdrv: fix divide error bug if bitrate is 0

2017-05-17 Thread Firo Yang
The divisor s->par.bitrate will always be 0 until initialized by ndo_open() and hdlcdrv_open(). In order to fix this divide zero error, check whether the netdevice was opened by ndo_open() before performing divide.And we also check the the value of bitrate in case of bad setting of it.

Re: [PATCH] hdlcdrv: fix divide error bug if bitrate is 0

2017-05-17 Thread Firo Yang
On Wed, May 17, 2017 at 06:08:11PM +0200, walter harms wrote: > > >Am 17.05.2017 15:42, schrieb Firo Yang: >> On Wed, May 17, 2017 at 02:59:39PM +0200, walter harms wrote: >>> >>> >>> Am 17.05.2017 14:35, schrieb Firo Yang: The divisor s->par.bitrate will always be 0 until initialized by

Re: [net:master 9/12] net/ipv6/ip6_offload.c:120:7-21: WARNING: Unsigned expression compared with zero: unfrag_ip6hlen < 0 (fwd)

2017-05-17 Thread David Miller
From: Julia Lawall Date: Thu, 18 May 2017 10:01:07 +0800 (SGT) > It may be worth checking on these. The code context is shown in the first > case (line 120). For the others, at least it gives the line numbers. ... >>> net/ipv6/ip6_offload.c:120:7-21: WARNING: Unsigned

Re: [PATCH net] bpf: adjust verifier heuristics

2017-05-17 Thread David Miller
From: Daniel Borkmann Date: Thu, 18 May 2017 03:00:06 +0200 > Current limits with regards to processing program paths do not > really reflect today's needs anymore due to programs becoming > more complex and verifier smarter, keeping track of more data > such as const ALU

Re: [PATCH] ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets

2017-05-17 Thread Peter Dawson
>> This fix addresses two problems in the way the DSCP field is >> formulated on the encapsulating header of IPv6 tunnels. >> This fix addresses Bug 195661. >> https://bugzilla.kernel.org/show_bug.cgi?id=195661 >> >> 1) The IPv6 tunneling code was manipulating the DSCP field of the >>

Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.

2017-05-17 Thread Alexei Starovoitov
On 5/17/17 8:33 AM, Edward Cree wrote: On 17/05/17 15:00, Edward Cree wrote: OTOH the 'track known 1s as well' might work in a nice generic way and cover all bases, I'll have to experiment a bit with that. -Ed So I did some experiments (in Python, script follows) and found that indeed this

[net:master 9/12] net/ipv6/ip6_offload.c:120:7-21: WARNING: Unsigned expression compared with zero: unfrag_ip6hlen < 0 (fwd)

2017-05-17 Thread Julia Lawall
Hello, It may be worth checking on these. The code context is shown in the first case (line 120). For the others, at least it gives the line numbers. julia -- Forwarded message -- Date: Thu, 18 May 2017 09:07:31 +0800 From: kbuild test robot To:

Re: [net-realtek-btcoexist] question about identical code for different branches

2017-05-17 Thread Larry Finger
On 05/17/2017 04:52 PM, Gustavo A. R. Silva wrote: Hello everybody, While looking into Coverity ID 1362263 I ran into the following piece of code at drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1000: 1000void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8

Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.

2017-05-17 Thread Alexei Starovoitov
On 5/17/17 5:16 PM, David Miller wrote: BTW, we track something similar already in reg->imm which tracks how many high order bits are known to be cleared in the register. It is used to avoid potential overflow for packet pointer accesses. I bet we can subsume that into this facility as well.

Re: [PATCH] ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets

2017-05-17 Thread Stephen Hemminger
On Thu, 18 May 2017 01:11:01 + "I-Dawson, Peter A" wrote: > This fix addresses two problems in the way the DSCP field is formulated on the > encapsulating header of IPv6 tunnels. > This fix addresses Bug 195661. >

[PATCH] ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated packets

2017-05-17 Thread I-Dawson, Peter A
This fix addresses two problems in the way the DSCP field is formulated on the encapsulating header of IPv6 tunnels. This fix addresses Bug 195661. https://bugzilla.kernel.org/show_bug.cgi?id=195661 1) The IPv6 tunneling code was manipulating the DSCP field of the encapsulating packet using

[PATCH net] bpf: adjust verifier heuristics

2017-05-17 Thread Daniel Borkmann
Current limits with regards to processing program paths do not really reflect today's needs anymore due to programs becoming more complex and verifier smarter, keeping track of more data such as const ALU operations, alignment tracking, spilling of PTR_TO_MAP_VALUE_ADJ registers, and other

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Yonghong Song
On 5/17/17 4:01 PM, David Miller wrote: From: Daniel Borkmann Date: Thu, 18 May 2017 00:57:04 +0200 On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for

[PATCH v3] net: dsa: b53: Add compatible strings for the Cygnus-family BCM11360.

2017-05-17 Thread Eric Anholt
Cygnus is a small family of SoCs, of which we currently have devicetree for BCM11360 and BCM58300. The 11360's B53 is mostly the same as 58xx, just requiring a tiny bit of setup that was previously missing. Signed-off-by: Eric Anholt Reviewed-by: Florian Fainelli

Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.

2017-05-17 Thread David Miller
From: Edward Cree Date: Wed, 17 May 2017 16:33:27 +0100 > So I did some experiments (in Python, script follows) and found that > indeed this does appear to work, at least for addition and shifts. > The idea is that we have a 0s mask and a 1s mask; for bits that are >

Re: [PATCH 2/6] wl1251: Use request_firmware_prefer_user() for loading NVS calibration data

2017-05-17 Thread Bjorn Andersson
On Wed 17 May 05:53 PDT 2017, Pali Roh?r wrote: > On Wednesday 17 May 2017 14:06:06 Johannes Berg wrote: > > On Tue, 2017-05-16 at 01:13 +0200, Luis R. Rodriguez wrote: > > > > > Now for N900 case there is a similar scenario > > > > > alhtough it has additional requirement to go to user-space due

Re: [PATCH] net/smc: mark as BROKEN due to remote memory exposure

2017-05-17 Thread Doug Ledford
On 5/17/2017 6:37 PM, Parav Pandit wrote: > Hi Doug, > >> It would have been better with AF_INET/AF_INET6 and an option to enable >> SMC than AF_SMC. The first implementation simply assumes AF_INET in >> the presence of AF_SMC. When IPv6 support is added, some sort of >> guessing logic will

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Daniel Borkmann
On 05/18/2017 01:48 AM, Yonghong Song wrote: On 5/17/17 3:57 PM, Daniel Borkmann wrote: On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for tools/testing/selftest/bpf because of some missing

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Yonghong Song
On 5/17/17 3:57 PM, Daniel Borkmann wrote: On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for tools/testing/selftest/bpf because of some missing types: $ make -C

Re: [PATCH 2/2] arp: always override existing neigh entries with gratuitous ARP

2017-05-17 Thread Julian Anastasov
Hello, On Wed, 17 May 2017, Ihar Hrachyshka wrote: > Currently, when arp_accept is 1, we always override existing neigh > entries with incoming gratuitous ARP replies. Otherwise, we override > them only if new replies satisfy _locktime_ conditional (packets arrive > not earlier than

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread David Miller
From: Daniel Borkmann Date: Thu, 18 May 2017 01:15:43 +0200 > Btw, 0day kernel testing bot is from now on running BPF selftests > as well as part of their regression tests. Fengguang confirmed this > today after integrating this. That's great news.

Re: [patch net-next v4 06/10] net: sched: introduce helpers to work with filter chains

2017-05-17 Thread Joe Perches
On Wed, 2017-05-17 at 14:44 +0200, Jiri Pirko wrote: > Wed, May 17, 2017 at 02:39:05PM CEST, j...@mojatatu.com wrote: > > On 17-05-17 08:25 AM, Jiri Pirko wrote: > > > Wed, May 17, 2017 at 02:18:00PM CEST, j...@mojatatu.com wrote: > > > > On 17-05-17 05:07 AM, Jiri Pirko wrote: > > > > > From:

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Daniel Borkmann
On 05/18/2017 01:01 AM, David Miller wrote: From: Daniel Borkmann Date: Thu, 18 May 2017 00:57:04 +0200 On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread David Miller
From: Daniel Borkmann Date: Thu, 18 May 2017 00:57:04 +0200 > On 05/18/2017 12:18 AM, Yonghong Song wrote: >> Commit 0a5539f66133 ("bpf: Provide a linux/types.h override >> for bpf selftests.") caused a build failure for >> tools/testing/selftest/bpf >> because of some

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Daniel Borkmann
On 05/18/2017 12:18 AM, Yonghong Song wrote: Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for tools/testing/selftest/bpf because of some missing types: $ make -C tools/testing/selftests/bpf/ ... In file included from

[PATCH] ip6_tunnel, ip6_gre: fix setting of DSCP on encapsulated

2017-05-17 Thread I-Dawson, Peter A
This fix addresses two problems in the way the DSCP field is formulated on the encapsulating header of IPv6 tunnels. This fix addresses Bug 195661. https://bugzilla.kernel.org/show_bug.cgi?id=195661 1) The IPv6 tunneling code was manipulating the DSCP field of the encapsulating packet using

Re: [PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread David Miller
From: Yonghong Song Date: Wed, 17 May 2017 15:18:05 -0700 > Commit 0a5539f66133 ("bpf: Provide a linux/types.h override > for bpf selftests.") caused a build failure for tools/testing/selftest/bpf > because of some missing types: > $ make -C tools/testing/selftests/bpf/ >

RE: [PATCH] net/smc: mark as BROKEN due to remote memory exposure

2017-05-17 Thread Parav Pandit
Hi Doug, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Doug Ledford > Sent: Wednesday, May 17, 2017 3:38 PM > To: David Miller > Cc: bart.vanass...@sandisk.com; torva...@linux-foundation.org; >

Re: [Patch RFC net-next] net: usb: r8152: Fix rx_bytes/tx_bytes to include FCS

2017-05-17 Thread Florian Fainelli
On 05/17/2017 01:23 PM, Andrew Lunn wrote: > The statistics counters rx_bytes and tx_bytes don't include the > Ethernet Frame Check Sequence. The hardware appears to calculate it on > send, so it is not part of the URB passed to the device, and on > receive it was not being copied into the skb. >

[PATCH] r8152: Mark usb_ocp_read() as __maybe_unused

2017-05-17 Thread Matthias Kaehlcke
The function is not used, but is probably kept around for debugging and symmetry with usb_ocp_write(). Adding the attribute fixes the following clang warning: drivers/net/usb/r8152.c:825:5: error: unused function 'usb_ocp_read' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke

[PATCH] net1080: Mark nc_dump_ttl() as __maybe_unused

2017-05-17 Thread Matthias Kaehlcke
The function is not used, but it looks useful for debugging. Adding the attribute fixes the following clang warning: drivers/net/usb/net1080.c:271:20: error: unused function 'nc_dump_ttl' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke ---

[PATCH net v2] selftests/bpf: fix broken build due to types.h

2017-05-17 Thread Yonghong Song
Commit 0a5539f66133 ("bpf: Provide a linux/types.h override for bpf selftests.") caused a build failure for tools/testing/selftest/bpf because of some missing types: $ make -C tools/testing/selftests/bpf/ ... In file included from

[net-realtek-btcoexist] question about identical code for different branches

2017-05-17 Thread Gustavo A. R. Silva
Hello everybody, While looking into Coverity ID 1362263 I ran into the following piece of code at drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1000: 1000void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num) 1001{ 1002if (BT_COEX_ANT_TYPE_PG ==

[net-intel-i40e] question about assignment overwrite

2017-05-17 Thread Gustavo A. R. Silva
Hello everybody, While looking into Coverity ID 1408956 I ran into the following piece of code at drivers/net/ethernet/intel/i40e/i40e_main.c:8807: 8807if (pf->hw.mac.type == I40E_MAC_X722) { 8808pf->flags |= I40E_FLAG_RSS_AQ_CAPABLE 8809

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Florian Fainelli
On 05/17/2017 02:29 PM, Iyappan Subramanian wrote: > On Wed, May 17, 2017 at 1:26 PM, Andrew Lunn wrote: >>> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) >>> +{ >>> + struct xgene_enet_pdata *pdata = netdev_priv(ndev); >>> + int phy_mode = pdata->phy_mode;

[PATCH 1/2] arp: decompose is_garp logic into a separate function

2017-05-17 Thread Ihar Hrachyshka
The code is quite involving already to earn a separate function for itself. If anything, it helps arp_process readability. Signed-off-by: Ihar Hrachyshka --- net/ipv4/arp.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-) diff

[PATCH 2/2] arp: always override existing neigh entries with gratuitous ARP

2017-05-17 Thread Ihar Hrachyshka
Currently, when arp_accept is 1, we always override existing neigh entries with incoming gratuitous ARP replies. Otherwise, we override them only if new replies satisfy _locktime_ conditional (packets arrive not earlier than _locktime_ seconds since the last update to the neigh entry). The idea

[PATCH 0/2] arp: always override existing neigh entries with gratuitous ARP

2017-05-17 Thread Ihar Hrachyshka
Good day. This patchset is spurred by discussion started at https://patchwork.ozlabs.org/patch/760372/ where we figured that there is no real reason for enforcing override by gratuitous ARP packets only when arp_accept is 1. Same should happen when it's 0 (the default value). The first patch in

[PATCH net-next 5/6] net: bridge: get msgtype from nlmsghdr in mdb ops

2017-05-17 Thread Vivien Didelot
Retrieve the message type from the nlmsghdr structure instead of hardcoding it in both br_mdb_add and br_mdb_del. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 2/6] net: bridge: check multicast bridge only once

2017-05-17 Thread Vivien Didelot
__br_mdb_add and __br_mdb_del both check that the bridge is up and running and that multicast is enabled on it before doing any operation. Since they can be called multiple times by br_mdb_add and br_mdb_del, move the check in their caller functions so that it is done just once. Signed-off-by:

[PATCH net-next 4/6] net: bridge: add __br_mdb_do

2017-05-17 Thread Vivien Didelot
br_mdb_add and br_mdb_del call respectively __br_mdb_add and __br_mdb_del and notify the message type on success. Factorize this in a new __br_mdb_do function which add or delete a br_mdb_entry depending on the message type, then notify it. Note that the dev argument is p->br->dev, so no need to

[PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-17 Thread Vivien Didelot
Be symmetric with br_mdb_add and break if __br_mdb_del returns an error. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index

[PATCH net-next 6/6] net: bridge: add br_mdb_do

2017-05-17 Thread Vivien Didelot
Now that the two functions br_mdb_add and br_mdb_del are identical, keep a single function named br_mdb_do and register it for both RTM_NEWMDB and RTM_DELMDB message types. Signed-off-by: Vivien Didelot --- net/bridge/br_mdb.c | 61

[PATCH net-next 0/6] net: bridge: factorize MDB new and del functions

2017-05-17 Thread Vivien Didelot
The br_mdb.c file implements both br_mdb_add and br_mdb_del functions, to handle respectively the RTM_NEWMDB and RTM_DELMDB message types. But these two functions are really similar. This patch series factorizes them into a single br_mdb_do rtnl_doit_func function to reduce boilerplate and

[PATCH net-next 1/6] net: bridge: pass net_bridge_port to __br_mdb_add

2017-05-17 Thread Vivien Didelot
The __br_mdb_add function uses exactly the same mechanism as its caller br_mdb_add to retrieve the net_bridge_port pointer from br_mdb_entry. Remove it and pass directly the net_bridge_port pointer to __br_mdb_add. Signed-off-by: Vivien Didelot ---

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Iyappan Subramanian
On Wed, May 17, 2017 at 1:26 PM, Andrew Lunn wrote: >> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) >> +{ >> + struct xgene_enet_pdata *pdata = netdev_priv(ndev); >> + int phy_mode = pdata->phy_mode; >> + bool ret; >> + >> + ret = phy_mode ==

Re: [PATCH net-next 1/3] net: dsa: mv88e6xxx: Refactor mv88e6352 SERDES code into an op

2017-05-17 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > static int mv88e6xxx_phy_page_get(struct mv88e6xxx_chip *chip, int phy, u8 > page) > { > - if (!mv88e6xxx_has(chip, MV88E6XXX_FLAG_PHY_PAGE)) > - return -EOPNOTSUPP; > - > return mv88e6xxx_phy_write(chip, phy, PHY_PAGE,

Re: [PATCH net-next V5 0/9] vhost_net rx batch dequeuing

2017-05-17 Thread Michael S. Tsirkin
On Wed, May 17, 2017 at 12:14:36PM +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 2/3] net: dsa: mv88e6xxx: mv88e6390X SERDES support

2017-05-17 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > -static int mv88e6xxx_phy_read(struct mv88e6xxx_chip *chip, int phy, > - int reg, u16 *val) > +int mv88e6xxx_phy_read(struct mv88e6xxx_chip *chip, int phy, > +int reg, u16 *val) > { > int addr

Re: [PATCH net-next 3/3] dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable

2017-05-17 Thread Vivien Didelot
Hi Andrew, Good patchset overall, some comments below. Andrew Lunn writes: > @@ -2168,7 +2165,44 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip > *chip, int port) > /* Default VLAN ID and priority: don't set a default VLAN >* ID, and set the default

Re: [PATCH] net/smc: mark as BROKEN due to remote memory exposure

2017-05-17 Thread Doug Ledford
On Tue, 2017-05-16 at 15:28 -0400, Doug Ledford wrote: > I hadn't realized EXPERIMENTAL was gone.  Which is too bad, because > that's entirely appropriate in this case, and would have had the > desired side effect of keeping it out of any non-cutting edge distros > and warning people of possible

Re: [PATCH net-next 0/6] net: phy: marvell: Checkpatch cleanup

2017-05-17 Thread David Miller
From: Andrew Lunn Date: Wed, 17 May 2017 03:25:58 +0200 > I will be contributing a few new features to the Marvell PHY driver > soon. Start by making the code mostly checkpatch clean. There should > not be any functional changes. Just comments set into the correct > format,

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Andrew Lunn
> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) > +{ > + struct xgene_enet_pdata *pdata = netdev_priv(ndev); > + int phy_mode = pdata->phy_mode; > + bool ret; > + > + ret = phy_mode == PHY_INTERFACE_MODE_RGMII || > + phy_mode == PHY_INTERFACE_MODE_RGMII_ID

[PATCH v2] e1000e: Don't return uninitialized stats

2017-05-17 Thread Benjamin Poirier
Some statistics passed to ethtool are garbage because e1000e_get_stats64() doesn't write them, for example: tx_heartbeat_errors. This leaks kernel memory to userspace and confuses users. Do like ixgbe and use dev_get_stats() which first zeroes out rtnl_link_stats64. Fixes: 5944701df90d ("net:

[Patch RFC net-next] net: usb: r8152: Fix rx_bytes/tx_bytes to include FCS

2017-05-17 Thread Andrew Lunn
The statistics counters rx_bytes and tx_bytes don't include the Ethernet Frame Check Sequence. The hardware appears to calculate it on send, so it is not part of the URB passed to the device, and on receive it was not being copied into the skb. Fix the rx_bytes/tx_bytes counters, and copy the FCS

Re: drivers/net/hamradio: divide error in hdlcdrv_ioctl

2017-05-17 Thread Alan Cox
On Tue, 16 May 2017 17:05:32 +0200 Andrey Konovalov wrote: > Hi, > > I've got the following error report while fuzzing the kernel with syzkaller. > > On commit 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (4.12-rc1). > > A reproducer and .config are attached. This should

[PATCH net-next 1/3] net: dsa: mv88e6xxx: Refactor mv88e6352 SERDES code into an op

2017-05-17 Thread Andrew Lunn
The mv88e6390 family has a different SERDES implementation. Refactor the mv88e6352 code into an ops function, so we can later add the mv88e6390 code. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/Makefile| 1 + drivers/net/dsa/mv88e6xxx/chip.c | 62

Re: [PATCH net-next 00/15] tcp: TCP TS option use 1 ms clock

2017-05-17 Thread David Miller
From: Eric Dumazet Date: Tue, 16 May 2017 13:59:59 -0700 > TCP Timestamps option is defined in RFC 7323 > > Traditionally on linux, it has been tied to the internal > 'jiffy' variable, because it had been a cheap and good enough > generator. > > Unfortunately some distros

[PATCH net-next 2/3] net: dsa: mv88e6xxx: mv88e6390X SERDES support

2017-05-17 Thread Andrew Lunn
The mv88e6390X family has 8 SERDES lanes. These can be used for 2 10Gbps ports, ports 9 or 10. If these ports are used at slower speeds, the SERDES lanes become available for other ports for 1000Base-X. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 28

[PATCH net-next 3/3] dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable

2017-05-17 Thread Andrew Lunn
Implement the port enable/disable callbacks, which enable/disable the SERDES interfaces, if applicable. This should save a bit of power/heat. Signed-off-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 44 1 file changed, 40

[PATCH net-next 0/3] net: dsa: mv88e6xxx: Add basic SERDES support

2017-05-17 Thread Andrew Lunn
Some of the Marvell switches are SERDES interface, which must be powered up before packets can be passed. This is particularly true on the 6390, where the SERDES defaults to down, probably to save power. This series refactors the existing SERDES support for the 6352, and adds 6390 support.

[PATCH] sch_dsmark: Fix uninitialized variable warning.

2017-05-17 Thread David Miller
We still need to initialize err to -EINVAL for the case where 'opt' is NULL in dsmark_init(). Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure") Signed-off-by: David S. Miller --- net/sched/sch_dsmark.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Iyappan Subramanian
This patch addresses the review comment from the previous patch set, by adding a helper function to address all RGMII phy mode variants. Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen --- Review comment reference:

[PATCH net-next 1/3] net: dsa: include dsa.h only once

2017-05-17 Thread Vivien Didelot
The public include/net/dsa.h file is meant for DSA drivers, while all DSA core files share a common private header net/dsa/dsa_priv.h file. Ensure that dsa_priv.h is the only DSA core file to include net/dsa.h, and add a new line to separate absolute and relative headers at the same time.

[PATCH net-next 3/3] net: dsa: use switchdev_obj_dump_cb_t everywhere

2017-05-17 Thread Vivien Didelot
Now that the DSA public header includes switchdev.h, use the provided switchdev_obj_dump_cb_t typedef for the object dump callback. Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 6 +++--- drivers/net/dsa/b53/b53_priv.h | 4 ++--

[PATCH net-next 0/3] net: dsa: headers cleanup

2017-05-17 Thread Vivien Didelot
The DSA core files share a common private header file. Include the DSA public header there instead of independently in each core source file. DSA core and its drivers use switchdev, thus include switchdev.h in the public DSA header. This allows us to get rid of the forward declaration and use

[PATCH net-next 2/3] net: dsa: include switchdev.h only once

2017-05-17 Thread Vivien Didelot
DSA drivers and core use switchdev. Include switchdev.h only once, in the dsa.h public header, so that inclusion in DSA drivers or forward declarations of switchdev structures in not necessary anymore. Signed-off-by: Vivien Didelot ---

Re: nvmet with cxgb4 is broken in v4.12-rc1

2017-05-17 Thread Logan Gunthorpe
On 17/05/17 01:22 PM, Steve Wise wrote: > Hey Logan, this is with 1.16.43.0 firmware? Yes, that's correct. Logan

Re: [patch net-next v4 00/10] net: sched: introduce multichain support for filters

2017-05-17 Thread David Miller
From: Jiri Pirko Date: Wed, 17 May 2017 11:07:53 +0200 > Currently, each classful qdisc holds one chain of filters. > This chain is traversed and each filter could be matched on, which > may lead to execution of list of actions. One of such action > could be "reclassify", which

RE: nvmet with cxgb4 is broken in v4.12-rc1

2017-05-17 Thread Steve Wise
> Hello, > > Another cxgb4 bug report for you. Testing nvmet over our T62100-LP-CR > stopped working in v4.12-rc1. We are seeing two oopses: a general > protection fault in nvmet_rdma_free_rsps and a WQ_MEM_RECLAIM warning. > These occur after a suspect cxgb4 message. Please see the full dmesg

Re: [PATCH net-next 0/2] net: dsa: Sort various lists

2017-05-17 Thread David Miller
From: Andrew Lunn Date: Tue, 16 May 2017 22:40:06 +0200 > As we gain more DSA drivers and tagging protocols, the lists are > getting a bit unruly. Do some sorting. Series applied, thanks Andrew.

Re: [PATCH net 0/2] bnxt_en: DCBX fixes.

2017-05-17 Thread David Miller
From: Michael Chan Date: Tue, 16 May 2017 16:39:42 -0400 > 2 bug fixes for the case where the NIC's firmware DCBX agent is > enabled. With these fixes, we will return the proper information to > lldpad. Series applied, thanks Michael.

Re: [PATCH net] net: fix compile error in skb_orphan_partial()

2017-05-17 Thread David Miller
From: Eric Dumazet Date: Tue, 16 May 2017 13:27:53 -0700 > From: Eric Dumazet > > If CONFIG_INET is not set, net/core/sock.c can not compile : > > net/core/sock.c: In function ‘skb_orphan_partial’: > net/core/sock.c:1810:2: error: implicit

Re: [PATCH net-next] ipv6: Prevent overrun when parsing v6 header options

2017-05-17 Thread David Miller
From: Craig Gallek Date: Tue, 16 May 2017 14:36:23 -0400 > From: Craig Gallek > > The KASAN warning repoted below was discovered with a syzkaller > program. The reproducer is basically: > int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP); > send(s,

Re: [PATCH net-next] liquidio: fix insmod failure when multiple NICs are plugged in

2017-05-17 Thread David Miller
From: Felix Manlunas Date: Tue, 16 May 2017 11:14:50 -0700 > From: Rick Farrington > > When multiple liquidio NICs are plugged in, the first insmod of the PF > driver succeeds. But after an rmmod, a subsequent insmod fails. Reason is

Re: [PATCH net-next] liquidio: fix PF falsely indicating success at setting MAC address of a nonexistent VF

2017-05-17 Thread David Miller
From: Felix Manlunas Date: Tue, 16 May 2017 11:28:00 -0700 > In the function assigned to .ndo_set_vf_mac, check the validity of the > vfidx argument before proceeding to tell the firmware to set the VF MAC > address. > > Signed-off-by: Felix Manlunas

[PATCH net-next v2] net: fix __skb_try_recv_from_queue to return the old behavior

2017-05-17 Thread Andrei Vagin
This function has to return NULL on a error case, because there is a separate error variable. The offset has to be changed only if skb is returned v2: fix udp code to not use an extra variable Cc: Paolo Abeni Cc: Eric Dumazet Cc: David S. Miller

[PATCH net] cxgb4: update latest firmware version supported

2017-05-17 Thread Ganesh Goudar
Change t4fw_version.h to update latest firmware version number to 1.16.43.0. Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4fw_version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: 'iw events' stops receiving events after a while on 4.9 + hacks

2017-05-17 Thread Bastian Bittorf
* Johannes Berg [17.05.2017 20:18]: > On Wed, 2017-05-17 at 12:08 +0200, Bastian Bittorf wrote: > > * Ben Greear [17.05.2017 11:51]: [...] > > > kernels, but when testing on 4.9 overnight, I notice that 'iw > > > events' is not showing any

Re: [PATCH net-next] net: dsa: store CPU port pointer in the tree

2017-05-17 Thread David Miller
From: Vivien Didelot Date: Tue, 16 May 2017 14:10:33 -0400 > A dsa_switch_tree instance holds a dsa_switch pointer and a port index > to identify the switch port to which the CPU is attached. > > Now that the DSA layer has a dsa_port structure to hold this

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-17 Thread David Miller
From: Bjørn Mork Date: Tue, 16 May 2017 20:24:10 +0200 > Jim Baxter writes: > >> The CDC-NCM driver can require large amounts of memory to create >> skb's and this can be a problem when the memory becomes fragmented. >> >> This especially affects embedded

Re: [patch net-next 00/12] mlxsw: Preparations for restructuring

2017-05-17 Thread David Miller
From: Jiri Pirko Date: Tue, 16 May 2017 19:38:23 +0200 > This patchset doesn't introduce any functional changes and merely meant > to make the code base more receptive for upcoming restructuring. > > The first six patches mainly shuffle code in order to reduce the scope of >

BUG: nvmet with cxgb4 is broken in v4.12-rc1

2017-05-17 Thread Logan Gunthorpe
Hello, Another cxgb4 bug report for you. Testing nvmet over our T62100-LP-CR stopped working in v4.12-rc1. We are seeing two oopses: a general protection fault in nvmet_rdma_free_rsps and a WQ_MEM_RECLAIM warning. These occur after a suspect cxgb4 message. Please see the full dmesg log which is

Re: [PATCH net-next 9/9] nfp: eliminate an if statement in calculation of completed frames

2017-05-17 Thread Jakub Kicinski
On Wed, 17 May 2017 11:07:19 +, David Laight wrote: > From: Jakub Kicinski > > Sent: 16 May 2017 01:55 > > Given that our rings are always a power of 2, we can simplify the > > calculation of number of completed TX descriptors by using masking > > instead of if statement based on whether the

Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.

2017-05-17 Thread David Miller
From: Edward Cree Date: Wed, 17 May 2017 18:00:03 +0100 > Did you see the algorithms I posted with two masks? I'll take a look.

Re: [PATCH v3 net-next 4/7] net: add new control message for incoming HW-timestamped packets

2017-05-17 Thread Richard Cochran
On Wed, May 17, 2017 at 10:11:50AM -0400, Soheil Hassas Yeganeh wrote: > On Tue, May 16, 2017 at 8:44 AM, Miroslav Lichvar wrote: > > +/* SCM_TIMESTAMPING_PKTINFO control message */ > > +struct scm_ts_pktinfo { > > + __u32 if_index; > > + __u32 pkt_length; > > +};

Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.

2017-05-17 Thread Edward Cree
On 17/05/17 17:13, David Miller wrote: > Both cases are common in real BPF programs. The offsets really are > necessary. It's funny because initially I tried to implement this > without the auxiliary offset and it simply doesn't work. :-) > > We always have to track when you've seen the offset

[PATCH net-next] net: make struct dst_entry::dev first member

2017-05-17 Thread Alexey Dobriyan
struct dst_entry::dev is used most often. Move it so it can be accessed without imm8 offset on x86_64. add/remove: 0/0 grow/shrink: 9/239 up/down: 52/-413 (-361) function old new delta dst_rcu_free

Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.

2017-05-17 Thread David Miller
From: Edward Cree Date: Wed, 17 May 2017 15:00:04 +0100 > On 16/05/17 23:53, Alexei Starovoitov wrote: >> following this line of thinking it feels that it should be possible >> to get rid of 'aux_off' and 'aux_off_align' and simplify the code. >> I mean we can always do >>

Re: [PATCH v4] bridge: netlink: check vlan_default_pvid range

2017-05-17 Thread Sabrina Dubroca
2017-05-17, 09:29:12 +0200, Tobias Jungel wrote: > Currently it is allowed to set the default pvid of a bridge to a value > above VLAN_VID_MASK (0xfff). This patch adds a check to br_validate and > returns -EINVAL in case the pvid is out of bounds. > > Reproduce by calling: > > [root@test ~]# ip

Re: [PATCH net-next v2 1/7] skbuff: add stub to help computing crc32c on SCTP packets

2017-05-17 Thread David Miller
From: Davide Caratti Date: Tue, 16 May 2017 18:27:45 +0200 > @@ -2243,6 +2243,30 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff > *skb, int offset, > } > EXPORT_SYMBOL(skb_copy_and_csum_bits); > > +static __wsum warn_crc32c_csum_update(const void *buff, int len,

Re: [PATCH] hdlcdrv: fix divide error bug if bitrate is 0

2017-05-17 Thread walter harms
Am 17.05.2017 15:42, schrieb Firo Yang: > On Wed, May 17, 2017 at 02:59:39PM +0200, walter harms wrote: >> >> >> Am 17.05.2017 14:35, schrieb Firo Yang: >>> The divisor s->par.bitrate will always be 0 until initialized by >>> ndo_open() and hdlcdrv_open(). >>> >>> In order to fix this divide

Re: [PATCH net-next] cxgb4: add new T5 pci device id

2017-05-17 Thread David Miller
From: Ganesh Goudar Date: Tue, 16 May 2017 21:39:05 +0530 > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net-next] cxgb4: reduce resource allocation in kdump kernel

2017-05-17 Thread David Miller
From: Ganesh Goudar Date: Tue, 16 May 2017 21:17:42 +0530 > When is_kdump_kernel() is true, reduce memory footprint of > cxgb4 by using a single "Queue Set". > > Signed-off-by: Ganesh Goudar Applied.

  1   2   3   >