Re: [PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2017-07-13 Thread kbuild test robot
Hi Moritz, [auto build test WARNING on net-next/master] [also build test WARNING on v4.12 next-20170713] [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/Moritz-Fischer/dt-bindings-net-Add

Re: [PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2017-07-13 Thread Moritz Fischer
Hi Andrew, On Thu, Jul 13, 2017 at 6:34 PM, Andrew Lunn wrote: >> > > + /* not sure if this is the correct way of dealing with this ... */ >> > > + ndev->phydev->supported &= ~(SUPPORTED_Autoneg); >> > > + ndev->phydev->advertising = ndev->phydev->supported; >> > > + ndev->phydev->autoneg = AUTON

[PATCHv2 1/1] mlx4_en: remove unnecessary returned value check

2017-07-13 Thread Zhu Yanjun
The function __mlx4_zone_remove_one_entry always returns zero. So it is not necessary to check it. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun Reviewed-by: Yuval Shaia --- Change from v1 to v2: Initialization is moved to variable declaration. drivers/net/ethernet/mellanox/mlx4/allo

[git pull] vfs.git network field-by-field copyin patches

2017-07-13 Thread Al Viro
[My apologies for late pull requests - I hoped to be back to normal connectivity by yesterday evening. Spent the night sitting in Logan instead...] This part of misc.compat queue was held back for review from networking folks and since davem has jus ACKed those... The following changes since com

Re: [RFC] get_compat_msghdr(): get rid of field-by-field copyin

2017-07-13 Thread David Miller
From: Al Viro Date: Fri, 14 Jul 2017 02:37:50 +0100 > On Tue, Jul 11, 2017 at 08:25:14PM -0700, David Miller wrote: > >> looks harmless, or if there is a bug in there I can't see it. >> >> But whatever it is, that same problem could be hiding in some of these >> other transformations as well. >

Re: [PATCH][net-next] svcrdma: fix an incorrect check on -E2BIG and -EINVAL

2017-07-13 Thread J. Bruce Fields
On Thu, Jul 13, 2017 at 01:53:10PM -0400, Chuck Lever wrote: > > > On Jul 13, 2017, at 1:51 PM, Colin King wrote: > > > > From: Colin Ian King > > > > The current check will always be true and will always jump to > > err1, this looks dubious to me. I believe && should be used > > instead of ||

Re: [RFC] get_compat_msghdr(): get rid of field-by-field copyin

2017-07-13 Thread Al Viro
On Tue, Jul 11, 2017 at 08:25:14PM -0700, David Miller wrote: > looks harmless, or if there is a bug in there I can't see it. > > But whatever it is, that same problem could be hiding in some of these > other transformations as well. > > I think the bug might be that we are corrupting the user's

Re: [PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2017-07-13 Thread Andrew Lunn
> > > + /* not sure if this is the correct way of dealing with this ... */ > > > + ndev->phydev->supported &= ~(SUPPORTED_Autoneg); > > > + ndev->phydev->advertising = ndev->phydev->supported; > > > + ndev->phydev->autoneg = AUTONEG_DISABLE; > > > > What are you trying to achieve? > > Basically c

Re: [PATCH v7 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-07-13 Thread Ding Tianhong
On 2017/7/14 5:09, Sinan Kaya wrote: > On 7/13/2017 10:21 AM, Ding Tianhong wrote: >> static void pci_configure_relaxed_ordering(struct pci_dev *dev) >> +{ >> +/* We should not alter the relaxed ordering bit for the VF */ >> +if (dev->is_virtfn) >> +return; >> + >> +/* If

Re: [PATCH net] net: bridge: fix dest lookup when vlan proto doesn't match

2017-07-13 Thread Toshiaki Makita
On 2017/07/13 22:09, Nikolay Aleksandrov wrote: > With 802.1ad support the vlan_ingress code started checking for vlan > protocol mismatch which causes the current tag to be inserted and the > bridge vlan protocol & pvid to be set. The vlan tag insertion changes > the skb mac_header and thus the lo

Re: [PATCH net-next v1 2/3] gtp: Support creating flow-based gtp net_device

2017-07-13 Thread Jiannan Ouyang
Hi Harald, > On 7/13/17, 12:35 AM, "Harald Welte" wrote: > > > +static int gtp_dev_open(struct net_device *dev) > > +{ > > + struct gtp_dev *gtp = netdev_priv(dev); > > + struct net *net = gtp->net; > > + struct socket *sock1u; > > + struct socket *sock0; > > + struct udp_tunnel_sock_c

Re: [PATCH net-next v1 1/3] gtp: refactor to support flow-based gtp encap and decap

2017-07-13 Thread Jiannan Ouyang
Hi Harald, > On 7/13/17, 12:26 AM, "Harald Welte" wrote: >· > > static inline void gtp_set_pktinfo_ipv4(struct gtp_pktinfo *pktinfo, > > struct sock *sk, struct iphdr *iph, > > - struct pdp_ctx *pctx, struct rtable *rt, > > - struct flowi4 *fl4, > > + struct rta

Re: [PATCH 1/2] dt-bindings: net: Add bindings for National Instruments XGE netdev

2017-07-13 Thread Moritz Fischer
Hi Yuan, On Thu, Jul 13, 2017 at 5:33 PM, YUAN Linyu wrote: > > >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] >> On Behalf Of Moritz Fischer >> Sent: Friday, July 14, 2017 5:22 AM >> To: netdev@vger.kernel.org >> Cc: devicet...@vger.kern

RE: [PATCH 1/2] dt-bindings: net: Add bindings for National Instruments XGE netdev

2017-07-13 Thread YUAN Linyu
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Moritz Fischer > Sent: Friday, July 14, 2017 5:22 AM > To: netdev@vger.kernel.org > Cc: devicet...@vger.kernel.org; linux-ker...@vger.kernel.org; > da...@davemloft.net; mark.rutl

Re: [PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2017-07-13 Thread Moritz Fischer
Hi Andrew, thanks for the quick response. On Fri, Jul 14, 2017 at 12:36:36AM +0200, Andrew Lunn wrote: > > +++ b/drivers/net/ethernet/ni/nixge.c > > @@ -0,0 +1,1246 @@ > > +/* > > + * Copyright (c) 2016-2017, National Instruments Corp. > > + * > > + * Network Driver for Ettus Research XGE MAC > >

Re: [PATCH v7 3/3] net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-07-13 Thread Casey Leedom
[[ Sorry for the Double Send: I forgot to switch to Plain Text. Have I mentioned how much I hate modern Web-based email agents? :-) -- Casey ]]   Yeah, I think this works for now.  We'll stumble over what to do when we want to mix upstream TLPs without Relaxed Ordering Attributes directed at

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Joe Stringer
On 13 July 2017 at 15:38, Greg Rose wrote: > On 07/13/2017 11:03 AM, Joe Stringer wrote: >> >> On 13 July 2017 at 11:01, Greg Rose wrote: >>> >>> On 07/13/2017 10:46 AM, Joe Stringer wrote: On 13 July 2017 at 09:25, Greg Rose wrote: > > > When there is an established c

Re: [PATCH net-next v1 0/3] Flow Based GTP Tunneling

2017-07-13 Thread Jiannan Ouyang
Hi Harald and Jeo, Thank you for the code review. They are really helpful! > On 7/13/17, 11:14 AM, "Joe Stringer" wrote: > > On 13 July 2017 at 00:12, Harald Welte wrote: >> I'm not familiar with the details here, but does this imply that you >> are matching on the outer (transport

[PATCH] zd1211rw: fix spelling mistake 'hybernate' -> 'hibernate'

2017-07-13 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in PDEBUG debug message. Signed-off-by: Colin Ian King --- drivers/net/wireless/zydas/zd1211rw/zd_rf_rf2959.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_rf_rf2959.c b/drivers/n

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
On 07/13/2017 11:03 AM, Joe Stringer wrote: On 13 July 2017 at 11:01, Greg Rose wrote: On 07/13/2017 10:46 AM, Joe Stringer wrote: On 13 July 2017 at 09:25, Greg Rose wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which then e

Re: [PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2017-07-13 Thread Andrew Lunn
> +++ b/drivers/net/ethernet/ni/nixge.c > @@ -0,0 +1,1246 @@ > +/* > + * Copyright (c) 2016-2017, National Instruments Corp. > + * > + * Network Driver for Ettus Research XGE MAC > + * > + * This is largely based on the Xilinx AXI Ethernet Driver, > + * and uses the same DMA engine in the FPGA Hi

Re: [PATCH] igb: fix unused igb_deliver_wake_packet() warning when CONFIG_PM=n

2017-07-13 Thread Jeff Kirsher
On Wed, 2017-07-12 at 18:23 -0300, Fabio Estevam wrote: > On Wed, Jul 12, 2017 at 6:09 PM, Dave Hansen > wrote: > > > > From: Dave Hansen > > > > I'm seeing warnings on kernel configurations where CONFIG_PM is > > disabled. It happens in 4.12, at least: > > > > drivers/ethernet/intel/igb/igb_

[PATCH 1/2] dt-bindings: net: Add bindings for National Instruments XGE netdev

2017-07-13 Thread Moritz Fischer
This adds bindings for the NI XGE 1G/10G network device. Signed-off-by: Moritz Fischer --- Documentation/devicetree/bindings/net/nixge.c | 32 +++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nixge.c diff --git a/Documentatio

[PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev

2017-07-13 Thread Moritz Fischer
Add support for the National Instruments XGE 1/10G network device. It uses the EEPROM on the board via NVMEM. Signed-off-by: Moritz Fischer --- drivers/net/ethernet/Kconfig |1 + drivers/net/ethernet/Makefile|1 + drivers/net/ethernet/ni/Kconfig | 26 + drivers/net/ethernet/n

Re: [PATCH v7 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-07-13 Thread Sinan Kaya
On 7/13/2017 10:21 AM, Ding Tianhong wrote: > static void pci_configure_relaxed_ordering(struct pci_dev *dev) > +{ > + /* We should not alter the relaxed ordering bit for the VF */ > + if (dev->is_virtfn) > + return; > + > + /* If the releaxed ordering enable bit is not set,

Re: [PATCH net] mlxsw: spectrum_router: do not drop refcnt on fib rule

2017-07-13 Thread Ido Schimmel
On Thu, Jul 13, 2017 at 02:39:10PM -0600, David Ahern wrote: > On 7/13/17 2:33 PM, Ido Schimmel wrote: > > Remains where? It's not clear to me how you concluded mlxsw is at fault. > > My setup is running net-next with the refcount patches and I didn't > > observe this. > > Create a VRF. BTW, this

Re: [PATCH net] mlxsw: spectrum_router: do not drop refcnt on fib rule

2017-07-13 Thread Ido Schimmel
On Thu, Jul 13, 2017 at 02:39:10PM -0600, David Ahern wrote: > On 7/13/17 2:33 PM, Ido Schimmel wrote: > > Remains where? It's not clear to me how you concluded mlxsw is at fault. > > My setup is running net-next with the refcount patches and I didn't > > observe this. > > Create a VRF. Yea, I wa

[PATCH] [for 4.13] net: qcom/emac: fix double free of SGMII IRQ during shutdown

2017-07-13 Thread Timur Tabi
If the interface is not up, then don't try to close it during a shutdown. This avoids possible double free of the IRQ, which can happen during a shutdown. Fixes: 03eb3eb4d4d5 ("net: qcom/emac: add shutdown function") Signed-off-by: Timur Tabi --- drivers/net/ethernet/qualcomm/emac/emac.c | 10 +

Re: [PATCH] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()

2017-07-13 Thread David Miller
From: Alexander Potapenko Date: Thu, 13 Jul 2017 21:28:39 +0200 > On Thu, Jul 13, 2017 at 8:32 PM, David Miller wrote: >> struct sctp_paramhdr { >> __be16 type; >> __be16 length; >> }; >> >> typedef struct sctp_errhdr { >> __be16 cause; >> __be16 length; >>

Re: [PATCH net] net: set fib rule refcount after malloc

2017-07-13 Thread David Miller
From: David Ahern Date: Thu, 13 Jul 2017 13:36:40 -0700 > The configure callback of fib_rules_ops can change the refcnt of a > fib rule. For instance, mlxsw takes a refcnt when adding the processing > of the rule to a work queue. Thus the rule refcnt can not be reset to > to 1 afterwards. Move th

Re: [PATCH net] mlxsw: spectrum_router: do not drop refcnt on fib rule

2017-07-13 Thread David Ahern
On 7/13/17 2:33 PM, Ido Schimmel wrote: > Remains where? It's not clear to me how you concluded mlxsw is at fault. > My setup is running net-next with the refcount patches and I didn't > observe this. Create a VRF. see latest patch. mlxsw releasing the refcnt on the rule was the victim; eric's pa

[PATCH net] net: set fib rule refcount after malloc

2017-07-13 Thread David Ahern
The configure callback of fib_rules_ops can change the refcnt of a fib rule. For instance, mlxsw takes a refcnt when adding the processing of the rule to a work queue. Thus the rule refcnt can not be reset to to 1 afterwards. Move the refcnt setting to after the allocation. Fixes: 5361e209dd30 ("n

Re: [PATCH net] mlxsw: spectrum_router: do not drop refcnt on fib rule

2017-07-13 Thread Ido Schimmel
On Thu, Jul 13, 2017 at 01:46:15PM -0600, David Ahern wrote: > On 7/13/17 1:11 PM, David Ahern wrote: > > Since mlxsw is not doing a get on the rule to increase the ref count, it > > should not be doing a put. > > upon further review, mlxsw is doing a get on the rule > > Problem remains, but this

Re: [PATCH net] libceph: osdmap: Fix some NULL dereferences

2017-07-13 Thread Dan Carpenter
On Thu, Jul 13, 2017 at 06:13:22PM +0200, Ilya Dryomov wrote: > > Hi Dan, > > I applied osdmap_apply_incremental() hunk and fixed a similar bug in > osdmap_decode() (it's a not NULL deref, that's why smatch didn't catch > it). > No... :/ Smatch complained about it, but I somehow marked it as

Re: [PATCH net] mlxsw: spectrum_router: do not drop refcnt on fib rule

2017-07-13 Thread David Ahern
On 7/13/17 1:11 PM, David Ahern wrote: > Since mlxsw is not doing a get on the rule to increase the ref count, it > should not be doing a put. upon further review, mlxsw is doing a get on the rule Problem remains, but this is not the right fix.

Re: [PATCH] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()

2017-07-13 Thread Alexander Potapenko
On Thu, Jul 13, 2017 at 8:32 PM, David Miller wrote: > From: Alexander Potapenko > Date: Thu, 13 Jul 2017 20:10:34 +0200 > >> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h >> index a9519a06a23b..f13632ee33f0 100644 >> --- a/include/net/sctp/sctp.h >> +++ b/include/net/sctp/sctp.h

[PATCH net] mlxsw: spectrum_router: do not drop refcnt on fib rule

2017-07-13 Thread David Ahern
The recent conversion to refcount_t, 717d1e993ad8 ("net: convert fib_rule.refcnt from atomic_t to refcount_t"), and subsequent fix by Eric, 5361e209dd30 ("net: avoid one splat in fib_nl_delrule()"), exposed a bug in mlxsw. The driver is doing a put on fib rules after processing it from the notifie

[PATCH 3/3] Documentation: devicetree: net: optional idm regs for bgmac

2017-07-13 Thread Abhishek Shah
Specifying IDM register space in DT is not mendatory for SoCs where firmware takes care of IDM operations. This patch updates BGMAC driver's DT binding documentation indicating the same. Signed-off-by: Abhishek Shah Reviewed-by: Ray Jui Reviewed-by: Oza Oza Reviewed-by: Scott Branden --- Docu

[PATCH 2/3] net: ethernet: bgmac: Make IDM register space optional

2017-07-13 Thread Abhishek Shah
IDM operations are usually one time ops and should be done in firmware itself. Driver is not supposed to touch IDM registers. However, for some SoCs', driver is performing IDM read/writes. So this patch masks IDM operations in case firmware is taking care of IDM operations. Signed-off-by: Abhishe

[PATCH 1/3] net: ethernet: bgmac: Remove unnecessary 'return' from platform_bgmac_idm_write

2017-07-13 Thread Abhishek Shah
Return type for idm register write callback should be void as 'writel' API is used for write operation. However, there no need to have 'return' in this function. Signed-off-by: Abhishek Shah Reviewed-by: Oza Oza Reviewed-by: Ray Jui Reviewed-by: Scott Branden --- drivers/net/ethernet/broadcom

[PATCH 0/3] Extend BGMAC driver for Stingray SoC

2017-07-13 Thread Abhishek Shah
The patchset extends Broadcom BGMAC driver for Broadcom Stingray SoC. This patchset is based on Linux-4.12 and tested on NS2 and Stingray. Abhishek Shah (3): net: ethernet: bgmac: Remove unnecessary 'return' from platform_bgmac_idm_write net: ethernet: bgmac: Make IDM register space optio

Re: [PATCH] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()

2017-07-13 Thread David Miller
From: Alexander Potapenko Date: Thu, 13 Jul 2017 20:10:34 +0200 > diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h > index a9519a06a23b..f13632ee33f0 100644 > --- a/include/net/sctp/sctp.h > +++ b/include/net/sctp/sctp.h > @@ -469,6 +469,7 @@ _sctp_walk_params((pos), (chunk), > nto

RE: [PATCH] smsc95xx: use ethtool_op_get_ts_info()

2017-07-13 Thread Woojung.Huh
> -Original Message- > From: Petr Kulhavy [mailto:br...@jikos.cz] > Sent: Thursday, July 13, 2017 1:41 PM > To: steve.glendinn...@shawell.net; UNGLinuxDriver > Cc: netdev@vger.kernel.org; linux-...@vger.kernel.org; Petr Kulhavy > Subject: [PATCH] smsc95xx: use ethtool_op_get_ts_info() > >

Re: [RFC PATCH 00/12] Implement XDP bpf_redirect vairants

2017-07-13 Thread David Miller
From: John Fastabend Date: Thu, 13 Jul 2017 10:00:15 -0700 > On 07/13/2017 09:16 AM, Jesper Dangaard Brouer wrote: >> On Thu, 13 Jul 2017 13:14:30 +0200 >> Jesper Dangaard Brouer wrote: >> >>> I'm still getting crashes (but much harder to provoke), but I figured >>> out why. We sort of missed

Re: [PATCH] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()

2017-07-13 Thread Alexander Potapenko
On Thu, Jul 13, 2017 at 8:14 PM, Alexander Potapenko wrote: > On Thu, Jul 13, 2017 at 8:10 PM, Alexander Potapenko > wrote: >> If the iterator (|pos.p| or |err|) has already reached the end of >> chunk, we shouldn't access iterator->length. >> >> This bug has been detected by KMSAN. For the foll

Re: [PATCH v7 3/3] net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-07-13 Thread Alexander Duyck
On Thu, Jul 13, 2017 at 11:14 AM, Alexander Duyck wrote: > On Thu, Jul 13, 2017 at 7:21 AM, Ding Tianhong > wrote: >> From: Casey Leedom >> >> cxgb4 Ethernet driver now queries PCIe configuration space to determine >> if it can send TLPs to it with the Relaxed Ordering Attribute set. >> >> Remo

Re: [PATCH net-next v1 0/3] Flow Based GTP Tunneling

2017-07-13 Thread Joe Stringer
On 13 July 2017 at 00:12, Harald Welte wrote: > hi Jiannan, > > net-next si closed, as it has been pointed out already by Joe. > > On Wed, Jul 12, 2017 at 05:44:52PM -0700, Jiannan Ouyang wrote: >> ovs-ofctl add-flow br0 >> "in_port=2,tun_src=192.168.60.141,tun_id=123, \ >> actions=set_fie

Re: [PATCH v7 3/3] net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-07-13 Thread Alexander Duyck
On Thu, Jul 13, 2017 at 7:21 AM, Ding Tianhong wrote: > From: Casey Leedom > > cxgb4 Ethernet driver now queries PCIe configuration space to determine > if it can send TLPs to it with the Relaxed Ordering Attribute set. > > Remove the enable_pcie_relaxed_ordering() to avoid enable PCIe Capability

Re: [PATCH] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()

2017-07-13 Thread Alexander Potapenko
On Thu, Jul 13, 2017 at 8:10 PM, Alexander Potapenko wrote: > If the iterator (|pos.p| or |err|) has already reached the end of > chunk, we shouldn't access iterator->length. > > This bug has been detected by KMSAN. For the following pair of system > calls: > > socket(PF_INET6, SOCK_STREAM, 0x84

[PATCH] sctp: don't dereference ptr before leaving _sctp_walk_{params,errors}()

2017-07-13 Thread Alexander Potapenko
If the iterator (|pos.p| or |err|) has already reached the end of chunk, we shouldn't access iterator->length. This bug has been detected by KMSAN. For the following pair of system calls: socket(PF_INET6, SOCK_STREAM, 0x84 /* IPPROTO_??? */) = 3 sendto(3, "A", 1, MSG_OOB, {sa_family=AF_INET6,

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Joe Stringer
On 13 July 2017 at 11:01, Greg Rose wrote: > On 07/13/2017 10:46 AM, Joe Stringer wrote: >> >> On 13 July 2017 at 09:25, Greg Rose wrote: >>> >>> When there is an established connection in direction A->B, it is >>> possible to receive a packet on port B which then executes >>> ct(commit,force) wi

Re: [PATCH net-next v1 2/3] gtp: Support creating flow-based gtp net_device

2017-07-13 Thread Joe Stringer
On 12 July 2017 at 17:44, Jiannan Ouyang wrote: > Add the gtp_create_flow_based_dev() interface to create flow-based gtp > net_device, which sets gtp->collect_md. Under flow-based mode, UDP sockets are > created and maintained in kernel. > > Signed-off-by: Jiannan Ouyang > --- > +static int gt

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
On 07/13/2017 10:46 AM, Joe Stringer wrote: On 13 July 2017 at 09:25, Greg Rose wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct(commit,force) without first performing ct() - ie, a lookup. In this case, we woul

[RFC net 1/2] net: set skb hash for IP6 TCP reset packet

2017-07-13 Thread Shaohua Li
From: Shaohua Li Please see below tcpdump output: 21:00:48.109122 IP6 (flowlabel 0x43304, hlim 64, next-header TCP (6) payload length: 40) fec0::5054:ff:fe12:3456.55804 > fec0::5054:ff:fe12:3456.: Flags [S], cksum 0x0529 (incorrect -> 0xf56c), seq 3282214508, win 43690, options [mss 65476,

[RFC net 0/2] fix ipv6 tcp reset packet flowlabel issues

2017-07-13 Thread Shaohua Li
From: Shaohua Li Please see below tcpdump output: 21:00:48.109122 IP6 (flowlabel 0x43304, hlim 64, next-header TCP (6) payload length: 40) fec0::5054:ff:fe12:3456.55804 > fec0::5054:ff:fe12:3456.: Flags [S], cksum 0x0529 (incorrect -> 0xf56c), seq 3282214508, win 43690, options [mss 65476,

[RFC net 2/2] net: tcp_v6_send_reset should set flowlabel

2017-07-13 Thread Shaohua Li
From: Shaohua Li Currently tcp_v6_send_reset ignores user defined flowlabel, so the reset packet doesn't include the flowlabel info. Signed-off-by: Shaohua Li --- net/ipv6/tcp_ipv6.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/net/ipv6/tcp_ipv6.c b/ne

Re: [PATCH][net-next] svcrdma: fix an incorrect check on -E2BIG and -EINVAL

2017-07-13 Thread Chuck Lever
> On Jul 13, 2017, at 1:51 PM, Colin King wrote: > > From: Colin Ian King > > The current check will always be true and will always jump to > err1, this looks dubious to me. I believe && should be used > instead of ||. > > Detected by CoverityScan, CID#1450120 ("Logically Dead Code") > > Fix

[PATCH][net-next] svcrdma: fix an incorrect check on -E2BIG and -EINVAL

2017-07-13 Thread Colin King
From: Colin Ian King The current check will always be true and will always jump to err1, this looks dubious to me. I believe && should be used instead of ||. Detected by CoverityScan, CID#1450120 ("Logically Dead Code") Fixes: 107c1d0a991a ("svcrdma: Avoid Send Queue overflow") Signed-off-by: C

Re: [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Joe Stringer
On 13 July 2017 at 09:25, Greg Rose wrote: > When there is an established connection in direction A->B, it is > possible to receive a packet on port B which then executes > ct(commit,force) without first performing ct() - ie, a lookup. > In this case, we would expect that this packet can delete th

[PATCH] smsc95xx: use ethtool_op_get_ts_info()

2017-07-13 Thread Petr Kulhavy
This change enables the use of SW timestamping on Raspberry PI. smsc95xx uses the usbnet transmit function usbnet_start_xmit(), which implements software timestamping. However the SOF_TIMESTAMPING_TX_SOFTWARE capability was missing and only SOF_TIMESTAMPING_RX_SOFTWARE was announced. By using etht

Re: [ovs-dev] [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
On 07/13/2017 10:08 AM, Darrell Ball wrote: On 7/13/17, 9:25 AM, "ovs-dev-boun...@openvswitch.org on behalf of Greg Rose" wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct(commit,force) without

[PATCH net 1/1] net sched actions: rename act_get_notify() to tcf_get_notify()

2017-07-13 Thread Roman Mashak
Make name consistent with other TC event notification routines, such as tcf_add_notify() and tcf_del_notify() Signed-off-by: Roman Mashak --- net/sched/act_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index aed6cf2..f2e9e

Re: [ovs-dev] [PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Darrell Ball
On 7/13/17, 9:25 AM, "ovs-dev-boun...@openvswitch.org on behalf of Greg Rose" wrote: When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct(commit,force) without first performing ct() - ie, a lookup. In thi

Re: [RFC PATCH 00/12] Implement XDP bpf_redirect vairants

2017-07-13 Thread John Fastabend
On 07/13/2017 09:16 AM, Jesper Dangaard Brouer wrote: > On Thu, 13 Jul 2017 13:14:30 +0200 > Jesper Dangaard Brouer wrote: > >> I'm still getting crashes (but much harder to provoke), but I figured >> out why. We sort of missed one case, where map_to_flush gets set, when >> the ndo_xdp_xmit() ca

[PATCH net] net/packet: Fix Tx queue selection for AF_PACKET

2017-07-13 Thread Iván Briano
When PACKET_QDISC_BYPASS is not used, Tx queue selection will be done before the packet is enqueued, taking into account any mappings set by a queuing discipline such as mqprio without hardware offloading. This selection may be affected by a previously saved queue_mapping, either on the Rx path, or

Re: [PATCH] net: broadcom: bnx2x: make a couple of const arrays static

2017-07-13 Thread David Miller
From: Colin King Date: Tue, 11 Jul 2017 11:52:23 +0100 > From: Colin Ian King > > Don't populate various tables on the stack but make them static const. > Makes the object code smaller by nearly 200 bytes: > > Before: >text data bss dec hex filename > 113468 1

Re: [PATCH] dccp: make const array error_code static

2017-07-13 Thread David Miller
From: Colin King Date: Thu, 13 Jul 2017 12:22:24 +0100 > From: Colin Ian King > > Don't populate array error_code on the stack but make it static. Makes > the object code smaller by almost 250 bytes: > > Before: >text data bss dec hex filename > 10366 983

Re: [PATCH] net: stmmac: make const array route_possibilities static

2017-07-13 Thread David Miller
From: Colin King Date: Tue, 11 Jul 2017 12:18:48 +0100 > From: Colin Ian King > > Don't populate array route_possibilities on the stack but make it > static const. Makes the object code a little smaller by 85 bytes: > > Before: >text data bss dec hex filename >990

Re: [PATCH] netlink: correctly document nla_put_u64_64bit()

2017-07-13 Thread David Miller
From: Rolf Eike Beer Date: Thu, 13 Jul 2017 16:50:24 +0200 > From 90bda8d1bc2a0c5d283e4e0a4b19812a4cce72bd Mon Sep 17 00:00:00 2001 > From: Rolf Eike Beer > Date: Thu, 13 Jul 2017 16:46:43 +0200 > Subject: [PATCH] netlink: correctly document nla_put_u64_64bit() > > Signed-off-by: Rolf Eike Beer

[PATCH] datapath: Fix for force/commit action failures

2017-07-13 Thread Greg Rose
When there is an established connection in direction A->B, it is possible to receive a packet on port B which then executes ct(commit,force) without first performing ct() - ie, a lookup. In this case, we would expect that this packet can delete the existing entry so that we can commit a connection

Re: [PATCH net] cxgb4: add new T5 pci device id's

2017-07-13 Thread David Miller
From: Ganesh Goudar Date: Thu, 13 Jul 2017 18:45:07 +0530 > Add 0x50a3 and 0x50a4 T5 device id's > > Signed-off-by: Ganesh Goudar Applied.

Re: [PATCH net] xgene: Don't fail probe, if there is no clk resource for SGMII interfaces

2017-07-13 Thread David Miller
From: Thomas Bogendoerfer Date: Thu, 13 Jul 2017 10:57:40 +0200 > From: Thomas Bogendoerfer > > This change fixes following problem > > [1.827940] xgene-enet: probe of 1f210030.ethernet failed with error -2 > > which leads to a missing ethernet interface (reproducable at least on > Gigaby

Re: [PATCH] bpf: fix return in bpf_skb_adjust_net

2017-07-13 Thread David Miller
From: Kefeng Wang Date: Thu, 13 Jul 2017 14:27:58 +0800 > The bpf_skb_adjust_net() ignores the return value of bpf_skb_net_shrink/grow, > and always return 0, fix it by return 'ret'. > > Signed-off-by: Kefeng Wang Applied, thanks.

Re: [RFC PATCH 00/12] Implement XDP bpf_redirect vairants

2017-07-13 Thread Jesper Dangaard Brouer
On Thu, 13 Jul 2017 13:14:30 +0200 Jesper Dangaard Brouer wrote: > I'm still getting crashes (but much harder to provoke), but I figured > out why. We sort of missed one case, where map_to_flush gets set, when > the ndo_xdp_xmit() call starts to fail, and the ixgbe driver then > forgets to call

Re: [PATCH net] libceph: osdmap: Fix some NULL dereferences

2017-07-13 Thread Ilya Dryomov
On Thu, Jul 13, 2017 at 9:45 AM, Dan Carpenter wrote: > There are hidden gotos in the ceph_decode_* macros. We need to set the > "err" variable on these error paths otherwise we end up returning > ERR_PTR(0) which is NULL. It causes NULL dereferences in the callers. > > Fixes: 278b1d709c6a ("lib

Re: [BUG]: NULL ptr dereference in unix_stream_sendmsg+0x1c1/0x380

2017-07-13 Thread Dmitry Safonov
-next-20170713 #6 [ 60.996706] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 [ 60.997657] task: 880074748c80 task.stack: c9594000 [ 60.998208] RIP: 0010:skb_queue_tail+0x2e/0x50 [ 60.998614] RSP: 0018:c9597cf8 EFLAGS: 000

[BUG]: NULL ptr dereference in xlog_cil_push+0x274/0x430

2017-07-13 Thread Dmitry Safonov
] [ 60.995694] Oops: 0002 [#1] SMP [ 60.996004] CPU: 0 PID: 2053 Comm: unix_sock Not tainted 4.12.0-next-20170713 #6 [ 60.996706] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-20170228_101828-anatol 04/01/2014 [ 60.997657] task: 880074748c80 task.stack: c9594000

[PATCH] netlink: correctly document nla_put_u64_64bit()

2017-07-13 Thread Rolf Eike Beer
>From 90bda8d1bc2a0c5d283e4e0a4b19812a4cce72bd Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Thu, 13 Jul 2017 16:46:43 +0200 Subject: [PATCH] netlink: correctly document nla_put_u64_64bit() Signed-off-by: Rolf Eike Beer --- include/net/netlink.h | 4 ++-- 1 file changed, 2 insertions(+),

Re: sctp refcount bug.

2017-07-13 Thread Dave Jones
On Thu, Jul 13, 2017 at 11:38:34AM -0300, Marcelo Ricardo Leitner wrote: > On Thu, Jul 13, 2017 at 10:36:39AM -0400, Dave Jones wrote: > > Hit this on Linus' current tree. > > > > > > refcount_t: underflow; use-after-free. > > Any tips on how to reproduce this? Only seen it once so far.

Re: sctp refcount bug.

2017-07-13 Thread Marcelo Ricardo Leitner
On Thu, Jul 13, 2017 at 10:36:39AM -0400, Dave Jones wrote: > Hit this on Linus' current tree. > > > refcount_t: underflow; use-after-free. Any tips on how to reproduce this? Marcelo

sctp refcount bug.

2017-07-13 Thread Dave Jones
Hit this on Linus' current tree. refcount_t: underflow; use-after-free. [ cut here ] WARNING: CPU: 2 PID: 14455 at lib/refcount.c:186 refcount_sub_and_test+0x45/0x50 CPU: 2 PID: 14455 Comm: trinity-c46 Tainted: G D 4.12.0-think+ #11 task: 8804fc71b8c0 tas

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

2017-07-13 Thread Ding Tianhong
From: Casey Leedom The new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING indicates that the Relaxed Ordering Attribute should not be used on Transaction Layer Packets destined for the PCIe End Node so flagged. Initially flagged this way are Intel E5-26xx Root Complex Ports which suffer from a Flow Cont

[PATCH v7 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-07-13 Thread Ding Tianhong
The PCIe Device Control Register use the bit 4 to indicate that whether the device is permitted to enable relaxed ordering or not. But relaxed ordering is not safe for some platform which could only use strong write ordering, so devices are allowed (but not required) to enable relaxed ordering bit

[PATCH v7 0/3] Add new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-07-13 Thread Ding Tianhong
Some devices have problems with Transaction Layer Packets with the Relaxed Ordering Attribute set. This patch set adds a new PCIe Device Flag, PCI_DEV_FLAGS_NO_RELAXED_ORDERING, a set of PCI Quirks to catch some known devices with Relaxed Ordering issues, and a use of this new flag by the cxgb4 dr

[PATCH v7 3/3] net/cxgb4: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag

2017-07-13 Thread Ding Tianhong
From: Casey Leedom cxgb4 Ethernet driver now queries PCIe configuration space to determine if it can send TLPs to it with the Relaxed Ordering Attribute set. Remove the enable_pcie_relaxed_ordering() to avoid enable PCIe Capability Device Control[Relaxed Ordering Enable] at probe routine, to mak

Re: [PATCH net 20/20] net/hinic: Add ethtool and stats

2017-07-13 Thread Aviad Krawczyk (A)
Hi Andrew, We will separate the patches when we will resubmit. Aviad On 7/12/2017 6:43 PM, Andrew Lunn wrote: > On Wed, Jul 12, 2017 at 10:17:26PM +0800, Aviad Krawczyk wrote: > > Hi Avaid > >> + >> +static void hinic_tx_timeout(struct net_device *netdev) >> +{ >> +struct hinic_dev *nic_d

[PATCH net] cxgb4: add new T5 pci device id's

2017-07-13 Thread Ganesh Goudar
Add 0x50a3 and 0x50a4 T5 device id's Signed-off-by: Ganesh Goudar --- drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h index 99987d8..a

Re: [PATCH net 01/20] net/hinic: Initialize hw interface

2017-07-13 Thread Aviad Krawczyk (A)
Hi Andrew, Now is the merge window and we need to resubmit. We will fix it when we will resubmit. The version number was used for the ethtool information and module version and will be removed. devm_kzalloc - will be used for the allocation of the memory at initialization. We used pr_ for mess

[PATCH net v2] cxgb4: ptp_clock_register() returns error pointers

2017-07-13 Thread Ganesh Goudar
Check ptp_clock_register() return not only for NULL but also for error pointers, and also nullify adapter->ptp_clock if ptp_clock_register() fails. Fixes: 9c33e4208bce ("cxgb4: Add PTP Hardware Clock (PHC) support") Reported-by: Dan Carpenter Cc: Richard Cochran Signed-off-by: Ganesh Goudar ---

[PATCH net] net: bridge: fix dest lookup when vlan proto doesn't match

2017-07-13 Thread Nikolay Aleksandrov
With 802.1ad support the vlan_ingress code started checking for vlan protocol mismatch which causes the current tag to be inserted and the bridge vlan protocol & pvid to be set. The vlan tag insertion changes the skb mac_header and thus the lookup mac dest pointer which was loaded prior to calling

Re: net-next STATUS page

2017-07-13 Thread Jan Engelhardt
On Thursday 2017-07-13 13:32, Saeed Mahameed wrote: >>> Therefore, in order to avoid any and all confusion I have created this web site: http://vger.kernel.org/~davem/net-next.html > > You will need an image processing algorithm to determine whether it is open or > close, i ha

Re: net-next STATUS page

2017-07-13 Thread Saeed Mahameed
On 7/13/2017 11:56 AM, Jiri Pirko wrote: Tue, Jul 11, 2017 at 08:58:41PM CEST, step...@networkplumber.org wrote: On Tue, 11 Jul 2017 07:24:16 -0700 (PDT) David Miller wrote: It has gotten to the point that even casually walking around Faro, Portugal last week, random German tourists would s

[PATCH] dccp: make const array error_code static

2017-07-13 Thread Colin King
From: Colin Ian King Don't populate array error_code on the stack but make it static. Makes the object code smaller by almost 250 bytes: Before: textdata bss dec hex filename 10366 983 0 113492c55 net/dccp/input.o After: textdata bss dec h

Re: [RFC PATCH 00/12] Implement XDP bpf_redirect vairants

2017-07-13 Thread Jesper Dangaard Brouer
On Tue, 11 Jul 2017 11:26:54 -0700 John Fastabend wrote: > On 07/11/2017 07:23 AM, Jesper Dangaard Brouer wrote: > > On Mon, 10 Jul 2017 17:59:17 -0700 > > John Fastabend wrote: > > > >> On 07/10/2017 11:30 AM, Jesper Dangaard Brouer wrote: > >>> On Sat, 8 Jul 2017 21:06:17 +0200 > >>> Jesp

[PATCH net] net: hns: add acpi function of xge led control

2017-07-13 Thread liujian56
From: LiuJian The current code only support DT method to control xge led. This patch is the implementation of acpi method to control xge led. Signed-off-by: LiuJian Reviewed-by: John Garry Reviewed-by: Yunsheng Lin Reviewed-by: Daode Huang --- drivers/net/ethernet/hisilicon/hns/hns_ae_adapt

[PATCH net] xgene: Don't fail probe, if there is no clk resource for SGMII interfaces

2017-07-13 Thread Thomas Bogendoerfer
From: Thomas Bogendoerfer This change fixes following problem [1.827940] xgene-enet: probe of 1f210030.ethernet failed with error -2 which leads to a missing ethernet interface (reproducable at least on Gigabyte MP30-AR0 and APM Mustang systems). The check for a valid clk resource fails, b

Re: [PATCH] bpf: fix return in bpf_skb_adjust_net

2017-07-13 Thread Daniel Borkmann
On 07/13/2017 08:27 AM, Kefeng Wang wrote: The bpf_skb_adjust_net() ignores the return value of bpf_skb_net_shrink/grow, and always return 0, fix it by return 'ret'. Signed-off-by: Kefeng Wang Sigh, yep of course. Thanks! Acked-by: Daniel Borkmann

Re: net-next STATUS page

2017-07-13 Thread Jiri Pirko
Tue, Jul 11, 2017 at 08:58:41PM CEST, step...@networkplumber.org wrote: >On Tue, 11 Jul 2017 07:24:16 -0700 (PDT) >David Miller wrote: > >> It has gotten to the point that even casually walking around >> Faro, Portugal last week, random German tourists would stop >> me in the street and ask if net

[PATCH net] libceph: osdmap: Fix some NULL dereferences

2017-07-13 Thread Dan Carpenter
There are hidden gotos in the ceph_decode_* macros. We need to set the "err" variable on these error paths otherwise we end up returning ERR_PTR(0) which is NULL. It causes NULL dereferences in the callers. Fixes: 278b1d709c6a ("libceph: ceph_decode_skip_* helpers") Signed-off-by: Dan Carpenter

Re: [PATCH net-next v1 2/3] gtp: Support creating flow-based gtp net_device

2017-07-13 Thread Harald Welte
Hi Jiannan, please keep in mind I have zero clue about OVS, so I cannot really comment on what is customary in that context and what not. However, some general review from the GTP point of view below: On Wed, Jul 12, 2017 at 05:44:54PM -0700, Jiannan Ouyang wrote: > Add the gtp_create_flow_based

  1   2   >