[PATCH net v2 0/1] NULL pointer dereference in ipvlan_port_destroy

2017-11-16 Thread Girish Moodalbail
>From code inspection it appeared that there is a possibility where in ipvlan_port_destroy() might be dealing with a port (struct ipvl_port) that has already been destroyed and is therefore already NULL. However, we don't check for NULL and continue to access the fields which results in a kernel pa

[PATCH net v2 1/1] ipvlan: NULL pointer dereference panic in ipvlan_port_destroy

2017-11-16 Thread Girish Moodalbail
When call to register_netdevice() (called from ipvlan_link_new()) fails, we call ipvlan_uninit() (through ndo_uninit()) to destroy the ipvlan port. After returning unsuccessfully from register_netdevice() we go ahead and call ipvlan_port_destroy() again which causes NULL pointer dereference panic.

[PATCH net] route: also update fnhe_genid when updating a route cache

2017-11-16 Thread Xin Long
Now when ip route flush cache and it turn out all fnhe_genid != genid. If a redirect/pmtu icmp packet comes and the old fnhe is found and all it's members but fnhe_genid will be updated. Then next time when it looks up route and tries to rebind this fnhe to the new dst, the fnhe will be flushed du

[PATCH net] route: update fnhe_expires for redirect when the fnhe exists

2017-11-16 Thread Xin Long
Now when creating fnhe for redirect, it sets fnhe_expires for this new route cache. But when updating the exist one, it doesn't do it. It will cause this fnhe never to be expired. Paolo already noticed it before, in Jianlin's test case, it became even worse: When ip route flush cache, the old fnh

[PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian

2017-11-16 Thread Xin Long
rfc6458 demands the send_error in SCTP_SEND_FAILED_EVENT should be in cpu endian, while SCTP_ERROR_INV_STRM is in big endian. This issue is there since very beginning, Eric noticed it by running 'make C=2 M=net/sctp/'. This patch is to convert it before reporting it. Reported-by: Eric Dumazet S

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Nikolay Aleksandrov
On 17/11/17 07:26, Willy Tarreau wrote: > Hi Stephen, > > On Thu, Nov 16, 2017 at 04:27:18PM -0800, Stephen Hemminger wrote: >> On Thu, 16 Nov 2017 21:21:55 +0100 >> Vincent Bernat wrote: >> >>> ? 16 novembre 2017 20:23 +0100, Andrew Lunn  : >>> struct net_bridge_fdb_entry is 40 bytes.

[PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-16 Thread Xin Long
Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. val >= 8 means frag_point can even be less than SCTP_DEFAULT_MINSEGMENT. Then in sctp_datamsg_from_user(), when it's value is greater than cookie echo len an

Re: [PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-16 Thread David Miller
From: yuan linyu Date: Thu, 16 Nov 2017 19:59:48 +0800 > From: yuan linyu > > each netlink attribute have proper process when error happen, > when exit one attribute process, it implies that no error, > so err = 0; is useless. > > assign err = 0; at beginning if all attributes not set. > > v1

Re: [PATCH] sfp: Add support for DWDM SFP modules

2017-11-16 Thread David Miller
From: Jan Kundrát Date: Wed, 15 Nov 2017 12:39:33 +0100 > Without this patch, but with CONFIG_SFP enabled, my NIC won't detect > module unplugging, which is suboptimal. > > I'm using an OEM "Cisco compatible" DWDM fixed-frequency 100Ghz-grid SFP > module. It reports itself as a 0x0b 0x24. Accord

Re: [PATCH] macvlan: verify MTU before lowerdev xmit

2017-11-16 Thread David Miller
From: Daniel Axtens Date: Tue, 14 Nov 2017 21:32:51 +1100 > If a macvlan device which is not in bridge mode receives a packet, > it is sent straight to the lowerdev without checking against the > device's MTU. This also happens for multicast traffic. > > Add an is_skb_forwardable() check against

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Willy Tarreau
Hi Stephen, On Thu, Nov 16, 2017 at 04:27:18PM -0800, Stephen Hemminger wrote: > On Thu, 16 Nov 2017 21:21:55 +0100 > Vincent Bernat wrote: > > > ? 16 novembre 2017 20:23 +0100, Andrew Lunn  : > > > > > struct net_bridge_fdb_entry is 40 bytes. > > > > > > My WiFi access point which is also a 5

Re: [PATCH net 0/5] nfp: flower fixes and typo in ethtool stats name

2017-11-16 Thread David Miller
From: Jakub Kicinski Date: Thu, 16 Nov 2017 17:06:38 -0800 > This set comes from the flower offload team. Series applied, thank you.

Re: [PATCH] virto_net: remove empty file 'virtio_net.'

2017-11-16 Thread David Miller
From: Jason Wang Date: Fri, 17 Nov 2017 10:55:44 +0800 > > > On 2017年11月17日 10:46, Joel Stanley wrote: >> Looks like this was mistakenly added to the tree as part of >> commit 186b3c998c50 ("virtio-net: support XDP_REDIRECT"). >> >> Signed-off-by: Joel Stanley >> --- >> drivers/net/virtio_ne

Re: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2017-11-16 Thread David Miller
Hello, please resubmit all of this KSZ switch work when the net-next tree opens up again as it is currently closed. Thank you.

Re: [PATCH v2 net-next] net: dsa: microchip: Add MIB counter reading support

2017-11-16 Thread Andrew Lunn
On Thu, Nov 16, 2017 at 06:42:50PM -0800, tristram...@microchip.com wrote: > From: Tristram Ha > > Add MIB counter reading support. Hi Tristram Some more details would be good here. > +static void ksz9477_r_mib_pkt(struct ksz_device *dev, int port, u16 addr, > + u64 *

Re: [PATCH] virto_net: remove empty file 'virtio_net.'

2017-11-16 Thread Michael S. Tsirkin
On Fri, Nov 17, 2017 at 01:16:36PM +1030, Joel Stanley wrote: > Looks like this was mistakenly added to the tree as part of > commit 186b3c998c50 ("virtio-net: support XDP_REDIRECT"). > > Signed-off-by: Joel Stanley Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net. | 0 > 1 file ch

Re: [PATCH net-next] dt-bindings: net: dsa: Document additional Microchip KSZ family switches

2017-11-16 Thread Andrew Lunn
> + ksz9477: ksz9477@0 { > + compatible = "microchip,ksz9477"; > + reg = <0>; > > - > spi-max-frequency = <4400>; > - sp

Re: [PATCH v1 net-next 1/7] net: dsa: microchip: Replace license with GPL

2017-11-16 Thread Andrew Lunn
On Thu, Nov 16, 2017 at 06:41:25PM -0800, tristram...@microchip.com wrote: > From: Tristram Ha > > Replace license with GPL. > > Signed-off-by: Tristram Ha > Reviewed-by: Woojung Huh Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v1 net-next 7/7] net: dsa: microchip: Rename ksz_9477_reg.h to ksz9477_reg.h

2017-11-16 Thread Andrew Lunn
On Thu, Nov 16, 2017 at 06:41:31PM -0800, tristram...@microchip.com wrote: > From: Tristram Ha > > Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product > name is always KSZ. > > Signed-off-by: Tristram Ha > Reviewed-by: Woojung Huh Reviewed-by: Andrew Lunn Andrew

Re: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2017-11-16 Thread Andrew Lunn
On Thu, Nov 16, 2017 at 06:41:24PM -0800, tristram...@microchip.com wrote: > From: Tristram Ha > > This series of patches is to modify the original KSZ9477 DSA driver so > that other KSZ switch drivers can be added and use the common code. Hi Tristram http://vger.kernel.org/~davem/net-next.html

Re: [RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-11-16 Thread chetan L
On Thu, Nov 16, 2017 at 8:53 AM, Jesper Dangaard Brouer wrote: > On Wed, 15 Nov 2017 14:21:38 -0800 > chet l wrote: > >> One quick question: >> Any thoughts on SVM support? > > What is SVM ? > Shared Virtual Memory(PCIe based). So going back to one of your mapping examples. The protocol can be A

Re: [PATCH] virto_net: remove empty file 'virtio_net.'

2017-11-16 Thread Jason Wang
On 2017年11月17日 10:46, Joel Stanley wrote: Looks like this was mistakenly added to the tree as part of commit 186b3c998c50 ("virtio-net: support XDP_REDIRECT"). Signed-off-by: Joel Stanley --- drivers/net/virtio_net. | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644

[PATCH] virto_net: remove empty file 'virtio_net.'

2017-11-16 Thread Joel Stanley
Looks like this was mistakenly added to the tree as part of commit 186b3c998c50 ("virtio-net: support XDP_REDIRECT"). Signed-off-by: Joel Stanley --- drivers/net/virtio_net. | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 drivers/net/virtio_net. diff --git a/drivers/net

[PATCH v2 net-next 0/1] net: dsa: microchip: Add Microchip KSZ8795 DSA driver

2017-11-16 Thread Tristram.Ha
From: Tristram Ha This patch requires the previous patches for Microchip KSZ9477 DSA driver. v2 - No new feature is introduced in tag_ksz.c v1 - Return error codes instead of numbers - Add more comments to clarify operation - Use ksz8795 prefix to indicate KSZ8795 specific code - Simplify MIB c

[PATCH v2 net-next] net: dsa: Modify tag_ksz.c so that tail tag code can be used by other KSZ switch drivers

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Modify tag_ksz.c so that tail tag code can be used by other KSZ switch drivers. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- v2 - No new feature is introduced v1 - Switch driver code is not accessed from tag_ksz.c drivers/net/dsa/microchip/Kconfig | 2 +- dri

[PATCH net-next 1/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Add Microchip KSZ8895 DSA driver. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- drivers/net/dsa/microchip/Kconfig | 17 + drivers/net/dsa/microchip/Makefile |2 + drivers/net/dsa/microchip/ksz8895.c | 1276 +++ drive

[PATCH v2 net-next 1/1] net: dsa: microchip: Add Microchip KSZ8795 DSA driver

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Add Microchip KSZ8795 DSA driver. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- drivers/net/dsa/microchip/Kconfig | 17 + drivers/net/dsa/microchip/Makefile |2 + drivers/net/dsa/microchip/ksz8795.c | 1365 +++ drive

[PATCH net-next 0/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver

2017-11-16 Thread Tristram.Ha
From: Tristram Ha This patch requires the previous patch for Microchip KSZ8795 DSA driver. Tristram Ha (1): Add Microchip KSZ8895 DSA driver. drivers/net/dsa/microchip/Kconfig | 17 + drivers/net/dsa/microchip/Makefile |2 + drivers/net/dsa/microchip/ksz8895.c | 1276 +++

[PATCH v2 net-next] net: dsa: microchip: Add MIB counter reading support

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Add MIB counter reading support. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- v2 - Only MIB counter related code in patch v1 - Simplify MIB counter reading code drivers/net/dsa/microchip/ksz9477.c| 121 ++--- drivers/net/dsa/micro

[PATCH v1 net-next 7/7] net: dsa: microchip: Rename ksz_9477_reg.h to ksz9477_reg.h

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product name is always KSZ. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- drivers/net/dsa/microchip/ksz9477.c | 2 +- drivers/net/dsa/microchip/{ksz_9477_reg.h => ksz9477_reg.

[PATCH v1 net-next 5/7] net: dsa: microchip: Break KSZ9477 DSA driver into two files

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Break KSZ9477 DSA driver into two files in preparation to add more KSZ switch drivers. Add common functions in ksz_common.h so that other KSZ switch drivers can access code in ksz_common.c. Add ksz_spi.h for common functions used by KSZ switch SPI drivers. Signed-off-by: Tristr

[PATCH v1 net-next 6/7] net: dsa: microchip: Prepare PHY for proper advertisement

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Prepare PHY for proper advertisement and get link status for the port. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- drivers/net/dsa/microchip/ksz9477.c| 13 + drivers/net/dsa/microchip/ksz_common.c | 20 drivers/net/dsa/microch

[PATCH net-next] dt-bindings: net: dsa: Document additional Microchip KSZ family switches

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Document additional Microchip KSZ family switches. Signed-off-by: Tristram Ha Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli --- Documentation/devicetree/bindings/net/dsa/ksz.txt | 189 -- 1 file changed, 136 insertions(+), 53 deletions(-) diff

[PATCH v1 net-next 4/7] net: dsa: microchip: Rename ksz_spi.c to ksz9477_spi.c

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add more KSZ switch drivers. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/Kconfig

[PATCH v1 net-next 2/7] net: dsa: microchip: Clean up code according to patch check suggestions

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Clean up code according to patch check suggestions. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz_common.c | 8 1 file changed, 4 insertions(+

[PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers

2017-11-16 Thread Tristram.Ha
From: Tristram Ha This series of patches is to modify the original KSZ9477 DSA driver so that other KSZ switch drivers can be added and use the common code. There are several steps to accomplish this achievement. First is to rename some function names with a prefix to indicate chip specific fun

[PATCH v1 net-next 3/7] net: dsa: microchip: Rename some functions with ksz9477 prefix chip specific code from common code.

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Rename some functions with ksz9477 prefix to separate chip specific code from common code. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz_common.c | 118

[PATCH v1 net-next 1/7] net: dsa: microchip: Replace license with GPL

2017-11-16 Thread Tristram.Ha
From: Tristram Ha Replace license with GPL. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh --- drivers/net/dsa/microchip/ksz_9477_reg.h | 23 --- drivers/net/dsa/microchip/ksz_common.c | 23 --- drivers/net/dsa/microchip/ksz_priv.h | 23 +

Re: [PATCH 7.x ubsan fix 3/6] net: sctp, forbid negative length

2017-11-16 Thread Kefeng Wang
sorry, please ignore... On 2017/11/17 10:33, Kefeng Wang wrote: > From: Jiri Slaby > > mainline inclusion > from mainline-4.9 > commit a4b8e71b05c27bae6bad3bdecddbc6b68a3ad8cf > category: bugfix > bugzilla: 3214 > DTS: NA > CVE: NA > > - > > Most o

[PATCH 7.x ubsan fix 3/6] net: sctp, forbid negative length

2017-11-16 Thread Kefeng Wang
From: Jiri Slaby mainline inclusion from mainline-4.9 commit a4b8e71b05c27bae6bad3bdecddbc6b68a3ad8cf category: bugfix bugzilla: 3214 DTS: NA CVE: NA - Most of getsockopt handlers in net/sctp/socket.c check len against sizeof some structure like:

[lkp-robot] [socket] 3bc58b1a49: BUG:using__this_cpu_add()in_preemptible[#]code:krfcommd

2017-11-16 Thread kernel test robot
FYI, we noticed the following commit (built with gcc-6): commit: 3bc58b1a49b4179db035ca1da289abc0f25a4df2 ("socket: Move the socket inuse to namespace.") url: https://github.com/0day-ci/linux/commits/Tonghao-Zhang/socket-Move-the-socket-inuse-to-namespace/20171116-175157 in testcas

[PATCH net 4/5] nfp: register flower reprs for egress dev offload

2017-11-16 Thread Jakub Kicinski
From: John Hurley Register a callback for offloading flows that have a repr as their egress device. The new egdev_register function is added to net-next for the 4.15 release. Signed-off-by: John Hurley Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/main.c| 18 ++

[PATCH net 0/5] nfp: flower fixes and typo in ethtool stats name

2017-11-16 Thread Jakub Kicinski
Hi! This set comes from the flower offload team. From Pieter we have a fix to the semantics of the flag telling FW whether to allocate or free a mask and correction of a typo in name of one of the MAC statistics (reveive -> received, we use past participle to match HW docs). Dirk fixes propagat

[PATCH net 5/5] nfp: remove false positive offloads in flower vxlan

2017-11-16 Thread Jakub Kicinski
From: John Hurley Pass information to the match offload on whether or not the repr is the ingress or egress dev. Only accept tunnel matches if repr is the egress dev. This means rules such as the following are successfully offloaded: tc .. add dev vxlan0 .. enc_dst_port 4789 .. action redirect d

[PATCH net 3/5] nfp: inherit the max_mtu from the PF netdev

2017-11-16 Thread Jakub Kicinski
From: Dirk van der Merwe The PF netdev is used for data transfer for reprs, so reprs inherit the maximum MTU settings of the PF netdev. Fixes: 5de73ee46704 ("nfp: general representor implementation") Signed-off-by: Dirk van der Merwe Reviewed-by: Jakub Kicinski --- drivers/net/ethernet/netron

[PATCH net 1/5] nfp: fix flower offload metadata flag usage

2017-11-16 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Hardware has no notion of new or last mask id, instead it makes use of the message type (i.e. add flow or del flow) in combination with a single bit in metadata flags to determine when to add or delete a mask id. Previously we made use of the new or last flags to in

[PATCH net 2/5] nfp: fix vlan receive MAC statistics typo

2017-11-16 Thread Jakub Kicinski
From: Pieter Jansen van Vuuren Correct typo in vlan receive MAC stats. Previously the MAC statistics reported in ethtool for vlan receive contained a typo resulting in ethtool reporting rx_vlan_reveive_ok instead of rx_vlan_received_ok. Fixes: a5950182c00e ("nfp: map mac_stats and vf_cfg BARs")

Re: [PATCH iproute2 v2] Add "show" subcommand to "ip fou"

2017-11-16 Thread Stephen Hemminger
On Thu, 16 Nov 2017 16:53:22 -0800 Greg Greenway wrote: > Sample output: > > $ sudo ./ip/ip fou add port 111 ipproto 11 > $ sudo ./ip/ip fou add port 222 ipproto 22 -6 > $ ./ip/ip fou show > port 222 ipproto 22 -6 > port 111 ipproto 11 > > Signed-off-by: Greg Greenway Applied, thanks. Sorry f

[PATCH iproute2 v2] Add "show" subcommand to "ip fou"

2017-11-16 Thread Greg Greenway
Sample output: $ sudo ./ip/ip fou add port 111 ipproto 11 $ sudo ./ip/ip fou add port 222 ipproto 22 -6 $ ./ip/ip fou show port 222 ipproto 22 -6 port 111 ipproto 11 Signed-off-by: Greg Greenway --- ip/ipfou.c | 60 1 file changed, 60

iproute2: make ip route list to search by metric too

2017-11-16 Thread Alexander Zubkov
Hello all, Currently routes in the Linux routing table have these "key" fields: prefix, tos, table, metric (as I know). I.e. we cannot have two different routes with the same set of this fields. And "ip route list" command can be provided with all but one of those fields. We cannot pass metric to

Re: [PATCH iproute2] Add "show" subcommand to "ip fou"

2017-11-16 Thread Stephen Hemminger
On Fri, 03 Nov 2017 10:19:22 -0700 Greg Greenway wrote: > On Nov 1, 2017, at 2:03 PM, Stephen Hemminger > wrote: > > > > On Tue, 31 Oct 2017 13:00:47 -0700 > > Greg Greenway wrote: > > > >> + if (tb[FOU_ATTR_AF]) { > >> + family = rta_getattr_u8(tb[FOU_ATTR_AF]); > >> +

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Stephen Hemminger
On Thu, 16 Nov 2017 21:21:55 +0100 Vincent Bernat wrote: > ❦ 16 novembre 2017 20:23 +0100, Andrew Lunn  : > > > struct net_bridge_fdb_entry is 40 bytes. > > > > My WiFi access point which is also a 5 port bridge, currently has 97MB > > free RAM. That is space for about 2.5M FDB entries. So even

Re: [iproute2 1/1] tipc: change family attribute from u32 to u16

2017-11-16 Thread Stephen Hemminger
On Wed, 15 Nov 2017 17:25:44 +0100 Jon Maloy wrote: > commit 28033ae4e0f ("net: netlink: Update attr validation to require > exact length for some types") introduces a stricter control on attributes > of type NLA_U* and NLA_S*. > > Since the tipc tool is sending a family attribute of u32 instead

Re: GRO disabled with IPv4 options

2017-11-16 Thread Tom Herbert
On Thu, Nov 16, 2017 at 1:40 PM, Herbert Xu wrote: > On Thu, Nov 16, 2017 at 04:12:43PM +0100, Cristian Klein wrote: >> >> Does somebody know the rationale for this? Is it because IPv4 >> options are rarely used, hence implementing GRO in that case does >> not pay off or are there some caveats? Sp

Re: GRO disabled with IPv4 options

2017-11-16 Thread Eric Dumazet
On Thu, 2017-11-16 at 16:12 +0100, Cristian Klein wrote: > [CC-ing Herbert Xu, who is to 'git blame' for the code in question. :)] > > Dear all, > > We are working on a research prototype which, among others, adds a new > IPv4 option. During testing we noticed that the packets captured by > tcp

Re: [PATCH v3 2/2] sock: Move the socket inuse to namespace.

2017-11-16 Thread Tonghao Zhang
On Fri, Nov 17, 2017 at 4:20 AM, Cong Wang wrote: > On Wed, Nov 15, 2017 at 7:36 AM, Tonghao Zhang > wrote: >> diff --git a/net/core/sock.c b/net/core/sock.c >> index b899d8669388..f01ed0b41bde 100644 >> --- a/net/core/sock.c >> +++ b/net/core/sock.c >> @@ -145,6 +145,10 @@ >> static DEFINE_MUT

[PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-16 Thread Vasyl Gomonovych
Use kzalloc rather than kmalloc followed by memset with 0 drivers/net/ethernet/qlogic/qed/qed_dcbx.c:1280:13-20: WARNING: kzalloc should be used for dcbx_info, instead of kmalloc/memset Generated by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci Signed-off-by: Vasyl Gomonovych --- drivers/n

Re: GRO disabled with IPv4 options

2017-11-16 Thread Herbert Xu
On Thu, Nov 16, 2017 at 04:12:43PM +0100, Cristian Klein wrote: > > Does somebody know the rationale for this? Is it because IPv4 > options are rarely used, hence implementing GRO in that case does > not pay off or are there some caveats? Specifically would it make Precisely. GRO is about optimis

Re: [PATCH] qed: fix unnecessary call to memset cocci warnings

2017-11-16 Thread Vasyl Gomonovych
Sorry.

Re: [PATCH iproute2] Add "show" subcommand to "ip fou"

2017-11-16 Thread Greg Greenway
> On Nov 3, 2017, at 10:25 AM, Tom Herbert wrote: > > On Fri, Nov 3, 2017 at 10:19 AM, Greg Greenway wrote: >> On Nov 1, 2017, at 2:03 PM, Stephen Hemminger >> wrote: >>> >>> On Tue, 31 Oct 2017 13:00:47 -0700 >>> Greg Greenway wrote: >>> +if (tb[FOU_ATTR_AF]) { +

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Sarah Newman
On 11/16/2017 11:36 AM, Nikolay Aleksandrov wrote: > On 16 November 2017 21:23:25 EET, Andrew Lunn wrote: >>> Linux bridges can also be used in small embedded devices. With no >> limit, >>> the likely result from those devices being attacked is the device >> gets >>> thrown away for being unreliab

Re: linux-next: build warning after merge of the netfilter-next tree

2017-11-16 Thread Stephen Rothwell
Hi Pablo, On Thu, 16 Nov 2017 15:18:00 +0100 Pablo Neira Ayuso wrote: > > The patch is already at davem's tree. It's flying there. Excellent, thanks. -- Cheers, Stephen Rothwell

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Vincent Bernat
❦ 16 novembre 2017 20:23 +0100, Andrew Lunn  : > struct net_bridge_fdb_entry is 40 bytes. > > My WiFi access point which is also a 5 port bridge, currently has 97MB > free RAM. That is space for about 2.5M FDB entries. So even Roopa's > 128K is not really a problem, in terms of memory. I am also

Re: [PATCH v3 2/2] sock: Move the socket inuse to namespace.

2017-11-16 Thread Cong Wang
On Wed, Nov 15, 2017 at 7:36 AM, Tonghao Zhang wrote: > diff --git a/net/core/sock.c b/net/core/sock.c > index b899d8669388..f01ed0b41bde 100644 > --- a/net/core/sock.c > +++ b/net/core/sock.c > @@ -145,6 +145,10 @@ > static DEFINE_MUTEX(proto_list_mutex); > static LIST_HEAD(proto_list); > > +#i

Re: [PATCH] [net-next,v2] ibmvnic: fix dma_mapping_error call

2017-11-16 Thread Desnes Augusto Nunes do Rosário
First of all, I apologize for sending this patch to net-next! Since this is a fix, it should had been sent to the regular net tree, which I'll do now with the proper fixes tag. My mistake! Thanks for understanding and please discard this one. On 11/16/2017 04:33 PM, Desnes Augusto Nunes do Ro

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Nikolay Aleksandrov
On 16 November 2017 21:23:25 EET, Andrew Lunn wrote: >> Linux bridges can also be used in small embedded devices. With no >limit, >> the likely result from those devices being attacked is the device >gets >> thrown away for being unreliable. > >Hi Sarah > >Just to get a gut feeling... > >struct ne

Re: [RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-11-16 Thread chetan L
On Wed, Nov 15, 2017 at 5:44 PM, David Miller wrote: > From: chet l > Date: Wed, 15 Nov 2017 14:34:32 -0800 > >> I have not reviewed the entire patchset but I think if we could add a >> version_hdr and then unionize the fields, it might be easier to add >> SVM support without having to spin v5. I

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Andrew Lunn
> Linux bridges can also be used in small embedded devices. With no limit, > the likely result from those devices being attacked is the device gets > thrown away for being unreliable. Hi Sarah Just to get a gut feeling... struct net_bridge_fdb_entry is 40 bytes. My WiFi access point which is al

Re: [PATCH] [net-next] ibmvnic: This patch fixes the dma_mapping_error call to use the correct dma_addr which is inside the ibmvnic_vpd struct.

2017-11-16 Thread Desnes Augusto Nunes do Rosário
Version 2 of this patch has been already sent with correct styling. On 11/16/2017 04:28 PM, Desnes Augusto Nunes do Rosario wrote: Signed-off-by: Desnes A. Nunes do Rosario --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ne

[PULL] vhost/virtio/qemu: cleanups and fixes

2017-11-16 Thread Michael S. Tsirkin
DMA support in FW CFG had to be pushed out as it caused ltp failures - likely a compatibility issue, and could be a hypervisor bug, but we need to figure it out first. There's still a small chance it'll happen shortly, then I might do another pull request just for that. The following changes since

Re: [PATCH v4] wcn36xx: Set default BTLE coexistence config

2017-11-16 Thread Bjorn Andersson
On Thu 16 Nov 00:01 PST 2017, Ramon Fried wrote: > From: Eyal Ilsar > > If the value for the firmware configuration parameters > BTC_STATIC_LEN_LE_BT and BTC_STATIC_LEN_LE_WLAN are not set the duty > cycle between BT and WLAN is such that if BT (including BLE) is active > WLAN gets 0 bandwidth.

[PATCH] [net-next,v2] ibmvnic: fix dma_mapping_error call

2017-11-16 Thread Desnes Augusto Nunes do Rosario
This patch fixes the dma_mapping_error call to use the correct dma_addr which is inside the ibmvnic_vpd struct. Moreover, it fixes a uninitialized warning for the local dma_addr. Signed-off-by: Desnes A. Nunes do Rosario --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertio

[PATCH] [net-next] ibmvnic: This patch fixes the dma_mapping_error call to use the correct dma_addr which is inside the ibmvnic_vpd struct.

2017-11-16 Thread Desnes Augusto Nunes do Rosario
Signed-off-by: Desnes A. Nunes do Rosario --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 04aaacb..1dc4aef 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c ++

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Sarah Newman
On 11/16/2017 01:58 AM, Willy Tarreau wrote: > Hi Sarah, > > On Thu, Nov 16, 2017 at 01:20:18AM -0800, Sarah Newman wrote: >> I note that anyone who would run up against a too-low limit on the maximum >> number of fdb entries would also be savvy enough to fix it in a matter of >> minutes. > > I d

Re: SRIOV switchdev mode BoF minutes

2017-11-16 Thread Alexander Duyck
On Thu, Nov 16, 2017 at 9:41 AM, Or Gerlitz wrote: > On Wed, Nov 15, 2017 at 1:05 AM, Alexander Duyck > wrote: >> On Tue, Nov 14, 2017 at 1:50 PM, Or Gerlitz wrote: > >>> all dealing with the sriov e-switch as a HW switch which should >>> be programmed >>> by the host stack according to well kno

Re: [PATCH] net/smc: Fix preinitialization of buf_desc in __smc_buf_create()

2017-11-16 Thread Ursula Braun
On 11/16/2017 12:22 PM, Geert Uytterhoeven wrote: > With gcc-4.1.2: > > net/smc/smc_core.c: In function ‘__smc_buf_create’: > net/smc/smc_core.c:567: warning: ‘bufsize’ may be used uninitialized in > this function > > Indeed, if the for-loop is never executed, bufsize is used > uniniti

Re: SRIOV switchdev mode BoF minutes

2017-11-16 Thread Or Gerlitz
On Wed, Nov 15, 2017 at 1:05 AM, Alexander Duyck wrote: > On Tue, Nov 14, 2017 at 1:50 PM, Or Gerlitz wrote: >> all dealing with the sriov e-switch as a HW switch which should >> be programmed >> by the host stack according to well known industry models that apply >> on physical switches, e.g >>

[PATCH] rsi: fix memory leak on buf and usb_reg_buf

2017-11-16 Thread Colin King
From: Colin Ian King In the cases where len is too long, the error return path fails to kfree allocated buffers buf and usb_reg_buf. The simplest fix is to perform the sanity check on len before the allocations to avoid having to do the kfree'ing in the first place. Detected by CoverityScan, CI

[PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-16 Thread Tim Hansen
Add list_next_rcu() for fetching next list in rcu_deference safely. Found with sparse in linux-next tree on tag next-20171116. Signed-off-by: Tim Hansen --- net/netlabel/netlabel_addrlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netlabel/netlabel_addrlist.h

Re: [PATCH] net: bridge: add max_fdb_count

2017-11-16 Thread Stephen Hemminger
On Wed, 15 Nov 2017 22:20:23 -0800 Roopa Prabhu wrote: > On Wed, Nov 15, 2017 at 10:13 PM, Toshiaki Makita > wrote: > > On 2017/11/16 13:54, Sarah Newman wrote: > >> On 11/15/2017 08:05 PM, Toshiaki Makita wrote: > >>> On 2017/11/16 11:25, Andrew Lunn wrote: > > Also what do the vendor

Re: [RFC PATCH 01/14] packet: introduce AF_PACKET V4 userspace API

2017-11-16 Thread Jesper Dangaard Brouer
On Wed, 15 Nov 2017 14:21:38 -0800 chet l wrote: > One quick question: > Any thoughts on SVM support? What is SVM ? -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer

Re: [PATCH v3 3/4] net: nb8800: Move HW init to ndo_open()

2017-11-16 Thread Marc Gonzalez
On 16/11/2017 17:23, Andrew Lunn wrote: > Maybe take a look at your memory barriers. Most accesses using the > _relaxed() version, i.e, no barrier. And then there are specific > barriers when needed. One could be missing. > > As a quick test, drop the _relaxed. Force a barrier with each > access.

Re: [PATCH v3 3/4] net: nb8800: Move HW init to ndo_open()

2017-11-16 Thread Andrew Lunn
> I'm starting to think there is some kind of race condition between > SW and HW handling of descriptors. This might also explain the > out-of-order warnings. Hi Marc Maybe take a look at your memory barriers. Most accesses using the _relaxed() version, i.e, no barrier. And then there are specifi

Re: Broken netlink ABI

2017-11-16 Thread David Ahern
On 11/14/17 1:24 PM, Jon Maloy wrote: > > >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev- >> ow...@vger.kernel.org] On Behalf Of David Ahern >> Sent: Tuesday, November 14, 2017 15:18 >> To: Jon Maloy ; netdev@vger.kernel.org; Jiri >> Pirko >> Cc: David Miller

Re: [RFC PATCH net-next 0/2] Configuring PFC stall prevention via ethtool

2017-11-16 Thread Andrew Lunn
> I don't like adding another ethtool_ops callback tightly tied to the > structures passed via ioctl() but when I started to think what to > suggest as an alternative, I started to wonder if it is really necessary > to add a new ethtool command at all. Couldn't this be handled as > a tunable? I ag

Re: [RFC PATCH net-next 0/2] Configuring PFC stall prevention via ethtool

2017-11-16 Thread Andrew Lunn
On Thu, Nov 16, 2017 at 11:17:36AM +0200, Eran Ben Elisha wrote: > On Thu, Nov 16, 2017 at 4:44 AM, Andrew Lunn wrote: > >> What do other vendors support? Time? Number of pause frames sent? > > > > So i checked a few Marvell Switches. You can also specify a time. It > > is a little bit more comple

GRO disabled with IPv4 options

2017-11-16 Thread Cristian Klein
[CC-ing Herbert Xu, who is to 'git blame' for the code in question. :)] Dear all, We are working on a research prototype which, among others, adds a new IPv4 option. During testing we noticed that the packets captured by tcpdump shrank from 10s of KBs to the MTU, which indicates that Generic

Re: linux-next: build warning after merge of the netfilter-next tree

2017-11-16 Thread Pablo Neira Ayuso
On Thu, Nov 16, 2017 at 09:46:17AM +1100, Stephen Rothwell wrote: > Hi Pablo, > > On Thu, 9 Nov 2017 00:40:14 +0100 Pablo Neira Ayuso > wrote: > > > > On Wed, Nov 08, 2017 at 07:00:52PM +1100, Stephen Rothwell wrote: > > > > > > On Tue, 7 Nov 2017 11:02:48 +1100 Stephen Rothwell > > > wrote:

Re: [PATCH net] net/sctp: Always set scope_id in sctp_inet6_skb_msgname

2017-11-16 Thread David Miller
From: ebied...@xmission.com (Eric W. Biederman) Date: Wed, 15 Nov 2017 22:17:48 -0600 > > Alexandar Potapenko while testing the kernel with KMSAN and syzkaller > discovered that in some configurations sctp would leak 4 bytes of > kernel stack. > > Working with his reproducer I discovered that th

Re: [PATCH] fealnx: Fix building error on MIPS

2017-11-16 Thread David Miller
From: Huacai Chen Date: Thu, 16 Nov 2017 11:07:15 +0800 > This patch try to fix the building error on MIPS. The reason is MIPS > has already defined the LONG macro, which conflicts with the LONG enum > in drivers/net/ethernet/fealnx.c. > > Cc: sta...@vger.kernel.org > Signed-off-by: Huacai Chen

Re: [PATCH net-next] driver: ipvlan: Add new func ipvlan_is_valid_dev instead of duplicated codes

2017-11-16 Thread David Miller
From: gfree.w...@vip.163.com Date: Thu, 16 Nov 2017 09:11:23 +0800 > From: Gao Feng > > There are multiple duplicated condition checks in the current codes, so > I add the new func ipvlan_is_valid_dev instead of the duplicated codes to > check if the netdev is real ipvlan dev. > > Signed-off-by

Re: pull request (net): ipsec 2017-11-16

2017-11-16 Thread David Miller
From: Steffen Klassert Date: Thu, 16 Nov 2017 11:00:38 +0100 > 1) Copy policy family in clone_policy, otherwise this can >trigger a BUG_ON in af_key. From Herbert Xu. > > 2) Revert "xfrm: Fix stack-out-of-bounds read in xfrm_state_find." >This added a regression with transport mode when

Re: [PATCH 00/12] isdn: hisax: Fix pnp_irq's error checking

2017-11-16 Thread David Miller
From: Arvind Yadav Date: Thu, 16 Nov 2017 09:57:17 +0530 > The pnp_irq() function returns -1 if an error occurs. > pnp_irq() error checking for zero is not correct. I can't say I like all of the mixing of "-1", and unsigned integer values (pnp_irq() returns resource_size_t, the IsdnCard->para[]

Re: [RFC PATCH 06/17] net: sched: explicit locking in gso_cpu fallback

2017-11-16 Thread John Fastabend
On 11/15/2017 09:51 AM, Willem de Bruijn wrote: > On Wed, Nov 15, 2017 at 10:11 AM, John Fastabend > wrote: >> On 11/14/2017 04:41 PM, Willem de Bruijn wrote: /* use instead of qdisc->dequeue() for all qdiscs queried with ->peek() */ static inline struct sk_buff *qdisc_dequeue_peeked(s

Re: [RFC PATCH net-next 0/2] Configuring PFC stall prevention via ethtool

2017-11-16 Thread Michal Kubecek
On Thu, Nov 16, 2017 at 02:03:21PM +0200, Eran Ben Elisha wrote: > On Thu, Nov 16, 2017 at 10:44 AM, Michal Kubecek wrote: > > > > I don't like adding another ethtool_ops callback tightly tied to the > > structures passed via ioctl() but when I started to think what to > > suggest as an alternativ

Re: [PATCH 29/31] MAINTAINERS: Add nds32

2017-11-16 Thread Greentime Hu
2017-11-14 23:39 GMT+08:00 Joe Perches : > On Thu, 2017-11-09 at 11:36 +0100, Arnd Bergmann wrote: >> On Thu, Nov 9, 2017 at 10:46 AM, Greentime Hu wrote: >> > 2017-11-08 21:31 GMT+08:00 Rob Herring : >> > > On Tue, Nov 7, 2017 at 11:55 PM, Greentime Hu wrote: >> > > > From: Greentime Hu >> > >

Re: [PATCH v3 3/4] net: nb8800: Move HW init to ndo_open()

2017-11-16 Thread Marc Gonzalez
On 15/11/2017 17:15, Marc Gonzalez wrote: > Given the out-of-order datagrams, I'm wondering if it's possible > for the DMA engine to overwrite a not-yet-read descriptor? > > The EOC flag should stop the DMA engine though... > > Maybe some kind of race... > > I don't think I've been able to trig

Re: [RFC PATCH net-next 0/2] Configuring PFC stall prevention via ethtool

2017-11-16 Thread Eran Ben Elisha
On Thu, Nov 16, 2017 at 10:44 AM, Michal Kubecek wrote: > On Wed, Nov 15, 2017 at 09:00:09PM +0200, Eran Ben Elisha wrote: >> From: Inbar Karmy >> >> This RFC adds support for configuring PFC stall prevention through ethtool. >> >> In the event where the device unexpectedly becomes unresponsive f

[PATCH net-next v3] net: assign err to 0 at begin in do_setlink() function

2017-11-16 Thread yuan linyu
From: yuan linyu each netlink attribute have proper process when error happen, when exit one attribute process, it implies that no error, so err = 0; is useless. assign err = 0; at beginning if all attributes not set. v1 -> v2: fix review comment from David, clear err before nla

Re: [PATCH] net/smc: Fix preinitialization of buf_desc in __smc_buf_create()

2017-11-16 Thread Arnd Bergmann
On Thu, Nov 16, 2017 at 12:22 PM, Geert Uytterhoeven wrote: > With gcc-4.1.2: > > net/smc/smc_core.c: In function ‘__smc_buf_create’: > net/smc/smc_core.c:567: warning: ‘bufsize’ may be used uninitialized in > this function > > Indeed, if the for-loop is never executed, bufsize is used >

  1   2   >