Re: [PATH v3 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread David Miller
From: yuan linyu Date: Sat, 11 Feb 2017 11:41:17 +0800 > From: yuan linyu > > 'max' only used at three places in scm.c, > 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; > 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) > 3. in scm_fp_dup(),

Re: [RFC][PATCH] nfsd: add +1 to reference counting scheme for struct nfsd4_session

2017-02-10 Thread David Windsor
> Signed-off-by: David Windsor > --- > fs/nfsd/nfs4state.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c > index a0dee8a..b0f3010 100644 > --- a/fs/nfsd/nfs4state.c > +++ b/fs/nfsd/nfs4state.c > @@

[RFC][PATCH] nfsd: add +1 to reference counting scheme for struct nfsd4_session

2017-02-10 Thread David Windsor
In furtherance of the KSPP effort to add overflow protection to kernel reference counters, a new type (refcount_t) and API have been created. Part of the refcount_t API is refcount_inc(), which will not increment a refcount_t variable if its value is 0 (as this would indicate a possible

[PATCH net-next] vxlan: remove vni zero check and drop for COLLECT_METADATA

2017-02-10 Thread Roopa Prabhu
From: Roopa Prabhu This patch drops the vni zero check for COLLECT_METADATA mode. It is not really needed, vni zero is a valid vni. Fixes: 3ad7a4b141eb ("vxlan: support fdb and learning in COLLECT_METADATA mode" Reported-by: Joe Stringer Signed-off-by:

Re: [PATCH net-next v2 2/5] vxlan: support fdb and learning in COLLECT_METADATA mode

2017-02-10 Thread Roopa Prabhu
On 2/10/17, 8:05 PM, Joe Stringer wrote: > On 31 January 2017 at 22:59, Roopa Prabhu wrote: >> @@ -1289,7 +1331,12 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff >> *skb) >> if (!vs) >> goto drop; >> >> - vxlan =

[PATCH v2 net] bpf: introduce BPF_F_ALLOW_OVERRIDE flag

2017-02-10 Thread Alexei Starovoitov
If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command to the given cgroup the descendent cgroup will be able to override effective bpf program that was inherited from this cgroup. By default it's not passed, therefore override is disallowed. Examples: 1. prog X attached to /A with

Re: [PATCH net-next v2 2/5] vxlan: support fdb and learning in COLLECT_METADATA mode

2017-02-10 Thread Joe Stringer
On 31 January 2017 at 22:59, Roopa Prabhu wrote: > @@ -1289,7 +1331,12 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff > *skb) > if (!vs) > goto drop; > > - vxlan = vxlan_vs_find_vni(vs, vxlan_vni(vxlan_hdr(skb)->vx_vni)); > +

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-02-10 Thread yuan linyu
On 四, 2017-01-19 at 02:01 +0100, Andrew Lunn wrote: > > > > I will add two ethtool command in kernel to read and write register in PHY.  > Write access will get NACKed by me. Read only please. some register need to write some value first then read. if read only, it will not achieve the goal. > >

[PATH v3 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
From: yuan linyu 'max' only used at three places in scm.c, 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) 3. in scm_fp_dup(), new_fpl->max = new_fpl->count; at place 3, the worst case is new_fpl->count =

[PATCH 3/7] staging: r8712u: Fix macros used to read/write the TX/RX descriptors

2017-02-10 Thread Larry Finger
Although the driver works on big-endian hardware, Sparse generates a lot of warnings. Many of these are the result of incorrect coding of these macros. Signed-off-by: Larry Finger --- drivers/staging/rtl8712/wifi.h | 109 - 1

[PATCH 7/7] staging: r8712u: Fix Sparse warnings in rtl871x_mlme.c

2017-02-10 Thread Larry Finger
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_mlme.c drivers/staging/rtl8712/rtl871x_mlme.c:1653:46: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_mlme.c:1653:46:expected unsigned int [unsigned] [usertype] DSConfig

[PATCH 1/7] staging: rtl8712: Fix some Sparse endian messages

2017-02-10 Thread Larry Finger
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl8712_xmit.c drivers/staging/rtl8712/rtl8712_xmit.c:564:42: warning: cast from restricted __le32 drivers/staging/rtl8712/rtl8712_xmit.c:569:42: warning: cast from restricted __le32 drivers/staging/rtl8712/rtl8712_xmit.c:571:42:

[PATCH 2/7] staging: rtl8712u: Fix endian settings for structs describing network packets

2017-02-10 Thread Larry Finger
The headers describing a number of network packets do not have the correct endian settings for several types of data. Signed-off-by: Larry Finger --- drivers/staging/rtl8712/ieee80211.h | 84 ++--- 1 file changed, 42 insertions(+), 42

[PATCH 4/7] staging: r8712u: Fix Sparse warning in rtl871x_xmit.c

2017-02-10 Thread Larry Finger
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_xmit.c drivers/staging/rtl8712/rtl871x_xmit.c:350:44: warning: restricted __le32 degrades to integer drivers/staging/rtl8712/rtl871x_xmit.c:491:23: warning: incorrect type in initializer (different base types)

[PATCH 5/7] staging: r8712u: Fix Sparse endian warning in rtl871x_recv.c

2017-02-10 Thread Larry Finger
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_recv.c drivers/staging/rtl8712/rtl871x_recv.c:657:21: warning: incorrect type in assignment (different base types) drivers/staging/rtl8712/rtl871x_recv.c:657:21:expected unsigned short [unsigned] [assigned] [usertype]

[PATCH 0/7] Fix Sparse endian warnings in r8712u

2017-02-10 Thread Larry Finger
Now that endian checking is an automatic part of Sparse, it is advisable to fix these warnings under controlled conditions, which include testing on big-endian hardware. This set of patches fix all the issues. Signed-off-by: Larry Finger Larry Finger (7): staging:

[PATCH 6/7] staging: r8712u: Fix Sparse warnings in rtl871x_ioctl_linux.c

2017-02-10 Thread Larry Finger
Sparse reports the following: CHECK drivers/staging/rtl8712/rtl871x_ioctl_linux.c drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1422:46: warning: restricted __le16 degrades to integer drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1424:46: warning: restricted __le16 degrades to integer

Re: [PATH v2 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
hi, yes, my misunderstanding. it's error when use after dup. can we do a full size(SCM_MAX_FD) dup?   On 六, 2017-02-11 at 10:36 +0800, yuan linyu wrote: > From: yuan linyu > > 'max' only used at three places in scm.c, > 1. in scm_fp_copy(), fpl->max =

[PATH v2 net-next] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
From: yuan linyu 'max' only used at three places in scm.c, 1. in scm_fp_copy(), fpl->max = SCM_MAX_FD; 2. in scm_fp_copy(), if (fpl->count + num > fpl->max) 3. in scm_fp_dup(), new_fpl->max = new_fpl->count; at place 2, fpl->max can be replaced with SCM_MAX_FD.

Re: [RFC PATCH net] bpf: introduce BPF_F_ALLOW_OVERRIDE flag

2017-02-10 Thread Alexei Starovoitov
On 2/10/17 1:38 PM, Andy Lutomirski wrote: On Thu, Feb 9, 2017 at 10:59 AM, Alexei Starovoitov wrote: If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command to the given cgroup the descendent cgroup will be able to override effective bpf program that was inherited from

Re: [PATCH] net: remove member 'max' of struct scm_fp_list

2017-02-10 Thread yuan linyu
On 五, 2017-02-10 at 10:25 -0500, David Miller wrote: > From: yuan linyu > Date: Fri, 10 Feb 2017 20:11:13 +0800 > > > From: yuan linyu > >  > > SCM_MAX_FD can fully replace it. > >  > > Signed-off-by: yuan linyu

[PATCH] net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed

2017-02-10 Thread Ivan Khoronzhuk
If skb_padto failed the skb has been dropped already, so it was consumed, but it doesn't mean it was sent, thus no need to update queue tx time, etc. So, return NET_XMIT_DROP as more appropriate. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master

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

2017-02-10 Thread Brian Norris
Hi, On Tue, Jan 24, 2017 at 12:07:50PM +0800, Jeffy Chen wrote: > It looks like cmtp_session has same pattern as the issue reported in > old rfcomm: > > while (1) { > set_current_state(TASK_INTERRUPTIBLE); > if (condition) > break; >

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

2017-02-10 Thread Brian Norris
Hi, On Tue, Jan 24, 2017 at 12:07:49PM +0800, Jeffy Chen wrote: > It looks like bnep_session has same pattern as the issue reported in > old rfcomm: > > while (1) { > set_current_state(TASK_INTERRUPTIBLE); > if (condition) > break; >

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

2017-02-10 Thread Brian Norris
Hi Jeffy, I'm really not an expert on bluetooth or HIDP, but I can't bring myself to say that this is correct. I still think you have a problem. On Tue, Jan 24, 2017 at 12:07:51PM +0800, Jeffy Chen wrote: > It looks like hidp_session_thread has same pattern as the issue reported in > old rfcomm:

Re: [PATCH] net: ethernet: ti: netcp_core: return netdev_tx_t in xmit

2017-02-10 Thread Ivan Khoronzhuk
On Fri, Feb 10, 2017 at 02:45:21PM -0500, David Miller wrote: > From: Ivan Khoronzhuk > Date: Thu, 9 Feb 2017 16:24:14 +0200 > > > @@ -1300,7 +1301,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, > > struct net_device *ndev) > >

Re: net: hix5hd2_gmac uninitialized net_device

2017-02-10 Thread Marty Plummer
On Fri, Feb 10, 2017 at 06:21:35PM +0800, Dongpo Li wrote: > I think the error "No irq resource" happened for some other reason, has no > relation with > the info "(unnamed net_device) (uninitialized):". > You can add more debug info to find bug. Do you have any particular suggestions as to what

Re: [PATCH v3 net-next 4/9] sunvnet: add driver stats for ethtool support

2017-02-10 Thread Stephen Hemminger
On Fri, 10 Feb 2017 09:38:20 -0800 Shannon Nelson wrote: > +static void vsw_get_ethtool_stats(struct net_device *dev, > + struct ethtool_stats *estats, u64 *data) > +{ > + int i = 0; > + > + data[i++] = dev->stats.rx_packets; > +

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

2017-02-10 Thread Sainath Grandhi
Tap character devices can be implemented on other virtual interfaces like ipvlan, similar to macvtap. Source code for tap functionality in macvtap can be re-used for this purpose. This patch series splits macvtap source into two modules, macvtap and tap. This patch series also includes a patch

Re: [PATCH 0/2] net: ethernet: ti: cpsw: fix susp/resume

2017-02-10 Thread Ivan Khoronzhuk
On Fri, Feb 10, 2017 at 12:05:07PM -0600, Grygorii Strashko wrote: > > > On 02/09/2017 07:45 PM, David Miller wrote: > >From: Ivan Khoronzhuk > >Date: Fri, 10 Feb 2017 00:54:24 +0200 > > > >>On Thu, Feb 09, 2017 at 05:21:26PM -0500, David Miller wrote: > >>>From:

[PATCHv6 1/7] tap: Refactoring macvtap.c

2017-02-10 Thread Sainath Grandhi
macvtap module has code for tap/queue management and link management. This patch splits the code into macvtap_main.c for link management and tap.c for tap/queue management. Functionality in tap.c can be re-used for implementing tap on other virtual interfaces. Signed-off-by: Sainath Grandhi

[PATCHv6 2/7] tap: Renaming tap related APIs, data structures, macros

2017-02-10 Thread Sainath Grandhi
Renaming tap related APIs, data structures and macros in tap.c from macvtap_.* to tap_.* Signed-off-by: Sainath Grandhi --- drivers/net/macvtap_main.c | 18 +-- drivers/net/tap.c | 332 ++--- drivers/vhost/net.c

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

2017-02-10 Thread Grandhi, Sainath
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Thursday, February 09, 2017 2:08 PM > To: Grandhi, Sainath > Cc: netdev@vger.kernel.org; mah...@bandewar.net; linux- > ker...@vger.kernel.org > Subject: Re: [PATCHv5 0/7] Refactor

[PATCHv6 4/7] tap: Abstract type of virtual interface from tap implementation

2017-02-10 Thread Sainath Grandhi
macvlan object is re-structured to hold tap related elements in a separate entity, tap_dev. Upon NETDEV_REGISTER device_event, tap_dev is registered with idr and fetched again on tap_open. Few of the tap functions are modified to accepted tap_dev as argument. tap_dev object includes callbacks to

[PATCHv6 7/7] ipvtap: IP-VLAN based tap driver

2017-02-10 Thread Sainath Grandhi
This patch adds a tap character device driver that is based on the IP-VLAN network interface, called ipvtap. An ipvtap device can be created in the same way as an ipvlan device, using 'type ipvtap', and then accessed using the tap user space interface. Signed-off-by: Sainath Grandhi

[PATCHv6 5/7] tap: Extending tap device create/destroy APIs

2017-02-10 Thread Sainath Grandhi
Extending tap APIs get/free_minor and create/destroy_cdev to handle more than one type of virtual interface. Signed-off-by: Sainath Grandhi --- drivers/net/macvtap_main.c | 6 +-- drivers/net/tap.c | 118 +

[PATCHv6 6/7] tap: tap as an independent module

2017-02-10 Thread Sainath Grandhi
This patch makes tap a separate module for other types of virtual interfaces, for example, ipvlan to use. Signed-off-by: Sainath Grandhi --- drivers/net/Kconfig | 7 +++ drivers/net/Makefile | 3 +--

[PATCHv6 3/7] tap: Tap character device creation/destroy API

2017-02-10 Thread Sainath Grandhi
This patch provides tap device create/destroy APIs in tap.c. Signed-off-by: Sainath Grandhi --- drivers/net/macvtap_main.c | 30 +++--- drivers/net/tap.c | 62 ++ include/linux/if_tap.h | 3 +++

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

2017-02-10 Thread Ralf Baechle
When sending ARP requests over AX.25 links the hwaddress in the neighbour cache are not getting initialized. For such an incomplete arp entry ax2asc2 will generate an empty string resulting in /proc/net/arp output like the following: $ cat /proc/net/arp IP address HW type Flags

[PATCH] ibmvnic: Initialize completion variables before starting work

2017-02-10 Thread Nathan Fontenot
Initialize condition variables prior to invoking any work that can mark them complete. This resolves a race in the ibmvnic driver where the driver faults trying to complete an uninitialized condition variable. Signed-off-by: Nathan Fontenot ---

[PATCH iproute2 1/1] man page: add page for skbmod action

2017-02-10 Thread Lucas Bates
Signed-off-by: Lucas Bates Signed-off-by: Jamal Hadi Salim Signed-off-by: Roman Mashak --- man/man8/Makefile| 2 +- man/man8/tc-skbmod.8 | 137 +++ 2 files changed, 138

[PATCH] ibmvnic: Call napi_disable instead of napi_enable in failure path

2017-02-10 Thread Nathan Fontenot
The failure path in ibmvnic_open() mistakenly makes a second call to napi_enable instead of calling napi_disable. This can result in a BUG_ON for any queues that were enabled in the previous call to napi_enable. Signed-off-by: Nathan Fontenot ---

[PATCH] NET: mkiss/6pack: Fix SIOCSIFENCAP ioctl

2017-02-10 Thread Ralf Baechle
When looking at Thomas' mkiss fix 7ba1b6890387 ("NET: mkiss: Fix panic") I noticed that the mkiss SIOCSIFENCAPS ioctl was also doing a slightly strange assignment dev->hard_header_len = AX25_KISS_HEADER_LEN + AX25_MAX_HEADER_LEN + 3;

[PATCH] net: natsemi: ns83820: use new api ethtool_{get|set}_link_ksettings

2017-02-10 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/natsemi/ns83820.c | 46

Re: [RFC PATCH net-next 1/2] bpf: Save original ebpf instructions

2017-02-10 Thread Daniel Borkmann
On 02/10/2017 06:22 AM, Alexei Starovoitov wrote: On Thu, Feb 09, 2017 at 12:25:37PM +0100, Daniel Borkmann wrote: Correct the overlap both use-cases share is the dump itself. It needs to be in such a condition for CRIU, that it can be reloaded eventually, I don't think it makes sense to

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

2017-02-10 Thread Jakub Kicinski
On Thu, 9 Feb 2017 16:18:08 +0200, Or Gerlitz wrote: > Currently there is no way of querying whether a filter is > offloaded to HW or not when using both policy (no flag). > > Reuse the skip flags to show the insertion status by setting > the skip_hw flag in case the filter wasn't offloaded. >

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

2017-02-10 Thread Al Viro
[repost with netdev added - hadn't realized it wasn't in Cc] On Tue, Aug 09, 2016 at 03:58:36PM +0100, Al Viro wrote: > Actually returning to the original behaviour would be "restore ->msg_iter > if we tried skb_copy_and_csum_datagram() and failed for any reason". Which > would be bloody

Re: [RFC PATCH net] bpf: introduce BPF_F_ALLOW_OVERRIDE flag

2017-02-10 Thread Andy Lutomirski
On Thu, Feb 9, 2017 at 10:59 AM, Alexei Starovoitov wrote: > If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command > to the given cgroup the descendent cgroup will be able to override > effective bpf program that was inherited from this cgroup. > By default it's not passed,

Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency

2017-02-10 Thread Arnd Bergmann
On Fri, Feb 10, 2017 at 9:57 PM, Florian Fainelli wrote: > On 02/10/2017 12:05 PM, Arnd Bergmann wrote: >> On Friday, February 10, 2017 9:42:21 AM CET Florian Fainelli wrote: >>> On 02/10/2017 12:20 AM, Arnd Bergmann wrote: On Thu, Feb 9, 2017 at 7:22 PM, Florian

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

2017-02-10 Thread Joe Stringer
On 10 February 2017 at 09:42, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 08, 2017 at 09:27:41PM +0100, Mickaël Salaün escreveu: >> This series brings some fixes and small improvements to the BPF samples. >> >> This is intended for the perf tree and apply on 7a5980f9c006

[GIT] Networking

2017-02-10 Thread David Miller
1) If the timing is wrong we can indefinitely stop generating new ipv6 temporary addresses, from Marcus Huewe. 2) Don't double free per-cpu stats in ipv6 SIT tunnel driver, from Cong Wang. 3) Put protections in place so that AF_PACKET is not able to submit packets which don't even have

Re: [PATCH net 1/1] net: fec: fix multicast filtering hardware setup

2017-02-10 Thread Fabio Estevam
On Fri, Feb 10, 2017 at 3:54 AM, Andy Duan wrote: > Fix hardware setup of multicast address hash: > - Never clear the hardware hash (to avoid packet loss) > - Construct the hash register values in software and then write once > to hardware > > Signed-off-by: Fugang Duan

Re: [PATCH net-next,v2] gtp: add MAINTAINERS

2017-02-10 Thread David Miller
From: Pablo Neira Ayuso Date: Fri, 10 Feb 2017 13:26:27 +0100 > From: Pablo Neira > > Add maintainers for this tunnel driver. Include main osmocom.org mailist > list too. > > Signed-off-by: Pablo Neira Ayuso > --- > v2: Harald

Re: [PATCH 2/3] tipc: Fix tipc_sk_reinit race conditions

2017-02-10 Thread Ying Xue
On 02/07/2017 08:39 PM, Herbert Xu wrote: > There are two problems with the function tipc_sk_reinit. Firstly > it's doing a manual walk over an rhashtable. This is broken as > an rhashtable can be resized and if you manually walk over it > during a resize then you may miss entries. > > Secondly

Re: [PATCH net-next 00/12] Netronome NFP4000 and NFP6000 PF driver

2017-02-10 Thread David Miller
From: Jakub Kicinski Date: Thu, 9 Feb 2017 09:17:26 -0800 > This is a base PF driver for Netronome NFP4000 and NFP6000 chips. This > series doesn't add any exciting new features, it provides a foundation > for supporting more advanced firmware applications.

Re: [PATCH v2 net] l2tp: do not use udp_ioctl()

2017-02-10 Thread David Miller
From: Eric Dumazet Date: Thu, 09 Feb 2017 16:15:52 -0800 > From: Eric Dumazet > > udp_ioctl(), as its name suggests, is used by UDP protocols, > but is also used by L2TP :( > > L2TP should use its own handler, because it really does not > look the

Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency

2017-02-10 Thread Florian Fainelli
On 02/10/2017 12:05 PM, Arnd Bergmann wrote: > On Friday, February 10, 2017 9:42:21 AM CET Florian Fainelli wrote: >> On 02/10/2017 12:20 AM, Arnd Bergmann wrote: >>> On Thu, Feb 9, 2017 at 7:22 PM, Florian Fainelli >>> wrote: On 02/09/2017 07:08 AM, Arnd Bergmann

Re: [PATCH net-next v5 00/11] Improve BPF selftests and use the library (net-next tree)

2017-02-10 Thread David Miller
From: Mickaël Salaün Date: Fri, 10 Feb 2017 00:21:34 +0100 > This series brings some fixes to selftests, add the ability to test > unprivileged BPF programs as root and replace bpf_sys.h with calls to the BPF > library. > > This is intended for the net-next tree and apply on

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

2017-02-10 Thread Christophe JAILLET
'of_node_put(fpi->phy_node)' should also be called if we branch to 'out_deregister_fixed_link' error handling path. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2017-02-10 Thread Christophe JAILLET
There is no need to use an intermediate variable to handle an error code in this case. Signed-off-by: Christophe JAILLET --- I think that the remaining use of 'err' a few lines above could also be dropped. However, it could change the return value (i.e. propagation

Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency

2017-02-10 Thread Arnd Bergmann
On Friday, February 10, 2017 9:42:21 AM CET Florian Fainelli wrote: > On 02/10/2017 12:20 AM, Arnd Bergmann wrote: > > On Thu, Feb 9, 2017 at 7:22 PM, Florian Fainelli > > wrote: > >> On 02/09/2017 07:08 AM, Arnd Bergmann wrote: > >> I disabled CONFIG_NETDEVICES to force

Re: [patch net-next] spectrum: flower: Treat ETH_P_ALL as a special case and translate for HW

2017-02-10 Thread David Miller
From: Jiri Pirko Date: Thu, 9 Feb 2017 14:42:03 +0100 > From: Jiri Pirko > > HW does not understand ETH_P_ALL. So treat this special case differently > and translate to 0/0 key/mask. That will allow HW to match all ethertypes. > > Fixes: 7aa0f5aa9030

Re: [patch net-next 0/4] devlink: small cleanup around eswitch [sg]et

2017-02-10 Thread David Miller
From: Jiri Pirko Date: Thu, 9 Feb 2017 15:54:32 +0100 > Contains small devlink cleanup around eswitch get/set commands. Series applied, thanks.

Re: [PATCH] net: ethernet: ti: netcp_core: return netdev_tx_t in xmit

2017-02-10 Thread David Miller
From: Ivan Khoronzhuk Date: Thu, 9 Feb 2017 16:24:14 +0200 > @@ -1300,7 +1301,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, > struct net_device *ndev) > dev_warn(netcp->ndev_dev, "padding failed (%d), packet > dropped\n", >

Re: [PATCH net-next v2 00/12] net: dsa: remove unnecessary phy.h include

2017-02-10 Thread Florian Fainelli
On 02/10/2017 10:51 AM, David Miller wrote: > From: Kalle Valo > Date: Thu, 09 Feb 2017 16:10:06 +0200 > >> Florian Fainelli writes: >> > If not, for something like this it's a must: > > drivers/net/wireless/ath/wil6210/cfg80211.c:24:30:

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

2017-02-10 Thread David Miller
From: Or Gerlitz Date: Thu, 9 Feb 2017 16:18:04 +0200 > Currently there is no way of querying whether a filter is > offloaded to HW or not when using both policy (no flag). > > Reuse the skip flags to show the insertion status by setting > the skip_hw flag in case the

Re: [PATCH 1/3] ath10k: remove ath10k_vif_to_arvif()

2017-02-10 Thread Adrian Chadd
On 9 February 2017 at 23:37, Joe Perches wrote: > On Thu, 2017-02-09 at 23:14 -0800, Adrian Chadd wrote: > >> If there >> were accessors for the skb data / len fields (like we do for mbufs) >> then porting the code would've involved about 5,000 less changed >> lines. > > What

Re: pull-request: mac80211-next 2017-02-09

2017-02-10 Thread David Miller
From: Johannes Berg Date: Thu, 9 Feb 2017 15:27:33 +0100 > Here are some more (final) updates for -next. Nothing here is > really interesting, mostly cleanups and small fixes. > > Please pull and let me know if there's any problem. Pulled, thank you.

Re: [PATCH 0/2] net: ethernet: ti: cpsw: fix susp/resume

2017-02-10 Thread Grygorii Strashko
On 02/09/2017 07:45 PM, David Miller wrote: From: Ivan Khoronzhuk Date: Fri, 10 Feb 2017 00:54:24 +0200 On Thu, Feb 09, 2017 at 05:21:26PM -0500, David Miller wrote: From: Ivan Khoronzhuk Date: Thu, 9 Feb 2017 02:07:34 +0200 These

Re: net/packet: use-after-free in packet_rcv_fanout

2017-02-10 Thread Sowmini Varadhan
On (02/10/17 10:00), Cong Wang wrote: > My understanding about the race here is packet_release() doesn't > wait for flying packets correctly, which leads to a flying packet still > refers to the struct sock which is being released. > > This could happen because struct packet_fanout is refcn'ted,

Re: [PATCH] NET: mkiss: Fix panic

2017-02-10 Thread David Miller
From: Ralf Baechle Date: Thu, 9 Feb 2017 14:12:11 +0100 > If a USB-to-serial adapter is unplugged, the driver re-initializes, with > dev->hard_header_len and dev->addr_len set to zero, instead of the correct > values. If then a packet is sent through the half-dead

Re: [PATCH net-next v2 00/12] net: dsa: remove unnecessary phy.h include

2017-02-10 Thread David Miller
From: Kalle Valo Date: Thu, 09 Feb 2017 16:10:06 +0200 > Florian Fainelli writes: > If not, for something like this it's a must: drivers/net/wireless/ath/wil6210/cfg80211.c:24:30: error: expected ‘)’ before ‘bool’

[PATCH net-next] sfc: fix swapped arguments to efx_ef10_handle_rx_event_errors

2017-02-10 Thread Edward Cree
Fixes: a0ee35414837 ("sfc: process RX event inner checksum flags") Reported-by: Colin Ian King Signed-off-by: Edward Cree --- drivers/net/ethernet/sfc/ef10.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: Extending socket timestamping API for NTP

2017-02-10 Thread Denny Page
> On Feb 09, 2017, at 16:33, Denny Page wrote: > > >> On Feb 09, 2017, at 11:42, sdncurious wrote: >> >> I am still at a loss as to why transpose is required in case of HW >> time stamping. If STF is used for both Tx and Rx time stamping the >> timing

Re: pull-request: wireless-drivers-next 2017-02-09

2017-02-10 Thread David Miller
From: Kalle Valo Date: Thu, 09 Feb 2017 16:08:25 +0200 > another pull request for net-next. If the merge window starts on Sunday > this would be the last pull request from me with new features. But if it > doesn't open, I'm planning to send one more next week. > > Please

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

2017-02-10 Thread Florian Fainelli
On 02/10/2017 08:42 AM, Claudiu Manoil wrote: > Commit: f62265b "at803x: double check SGMII side autoneg" > introduced a regression for the p1010rdb board which has > two of the ethernet controllers (eTSEC) connected through > SGMII links to external Atheros SGMII AR8033 PHYs. > The issue consists

Re: [PATCH net-next V3 0/3] net/sched: act_pedit: Use offset relative to conventional network headers

2017-02-10 Thread David Miller
From: Amir Vadai Date: Tue, 7 Feb 2017 09:56:05 +0200 > Some FW/HW parser APIs are such that they need to get the specific header > type (e.g > IPV4 or IPV6, TCP or UDP) and not only the networking level (e.g network or > transport). > > Enhancing the UAPI to allow for

Re: [PATCH] xen-netfront: Delete rx_refill_timer in xennet_disconnect_backend()

2017-02-10 Thread David Miller
From: Boris Ostrovsky Date: Thu, 9 Feb 2017 08:42:59 -0500 > Are you going to take this to your tree or would you rather it goes > via Xen tree? Ok, I just did. > And the same question for > >

Re: [PATCH] net: ethernet: ti: netcp_core: remove netif_trans_update

2017-02-10 Thread David Miller
From: Ivan Khoronzhuk Date: Thu, 9 Feb 2017 16:17:40 +0200 > No need to update jiffies in txq->trans_start twice and only for tx 0, > it's supposed to be done in netdev_start_xmit() and per tx queue. > > Signed-off-by: Ivan Khoronzhuk >

Re: [PATCH V2 net] net: hns: Fix the device being used for dma mapping during TX

2017-02-10 Thread David Miller
From: Salil Mehta Date: Thu, 9 Feb 2017 11:46:15 + > From: Kejian Yan > > This patch fixes the device being used to DMA map skb->data. > Erroneous device assignment causes the crash when SMMU is enabled. > This happens during TX since buffer

Re: [patch net-next] spectrum: flower: Treat ETH_P_ALL as a special case and translate for HW

2017-02-10 Thread David Miller
From: Jiri Pirko Date: Thu, 9 Feb 2017 14:42:03 +0100 > From: Jiri Pirko > > HW does not understand ETH_P_ALL. So treat this special case differently > and translate to 0/0 key/mask. That will allow HW to match all ethertypes. > > Fixes: 7aa0f5aa9030

Re: net/packet: use-after-free in packet_rcv_fanout

2017-02-10 Thread Cong Wang
On Fri, Feb 10, 2017 at 10:02 AM, Eric Dumazet wrote: > On Fri, 2017-02-10 at 09:59 -0800, Eric Dumazet wrote: >> On Fri, 2017-02-10 at 09:49 -0800, Cong Wang wrote: >> > On Thu, Feb 9, 2017 at 7:23 PM, Eric Dumazet >> > wrote: >> > > On Thu,

Re: [PATCH net-next v3 06/10] net: dsa: Migrate to device_find_class()

2017-02-10 Thread Florian Fainelli
On 02/10/2017 05:02 AM, Greg KH wrote: > On Thu, Jan 19, 2017 at 04:51:55PM +, Russell King - ARM Linux wrote: >> (This is mainly for Greg's benefit to help him understand the issue.) >> >> I think the diagram you gave initially made this confusing, as it >> talks about a CPU(sic) producing

Re: cafe8df8b9bc clashes with DSA

2017-02-10 Thread Andrew Lunn
On Fri, Feb 10, 2017 at 12:55:44PM -0500, Vivien Didelot wrote: > Hi Florian, > > Florian Fainelli writes: > > > Fixed in the "net" tree with: > > > > 6d9f66ac7fec2a6ccd649e5909806dfe36f1fc25 ("net: phy: Fix PHY module > > checks and NULL deref in phy_attach_direct()"),

Re: [PATCH 0/4] Whitespace checkpatch fixes

2017-02-10 Thread David Miller
From: "Tobin C. Harding" Date: Thu, 9 Feb 2017 17:56:03 +1100 > This patch set fixes various whitespace checkpatch errors and warnings. Series applied.

[PATCH net-next] net_sched: fix error recovery at qdisc creation

2017-02-10 Thread Eric Dumazet
From: Eric Dumazet Dmitry reported uses after free in qdisc code [1] The problem here is that ops->init() can return an error. qdisc_create_dflt() then call ops->destroy(), while qdisc_create() does _not_ call it. Four qdisc chose to call their own ops->destroy(),

[PATCH net-next] net: ethtool: add support for forward error correction modes

2017-02-10 Thread Vidya Sagar Ravipati
From: Vidya Sagar Ravipati Forward Error Correction (FEC) modes i.e Base-R and Reed-Solomon modes are introduced in 25G/40G/100G standards for providing good BER at high speeds. Various networking devices which support 25G/40G/100G provides ability to manage supported

Re: net/packet: use-after-free in packet_rcv_fanout

2017-02-10 Thread Eric Dumazet
On Fri, 2017-02-10 at 10:02 -0800, Cong Wang wrote: > I don't have to give a 100% correct patch to prove my explanation > of the crash. At least it makes more sense than yours... I will submit it regardless of what you think. It solves _another_ issue, one of of 10 in af_packet.c

Re: cafe8df8b9bc clashes with DSA

2017-02-10 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > David will at some point merge net into net-next. Yes I know that, I just wasn't sure if having such crash in net-next was tolerated or not. Cherry-picking 6d9f66ac7fec does the job on my side. > Until then, you can work around the issue by

Re: cafe8df8b9bc clashes with DSA

2017-02-10 Thread David Miller
From: Vivien Didelot Date: Fri, 10 Feb 2017 12:55:44 -0500 > Hi Florian, > > Florian Fainelli writes: > >> Fixed in the "net" tree with: >> >> 6d9f66ac7fec2a6ccd649e5909806dfe36f1fc25 ("net: phy: Fix PHY module >> checks and NULL

Re: [RFC PATCH net] bpf: introduce BPF_F_ALLOW_OVERRIDE flag

2017-02-10 Thread Alexei Starovoitov
On Thu, Feb 09, 2017 at 10:59:23AM -0800, Alexei Starovoitov wrote: > Andy, > does it all make sense? Andy, ping.

Re: [patch net-next 00/10] mlxsw: Offload MC flood for unregister MC

2017-02-10 Thread David Miller
From: Jiri Pirko Date: Thu, 9 Feb 2017 14:54:39 +0100 > From: Jiri Pirko > > Nogah says: > > When multicast is enabled, the Linux bridge floods unregistered multicast > packets only to ports connected to a multicast router. Devices capable of > offloading

Re: cafe8df8b9bc clashes with DSA

2017-02-10 Thread Florian Fainelli
On 02/10/2017 10:15 AM, Vivien Didelot wrote: > Hi Andrew, > > Andrew Lunn writes: > >> David will at some point merge net into net-next. > > Yes I know that, I just wasn't sure if having such crash in net-next was > tolerated or not. Cherry-picking 6d9f66ac7fec does the job on

Re: [PATCH v4] net: ethernet: faraday: To support device tree usage.

2017-02-10 Thread Rob Herring
On Wed, Feb 8, 2017 at 5:59 AM, Greentime Hu wrote: > On Sat, Jan 28, 2017 at 6:17 AM, Rob Herring wrote: >> >> On Wed, Jan 25, 2017 at 10:09:20PM +0100, Arnd Bergmann wrote: >> > On Wed, Jan 25, 2017 at 6:34 PM, David Miller wrote: >> >

Re: [PATCH RFC net] net/mlx5e: Add preemption enable/disable around TC statistics upcall

2017-02-10 Thread Jakub Kicinski
On Fri, 10 Feb 2017 18:21:25 +0200, Or Gerlitz wrote: > On Fri, Feb 10, 2017 at 3:34 AM, Jakub Kicinski wrote: > > On Thu, 9 Feb 2017 17:38:43 +0200, Or Gerlitz wrote: > >> Running with CONFIG_PREEMPT set, I get a > >> > >> BUG: using smp_processor_id() in preemptible [] code: tc/3793 >

Re: net/packet: use-after-free in packet_rcv_fanout

2017-02-10 Thread Eric Dumazet
On Fri, 2017-02-10 at 09:59 -0800, Eric Dumazet wrote: > On Fri, 2017-02-10 at 09:49 -0800, Cong Wang wrote: > > On Thu, Feb 9, 2017 at 7:23 PM, Eric Dumazet wrote: > > > On Thu, 2017-02-09 at 19:19 -0800, Eric Dumazet wrote: > > > > > >> More likely the bug is in

Re: net/packet: use-after-free in packet_rcv_fanout

2017-02-10 Thread Cong Wang
On Fri, Feb 10, 2017 at 9:59 AM, Eric Dumazet wrote: > On Fri, 2017-02-10 at 09:49 -0800, Cong Wang wrote: >> On Thu, Feb 9, 2017 at 7:23 PM, Eric Dumazet wrote: >> > On Thu, 2017-02-09 at 19:19 -0800, Eric Dumazet wrote: >> > >> >> More likely the

Re: [PATCH] [net-next] ARM: orion: fix PHYLIB dependency

2017-02-10 Thread Florian Fainelli
On 02/10/2017 12:20 AM, Arnd Bergmann wrote: > On Thu, Feb 9, 2017 at 7:22 PM, Florian Fainelli wrote: >> On 02/09/2017 07:08 AM, Arnd Bergmann wrote: >> I disabled CONFIG_NETDEVICES to force CONFIG_PHY not to be set here, and >> I was not able to reproduce this, what am I

Re: net/packet: use-after-free in packet_rcv_fanout

2017-02-10 Thread Cong Wang
On Thu, Feb 9, 2017 at 7:33 PM, Sowmini Varadhan wrote: > On (02/09/17 19:19), Eric Dumazet wrote: >> >> More likely the bug is in fanout_add(), with a buggy sequence in error >> case, and not correct locking. >> >> kfree(po->rollover); >> po->rollover = NULL; >> >>

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

2017-02-10 Thread Arnaldo Carvalho de Melo
Em Wed, Feb 08, 2017 at 09:27:41PM +0100, Mickaël Salaün escreveu: > This series brings some fixes and small improvements to the BPF samples. > > This is intended for the perf tree and apply on 7a5980f9c006 ("tools lib bpf: > Add missing header to the library"). Wang, are you ok with this

  1   2   >