[PATCH net] net: Check for fullsock in sock_i_uid()

2016-11-01 Thread Subash Abhinov Kasiviswanathan
sock_i_uid() acquires the sk_callback_lock which does not exist for sockets in TCP_NEW_SYN_RECV state. This results in errors showing up as spinlock bad magic. Signed-off-by: Subash Abhinov Kasiviswanathan Cc: Eric Dumazet --- net/core/sock.c | 5

[PATCH net] cxgb4: correct device ID of T6 adapter

2016-11-01 Thread Hariprasad Shenai
Signed-off-by: Hariprasad Shenai --- drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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

Re: Let's do P4

2016-11-01 Thread Maciej Żenczykowski
> Sorry for jumping into the middle and the delay (plumbers this week). My > question would be, if the main target is for p4 *offloading* anyway, who > would use this sw fallback path? Mostly for testing purposes? > > I'm not sure about compilerB here and the complexity that needs to be > pushed

Re: [PATCH net-next 3/3] tools lib bpf: Sync bpf_map_def with tc

2016-11-01 Thread Joe Stringer
On 1 November 2016 at 20:09, Daniel Borkmann wrote: > On 10/31/2016 07:39 PM, Joe Stringer wrote: >> >> TC uses a slightly different map layout in its ELFs. Update libbpf to >> use the same definition so that ELFs may be built using libbpf and >> loaded using tc. >> >>

Re: [PATCH net-next 2/3] tools lib bpf: Sync with samples/bpf/libbpf

2016-11-01 Thread Joe Stringer
On 1 November 2016 at 19:52, Daniel Borkmann wrote: > On 10/31/2016 07:39 PM, Joe Stringer wrote: >> >> Extend the tools/ version of libbpf to include all of the functionality >> provided in the samples/bpf version. >> >> Signed-off-by: Joe Stringer >> --- >>

Re: [PATCH net-next 3/3] tools lib bpf: Sync bpf_map_def with tc

2016-11-01 Thread Daniel Borkmann
On 10/31/2016 07:39 PM, Joe Stringer wrote: TC uses a slightly different map layout in its ELFs. Update libbpf to use the same definition so that ELFs may be built using libbpf and loaded using tc. Signed-off-by: Joe Stringer --- tools/lib/bpf/libbpf.h | 11 +++ 1 file

Re: [PATCH net-next 2/3] tools lib bpf: Sync with samples/bpf/libbpf

2016-11-01 Thread Daniel Borkmann
On 10/31/2016 07:39 PM, Joe Stringer wrote: Extend the tools/ version of libbpf to include all of the functionality provided in the samples/bpf version. Signed-off-by: Joe Stringer --- tools/lib/bpf/bpf.c| 139 +++-- tools/lib/bpf/bpf.h| 208

Re: [PATCH net-next 0/3] tools lib bpf: Synchronize implementations

2016-11-01 Thread Daniel Borkmann
On 11/01/2016 11:17 PM, Joe Stringer wrote: On 1 November 2016 at 13:51, David Ahern wrote: On 10/31/16 12:39 PM, Joe Stringer wrote: Update tools/lib/bpf to provide more functionality and improve interoperation with other tools that generate and use eBPF code. The

Re: Let's do P4

2016-11-01 Thread Daniel Borkmann
On 10/31/2016 10:39 AM, Jiri Pirko wrote: Sun, Oct 30, 2016 at 11:39:05PM CET, alexei.starovoi...@gmail.com wrote: On Sun, Oct 30, 2016 at 05:38:36PM +0100, Jiri Pirko wrote: Sun, Oct 30, 2016 at 11:26:49AM CET, tg...@suug.ch wrote: On 10/30/16 at 08:44am, Jiri Pirko wrote: Sat, Oct 29, 2016

Re: [PATCH net-next v2] ipv4: fib: Replay events when registering FIB notifier

2016-11-01 Thread Roopa Prabhu
On 11/1/16, 10:03 AM, Ido Schimmel wrote: > Hi Roopa, > > On Tue, Nov 01, 2016 at 08:14:14AM -0700, Roopa Prabhu wrote: >> [snip] >> I have the same concern as Eric here. >> >> I understand why you need it, but can the driver request for an initial dump >> and that >> dump be made more efficient

Re: [Patch net] inet: fix sleeping inside inet_wait_for_connect()

2016-11-01 Thread Eric Dumazet
On Tue, 2016-11-01 at 16:04 -0700, Cong Wang wrote: > Andrey reported this kernel warning: > Unlike commit 26cabd31259ba43f68026ce3f62b78094124333f > ("sched, net: Clean up sk_wait_event() vs. might_sleep()"), the > sleeping function is called before schedule_timeout(), this is indeed > a bug.

Re: [PATCH v7 5/6] net: ipv4, ipv6: run cgroup eBPF egress programs

2016-11-01 Thread Daniel Borkmann
On 10/31/2016 05:40 PM, David Miller wrote: From: Daniel Mack Date: Tue, 25 Oct 2016 12:14:13 +0200 @@ -312,6 +314,13 @@ int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb) skb->dev = dev; skb->protocol = htons(ETH_P_IP); + ret =

Re: [PATCH] rtl8xxxu: Fix for agressive power saving by rtl8723bu wireless IC

2016-11-01 Thread John Heenan
Barry Day has submitted real world reports for the 8192eu and 8192cu. This needs to be acknowledged. I have submitted real world reports for the 8723bu. When it comes down to it, it looks like the kernel code changes are really going to be very trivial to fix this problem and we need to take the

Re: [PATCH net-next 08/11] net: dsa: mv88e6xxx: add port duplex setter

2016-11-01 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> int (*port_set_link)(struct mv88e6xxx_chip *chip, int port, int link); >> + >> +/* Port's MAC duplex mode >> + * >> + * Use DUPLEX_HALF or DUPLEX_FULL to force half or full duplex, or >> + * DUPLEX_UNKNOWN for normal duplex

Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-11-01 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> +#define LINK_UNKNOWN-1 >> + >> +/* Port's MAC link state >> + * LINK_UNKNOWN for normal link detection, 0 to force link down, >> + * otherwise force link up. >> + */ >> +int (*port_set_link)(struct mv88e6xxx_chip

[PATCH 1/1] xen-netfront: cast grant table reference first to type int

2016-11-01 Thread Dongli Zhang
IS_ERR_VALUE() in commit 87557efc27f6a50140fb20df06a917f368ce3c66 ("xen-netfront: do not cast grant table reference to signed short") would not return true for error code unless we cast ref first to type int. Signed-off-by: Dongli Zhang --- drivers/net/xen-netfront.c |

Re: [PATCH net-next 04/11] net: dsa: mv88e6xxx: add port FID accessors

2016-11-01 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> --- a/drivers/net/dsa/mv88e6xxx/port.c >> +++ b/drivers/net/dsa/mv88e6xxx/port.c >> @@ -61,6 +61,8 @@ int mv88e6xxx_port_set_state(struct mv88e6xxx_chip *chip, >> int port, u8 state) >> return 0; >> } >> >> +/* Offset 0x05: Port Control

[PATCH net-next] enic: set skb->hash type properly

2016-11-01 Thread Govindarajulu Varadarajan
From: Govindarajulu Varadarajan <_gov...@gmx.com> Driver sets the skb l4/l3 hash based on NIC_CFG_RSS_HASH_TYPE_*, which is bit mask. This is wrong. Hw actually provides us enum. Use CQ_ENET_RQ_DESC_RSS_TYPE_* to set l3 and l4 hash type. Fixes: bf751ba802fe ("driver/net: enic: record q_number

Re: [PATCH] net: 3com: typhoon: use new api ethtool_{get|set}_link_ksettings

2016-11-01 Thread David Dillow
On Wed, 2016-11-02 at 00:11 +0100, Philippe Reynes wrote: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > Signed-off-by: Philippe Reynes LGTM. Reviewed-by: David Dillow

Re: [PATCH] net: smsc911x: Synchronize the runtime PM status during system suspend

2016-11-01 Thread Ulf Hansson
On 1 November 2016 at 05:19, Rafael J. Wysocki wrote: > On Thursday, October 27, 2016 01:53:03 PM Ulf Hansson wrote: >> On 27 October 2016 at 13:41, Geert Uytterhoeven wrote: >> > Hi Ulf, >> > >> > On Thu, Oct 27, 2016 at 1:23 PM, Ulf Hansson

[PATCH] net: 3com: typhoon: use new api ethtool_{get|set}_link_ksettings

2016-11-01 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/3com/typhoon.c | 60 +- 1 files changed, 30 insertions(+), 30 deletions(-)

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Tom Herbert
On Tue, Nov 1, 2016 at 3:12 PM, Hannes Frederic Sowa wrote: > On 01.11.2016 21:59, Thomas Graf wrote: >> On 1 November 2016 at 13:08, Hannes Frederic Sowa >> wrote: >>> On Tue, Nov 1, 2016, at 19:51, Thomas Graf wrote: If I understand

[Patch net] inet: fix sleeping inside inet_wait_for_connect()

2016-11-01 Thread Cong Wang
Andrey reported this kernel warning: WARNING: CPU: 0 PID: 4608 at kernel/sched/core.c:7724 __might_sleep+0x14c/0x1a0 kernel/sched/core.c:7719 do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_wait+0xbc/0x210 kernel/sched/wait.c:178 Modules linked in: CPU: 0

[PATCH net-next] i40evf: Move some i40evf_reset_task code to separate function

2016-11-01 Thread Joe Perches
The i40evf_reset_task function is a couple hundred lines and it has a separable block that disables vf. Move that block to a new i40evf_disable_vf function to shorten i40evf_reset_task a bit. Signed-off-by: Joe Perches --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 86

Re: [PATCH net-next 0/3] tools lib bpf: Synchronize implementations

2016-11-01 Thread Joe Stringer
On 1 November 2016 at 13:51, David Ahern wrote: > On 10/31/16 12:39 PM, Joe Stringer wrote: >> Update tools/lib/bpf to provide more functionality and improve interoperation >> with other tools that generate and use eBPF code. >> >> The kernel uapi headers are a bit newer

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Hannes Frederic Sowa
On 01.11.2016 21:59, Thomas Graf wrote: > On 1 November 2016 at 13:08, Hannes Frederic Sowa > wrote: >> On Tue, Nov 1, 2016, at 19:51, Thomas Graf wrote: >>> If I understand you correctly then a single BPF program would be >>> loaded which then applies to all

Re: [PATCH net-next 0/3] tools lib bpf: Synchronize implementations

2016-11-01 Thread Alexei Starovoitov
On Tue, Nov 1, 2016 at 9:48 AM, David Miller wrote: > From: Joe Stringer > Date: Mon, 31 Oct 2016 11:39:14 -0700 > >> Update tools/lib/bpf to provide more functionality and improve interoperation >> with other tools that generate and use eBPF code. >> >> The

[PATCH net-next] ila: Fix crash caused by rhashtable changes

2016-11-01 Thread Tom Herbert
commit ca26893f05e86 ("rhashtable: Add rhlist interface") added a field to rhashtable_iter so that length became 56 bytes and would exceed the size of args in netlink_callback (which is 48 bytes). The netlink diag dump function already has been allocating a iter structure and storing the pointed

[PATCH 07/12] netfilter: nf_tables: add fib expression

2016-11-01 Thread Pablo Neira Ayuso
From: Florian Westphal Add FIB expression, supported for ipv4, ipv6 and inet family (the latter just dispatches to ipv4 or ipv6 one based on nfproto). Currently supports fetching output interface index/name and the rtm_type associated with an address. This can be used for

[PATCH 02/12] netfilter: nfnetlink_log: Use GFP_NOWARN for skb allocation

2016-11-01 Thread Pablo Neira Ayuso
From: Calvin Owens Since the code explicilty falls back to a smaller allocation when the large one fails, we shouldn't complain when that happens. Signed-off-by: Calvin Owens Signed-off-by: Pablo Neira Ayuso ---

[PATCH 03/12] netfilter: nf_tables: allow expressions to return STOLEN

2016-11-01 Thread Pablo Neira Ayuso
From: Florian Westphal Currently not supported, we'd oops as skb was (or is) free'd elsewhere. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nf_tables_core.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 05/12] netfilter: nft_meta: permit pkttype mangling in ip/ip6 prerouting

2016-11-01 Thread Pablo Neira Ayuso
From: Liping Zhang After supporting this, we can combine it with hash expression to emulate the 'cluster match'. Suggested-by: Pablo Neira Ayuso Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso

[PATCH 00/12] Netfilter updates for net-next

2016-11-01 Thread Pablo Neira Ayuso
Hi David, The following patchset contains Netfilter updates for your net-next tree. This includes better integration with the routing subsystem for nf_tables, explicit notrack support and smaller updates. More specifically, they are: 1) Add fib lookup expression for nf_tables, from Florian

[PATCH 06/12] netfilter: nft_ct: add notrack support

2016-11-01 Thread Pablo Neira Ayuso
This patch adds notrack support. I decided to add a new expression, given that this doesn't fit into the existing set operation. Notrack doesn't need a source register, and an hypothetical NFT_CT_NOTRACK key makes no sense since matching the untracked state is done through NFT_CT_STATE. I'm

[PATCH 01/12] netfilter: xt_multiport: Use switch case instead of multiple condition checks

2016-11-01 Thread Pablo Neira Ayuso
From: Gao Feng There are multiple equality condition checks in the original codes, so it is better to use switch case instead of them. Signed-off-by: Gao Feng Signed-off-by: Pablo Neira Ayuso --- net/netfilter/xt_multiport.c | 40

[PATCH 04/12] netfilter: nft_numgen: start round robin from zero

2016-11-01 Thread Pablo Neira Ayuso
From: Liping Zhang Currently we start round robin from 1, but it's better to start round robin from 0. This is to keep consistent with xt_statistic in iptables. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso

[PATCH 08/12] netfilter: nf_log: add packet logging for netdev family

2016-11-01 Thread Pablo Neira Ayuso
Move layer 2 packet logging into nf_log_l2packet() that resides in nf_log_common.c, so this can be shared by both bridge and netdev families. This patch adds the boiler plate code to register the netdev logging family. Signed-off-by: Pablo Neira Ayuso ---

[PATCH 11/12] netfilter: nf_tables: remove useless U8_MAX validation

2016-11-01 Thread Pablo Neira Ayuso
From: Liping Zhang After call nft_data_init, size is already validated and desc.len will not exceed the sizeof(struct nft_data), i.e. 16 bytes. So it will never exceed U8_MAX. Furthermore, in nft_immediate_init, we forget to call nft_data_uninit when desc.len exceeds

[PATCH 10/12] netfilter: nf_tables: introduce routing expression

2016-11-01 Thread Pablo Neira Ayuso
From: "Anders K. Pedersen" Introduces an nftables rt expression for routing related data with support for nexthop (i.e. the directly connected IP address that an outgoing packet is sent to), which can be used either for matching or accounting, eg. # nft add rule filter

[PATCH 12/12] netfilter: nf_queue: place volatile data in own cacheline

2016-11-01 Thread Pablo Neira Ayuso
From: Florian Westphal As the comment indicates, the data at the end of nfqnl_instance struct is written on every queue/dequeue, so it should reside in its own cacheline. Before this change, 'lock' was in first cacheline so we dirtied both. Signed-off-by: Florian Westphal

[PATCH 09/12] netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c

2016-11-01 Thread Pablo Neira Ayuso
We need this split to reuse existing codebase for the upcoming nf_tables socket expression. Signed-off-by: Pablo Neira Ayuso --- include/net/netfilter/nf_socket.h | 27 net/ipv4/netfilter/Kconfig | 6 + net/ipv4/netfilter/Makefile | 2 +

Re: mlx5 bug in error path of mlx5e_open_channel()

2016-11-01 Thread Saeed Mahameed
On 11/01/2016 04:44 PM, Jesper Dangaard Brouer wrote: > > In driver mlx5 function mlx5e_open_channel() does not handle error > path correctly. (Tested by letting mlx5e_create_rq fail with -ENOMEM, > propagates to mlx5e_open_rq) > > This first seemed related to commit b5503b994ed5 ("net/mlx5e:

Re: [PATCH v4 2/7] Documentation: devicetree: add PHY lane swap binding

2016-11-01 Thread Andrew Lunn
> If set, indicates the PHY will swap the TX/RX lanes to compensate > for the board being designed with the lanes swapped. Thanks, much better. Andrew

Re: [PATCH net-next V2 3/3] net/mlx4_en: Add ethtool statistics for XDP cases

2016-11-01 Thread Brenden Blanco
On Tue, Nov 01, 2016 at 01:36:26PM +0200, Tariq Toukan wrote: > XDP statistics are reported in ethtool as follows: > - xdp_drop: the number of packets dropped by xdp. > - xdp_tx: the number of packets forwarded by xdp. > - xdp_tx_full: the number of times an xdp forward failed > due to a

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 13:33, Tom Herbert wrote: > You need to show that is integrity is maintained with these patches. > Part of this can be done, but part of this needs to be established in > testing. > > I've already given specifics for at least one potential source of >

Re: [PATCH v4 6/7] net: ethernet: bgmac: add NS2 support

2016-11-01 Thread Jon Mason
On Tue, Nov 01, 2016 at 01:34:30PM -0700, Scott Branden wrote: > One change in this patch > > On 16-11-01 01:04 PM, Jon Mason wrote: > >Add support for the variant of amac hardware present in the Broadcom > >Northstar2 based SoCs. Northstar2 requires an additional register to be > >configured

Re: [PATCH net-next v2 3/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 13:11, David Ahern wrote: > On 10/31/16 6:37 PM, Thomas Graf wrote: >> - Perform simple encapsulation where offload is of no concern. >>(The existing funtionality to attach a tunnel key to the skb >> and redirect to a tunnel net_device to

Re: [PATCH v4 2/7] Documentation: devicetree: add PHY lane swap binding

2016-11-01 Thread Scott Branden
On 16-11-01 01:59 PM, Jon Mason wrote: On Tue, Nov 01, 2016 at 09:48:26PM +0100, Andrew Lunn wrote: +- enet-phy-lane-swap: If set, indicates the PHY device requires swapping the + TX/RX lanes to function properly. Is 'requires' the right word here? The PHY performs the actual swap of the

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 13:08, Hannes Frederic Sowa wrote: > On Tue, Nov 1, 2016, at 19:51, Thomas Graf wrote: >> If I understand you correctly then a single BPF program would be >> loaded which then applies to all dst_output() calls? This has a huge >> drawback, instead

Re: [PATCH v4 2/7] Documentation: devicetree: add PHY lane swap binding

2016-11-01 Thread Jon Mason
On Tue, Nov 01, 2016 at 09:48:26PM +0100, Andrew Lunn wrote: > > +- enet-phy-lane-swap: If set, indicates the PHY device requires swapping > > the > > + TX/RX lanes to function properly. > > Is 'requires' the right word here? The PHY performs the actual swap of > the Tx/Rx lanes. What I'm

Re: [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect

2016-11-01 Thread Cyrill Gorcunov
On Tue, Nov 01, 2016 at 01:52:34PM -0700, Eric Dumazet wrote: > > The preferred way to cite a bug origin is : > > Fixes: 286c72deabaa ("udp: must lock the socket in udp_disconnect()") Aha. Thank you, will do this way next time. > > CC: David S. Miller > > CC: Eric Dumazet

Re: [PATCH net-next 0/3] tools lib bpf: Synchronize implementations

2016-11-01 Thread David Ahern
On 10/31/16 12:39 PM, Joe Stringer wrote: > Update tools/lib/bpf to provide more functionality and improve interoperation > with other tools that generate and use eBPF code. > > The kernel uapi headers are a bit newer than the version in the tools/ > directory; synchronize those. > >

Re: [PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect

2016-11-01 Thread Eric Dumazet
On Tue, 2016-11-01 at 23:05 +0300, Cyrill Gorcunov wrote: > While being preparing patches for killing raw sockets via > diag netlink interface I noticed that my runs are stuck: > > | [root@pcs7 ~]# cat /proc/`pidof ss`/stack > | [] __lock_sock+0x80/0xc4 > | [] lock_sock_nested+0x47/0x95 > |

Re: [PATCH v4 2/7] Documentation: devicetree: add PHY lane swap binding

2016-11-01 Thread Andrew Lunn
> +- enet-phy-lane-swap: If set, indicates the PHY device requires swapping the > + TX/RX lanes to function properly. Is 'requires' the right word here? The PHY performs the actual swap of the Tx/Rx lanes. Andrew

Re: [PATCH v4 6/7] net: ethernet: bgmac: add NS2 support

2016-11-01 Thread Scott Branden
One change in this patch On 16-11-01 01:04 PM, Jon Mason wrote: Add support for the variant of amac hardware present in the Broadcom Northstar2 based SoCs. Northstar2 requires an additional register to be configured with the port speed/duplexity (NICPM). This can be added to the link callback

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Tom Herbert
On Tue, Nov 1, 2016 at 12:59 PM, Thomas Graf wrote: > On 1 November 2016 at 12:27, Tom Herbert wrote: >> On Tue, Nov 1, 2016 at 12:11 PM, Thomas Graf wrote: >>> You can do the same with act_pedit or cls_bpf at dev_queue_xmit() >>> before or

Re: [PATCH net-next v2 3/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread David Ahern
On 10/31/16 6:37 PM, Thomas Graf wrote: > Register two new BPF prog types BPF_PROG_TYPE_LWT_IN and > BPF_PROG_TYPE_LWT_OUT which are invoked if a route contains a > LWT redirection of type LWTUNNEL_ENCAP_BPF. > > The separate program types are required because manipulation of > packet data is

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Hannes Frederic Sowa
On Tue, Nov 1, 2016, at 19:51, Thomas Graf wrote: > On 1 November 2016 at 03:54, Hannes Frederic Sowa > wrote: > > I do fear the complexity and debugability introduced by this patch set > > quite a bit. > > What is the complexity concern? This is pretty straight

[PATCH v4 1/7] net: phy: broadcom: add bcm54xx_auxctl_read

2016-11-01 Thread Jon Mason
Add a helper function to read the AUXCTL register for the BCM54xx. This mirrors the bcm54xx_auxctl_write function already present in the code. Signed-off-by: Jon Mason --- drivers/net/phy/broadcom.c | 10 ++ include/linux/brcmphy.h| 1 + 2 files changed, 11

[PATCH v4 3/7] net: phy: broadcom: Add BCM54810 PHY entry

2016-11-01 Thread Jon Mason
The BCM54810 PHY requires some semi-unique configuration, which results in some additional configuration in addition to the standard config. Also, some users of the BCM54810 require the PHY lanes to be swapped. Since there is no way to detect this, add a device tree query to see if it is

[PATCH v4 5/7] net: ethernet: bgmac: device tree phy enablement

2016-11-01 Thread Jon Mason
Change the bgmac driver to allow for phy's defined by the device tree Signed-off-by: Jon Mason --- drivers/net/ethernet/broadcom/bgmac-bcma.c | 48 drivers/net/ethernet/broadcom/bgmac-platform.c | 48 +++-

[PATCH v4 6/7] net: ethernet: bgmac: add NS2 support

2016-11-01 Thread Jon Mason
Add support for the variant of amac hardware present in the Broadcom Northstar2 based SoCs. Northstar2 requires an additional register to be configured with the port speed/duplexity (NICPM). This can be added to the link callback to hide it from the instances that do not use this. Also, clearing

[PATCH v4 7/7] arm64: dts: NS2: add AMAC ethernet support

2016-11-01 Thread Jon Mason
Add support for the AMAC ethernet to the Broadcom Northstar2 SoC device tree Signed-off-by: Jon Mason --- arch/arm64/boot/dts/broadcom/ns2-svk.dts | 5 + arch/arm64/boot/dts/broadcom/ns2.dtsi| 12 2 files changed, 17 insertions(+) diff --git

[PATCH] net: ip, diag -- Adjust raw_abort to use unlocked __udp_disconnect

2016-11-01 Thread Cyrill Gorcunov
While being preparing patches for killing raw sockets via diag netlink interface I noticed that my runs are stuck: | [root@pcs7 ~]# cat /proc/`pidof ss`/stack | [] __lock_sock+0x80/0xc4 | [] lock_sock_nested+0x47/0x95 | [] udp_disconnect+0x19/0x33 | [] raw_abort+0x33/0x42 | []

[PATCH v4 4/7] Documentation: devicetree: net: add NS2 bindings to amac

2016-11-01 Thread Jon Mason
Clean-up the documentation to the bgmac-amac driver, per suggestion by Rob Herring, and add details for NS2 support. Signed-off-by: Jon Mason --- Documentation/devicetree/bindings/net/brcm,amac.txt | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-)

[PATCH v4 2/7] Documentation: devicetree: add PHY lane swap binding

2016-11-01 Thread Jon Mason
Add the documentation for PHY lane swapping. This is a boolean entry to notify the phy device drivers that the TX/RX lanes need to be swapped. Signed-off-by: Jon Mason --- Documentation/devicetree/bindings/net/phy.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v4 0/7] add NS2 support to bgmac

2016-11-01 Thread Jon Mason
Changes in v4: * Actually send out the lane swap binding doc patch (Per Scott Branden) * Remove unused #define (Per Andrew Lunn) Changes in v3: * Clean-up the bgmac DT binding doc (per Rob Herring) * Document the lane swap binding and make it generic (Per Andrew Lunn) Changes in v2: * Remove

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 12:27, Tom Herbert wrote: > On Tue, Nov 1, 2016 at 12:11 PM, Thomas Graf wrote: >> You can do the same with act_pedit or cls_bpf at dev_queue_xmit() >> before or after you go into the encapsulation device. This is a tool >> for root, if

[PATCH v4 net-next] lan78xx: Use irq_domain for phy interrupt from USB Int. EP

2016-11-01 Thread Woojung.Huh
From: Woojung Huh To utilize phylib with interrupt fully than handling some of phy stuff in the MAC driver, create irq_domain for USB interrupt EP of phy interrupt and pass the irq number to phy_connect_direct() instead of PHY_IGNORE_INTERRUPT. Idea comes from

Re: [PATCH v3 2/6] net: phy: broadcom: Add BCM54810 PHY entry

2016-11-01 Thread Jon Mason
On Tue, Nov 01, 2016 at 07:46:39PM +0100, Andrew Lunn wrote: > Hi Jon > > > @@ -56,6 +57,8 @@ > > #define PHY_BRCM_EXT_IBND_TX_ENABLE0x2000 > > #define PHY_BRCM_CLEAR_RGMII_MODE 0x4000 > > #define PHY_BRCM_DIS_TXCRXC_NOENRGY0x8000 > > +#define

Re: [PATCH v3 0/6] add NS2 support to bgmac

2016-11-01 Thread Jon Mason
On Tue, Nov 01, 2016 at 11:01:19AM -0700, Scott Branden wrote: > Hi Jon, > > On 16-11-01 10:51 AM, Jon Mason wrote: > >Changes in v3: > >* Clean-up the bgmac DT binding doc (per Rob Herring) > >* Document the lane swap binding and make it generic (Per Andrew Lunn) > Where is the documentation of

Re: [PATCH v2 net-next] tcp: enhance tcp collapsing

2016-11-01 Thread Neal Cardwell
On Tue, Nov 1, 2016 at 1:53 PM, Eric Dumazet wrote: > From: Eric Dumazet > > As Ilya Lesokhin suggested, we can collapse two skbs at retransmit > time even if the skb at the right has fragments. > > We simply have to use more generic skb_copy_bits()

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Tom Herbert
On Tue, Nov 1, 2016 at 12:11 PM, Thomas Graf wrote: > On 1 November 2016 at 11:51, Tom Herbert wrote: >> On Tue, Nov 1, 2016 at 11:20 AM, Thomas Graf wrote: >>> The headers cannot be extended or reduced so the offsets always remain >>>

Re: [PATCH] [RFC] net: phy: phy drivers should not set SUPPORTED_Pause or SUPPORTED_Asym_Pause

2016-11-01 Thread Timur Tabi
On 11/01/2016 02:03 PM, Florian Fainelli wrote: The standard (IEEE Std 802.3-2008) describes this as the Auto-negotiation advertisement register and these bits are part of the Technology ability field register. These two bits A5 (PAUSE operation for full duplex links) and A6 (Asymetric PAUSE

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 11:51, Tom Herbert wrote: > On Tue, Nov 1, 2016 at 11:20 AM, Thomas Graf wrote: >> The headers cannot be extended or reduced so the offsets always remain >> correct. What can happen is that the header contains invalid data. >> > If we

Re: [PATCH 2/2] net: qcom/emac: enable flow control if requested

2016-11-01 Thread Timur Tabi
On 11/01/2016 01:30 PM, Timur Tabi wrote: + if (!phydev->pause && phydev->asym_pause) + mac |= TXFC; I think this might be wrong, and nb8800_pause_config() has it right. This should be: if (!phydev->pause != !phydev->asym_pause) which is a logical-xor. Do you

Re: [PATCH] [RFC] net: phy: phy drivers should not set SUPPORTED_Pause or SUPPORTED_Asym_Pause

2016-11-01 Thread Florian Fainelli
On 11/01/2016 11:45 AM, Timur Tabi wrote: > Florian Fainelli wrote: >> So in premise, this is good, and is exactly what I have in mind for the >> series that I am cooking, but if we apply this alone, without a change >> in drivers/net/phy/phy.c which adds SUPPORTED_Pause | >> SUPPORTED_AsymPause

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 03:54, Hannes Frederic Sowa wrote: > I do fear the complexity and debugability introduced by this patch set > quite a bit. What is the complexity concern? This is pretty straight forward. I agree on debugability. This is being worked on

Re: new kmemleak reports (was: Re: [PATCH 0/5] genetlink improvements)

2016-11-01 Thread Jakub Kicinski
On Tue, 1 Nov 2016 11:32:52 -0700, Cong Wang wrote: > On Tue, Nov 1, 2016 at 10:28 AM, Jakub Kicinski wrote: > > unreferenced object 0x8807389cba28 (size 128): > > comm "swapper/0", pid 1, jiffies 4294898463 (age 781.332s) > > hex dump (first 32 bytes): > > 6b 6b 6b 6b

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Tom Herbert
On Tue, Nov 1, 2016 at 11:20 AM, Thomas Graf wrote: > On 1 November 2016 at 09:17, Tom Herbert wrote: >> On Mon, Oct 31, 2016 at 5:37 PM, Thomas Graf wrote: >>> {Open question: >>> Tom brought up the question on whether it is safe to modify

Re: Why do we need tasklet in IFB?

2016-11-01 Thread Michael Ma
2016-11-01 4:38 GMT-07:00 Jamal Hadi Salim : > On 16-10-31 02:10 PM, David Miller wrote: >> >> From: Michael Ma >> Date: Mon, 31 Oct 2016 11:02:28 -0700 >> >>> 2016-10-28 14:52 GMT-07:00 Michael Ma : 2016-10-28 14:48 GMT-07:00

Re: [PATCH v3 2/6] net: phy: broadcom: Add BCM54810 PHY entry

2016-11-01 Thread Andrew Lunn
Hi Jon > @@ -56,6 +57,8 @@ > #define PHY_BRCM_EXT_IBND_TX_ENABLE 0x2000 > #define PHY_BRCM_CLEAR_RGMII_MODE0x4000 > #define PHY_BRCM_DIS_TXCRXC_NOENRGY 0x8000 > +#define PHY_BRCM_EXP_LANE_SWAP 0x0001 > + You define this, but don't use it... Andrew

Re: [PATCH] [RFC] net: phy: phy drivers should not set SUPPORTED_Pause or SUPPORTED_Asym_Pause

2016-11-01 Thread Timur Tabi
Florian Fainelli wrote: So in premise, this is good, and is exactly what I have in mind for the series that I am cooking, but if we apply this alone, without a change in drivers/net/phy/phy.c which adds SUPPORTED_Pause | SUPPORTED_AsymPause to phydev->features, we are basically breaking the

Re: [E1000-devel] ixgbe 4.4.6 detected crash

2016-11-01 Thread Alexander Duyck
On Tue, Nov 1, 2016 at 8:16 AM, Matias Vara wrote: > Hi everyone, I am facing an issue with the ixgbe 10G Network card version > 4.4.6. I am in XenServer which is based on CentOS and the issue only appers > on FCOE machines. I am getting the following message during crash:

[PATCH 0/2] net: qcom/emac: the emac driver requires pause frames

2016-11-01 Thread Timur Tabi
The qcom emac driver experiences significant packet loss (through frame check sequence errors) if flow control is not enabled and the phy is not configured to allow pause frames to pass through it. Therefore, we need to force enable flow control and force the phy to pass pause frames. --

Re: [PATCH] [RFC] net: phy: phy drivers should not set SUPPORTED_Pause or SUPPORTED_Asym_Pause

2016-11-01 Thread Florian Fainelli
On 11/01/2016 10:18 AM, Timur Tabi wrote: > Pause frames are a feature that is supported by the MAC. It is the MAC > that generates the frames and that processes them. Thy PHY can only be > configured to allow them to pass. Therefore, pause frame support in the > PHY should only be enabled if

Re: [PATCH 2/2] net: qcom/emac: enable flow control if requested

2016-11-01 Thread Florian Fainelli
On 11/01/2016 11:30 AM, Timur Tabi wrote: > If the PHY has been configured to allow pause frames, then the MAC > should be configured to generate and/or accept those frames. > > Signed-off-by: Timur Tabi Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH 1/2] net: qcom/emac: configure the external phy to allow pause frames

2016-11-01 Thread Timur Tabi
Timur Tabi wrote: Pause frames are used to enable flow control. A MAC can send and receive pause frames in order to throttle traffic. However, the PHY must be configured to allow those frames to pass through. Signed-off-by: Timur Tabi Ugh, I forgot to include an

Re: [PATCH 1/2] net: qcom/emac: configure the external phy to allow pause frames

2016-11-01 Thread Florian Fainelli
On 11/01/2016 11:30 AM, Timur Tabi wrote: > Pause frames are used to enable flow control. A MAC can send and > receive pause frames in order to throttle traffic. However, the PHY > must be configured to allow those frames to pass through. > > Signed-off-by: Timur Tabi

Re: new kmemleak reports (was: Re: [PATCH 0/5] genetlink improvements)

2016-11-01 Thread Cong Wang
On Tue, Nov 1, 2016 at 10:28 AM, Jakub Kicinski wrote: > unreferenced object 0x8807389cba28 (size 128): > comm "swapper/0", pid 1, jiffies 4294898463 (age 781.332s) > hex dump (first 32 bytes): > 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b >

[PATCH 1/2] net: qcom/emac: configure the external phy to allow pause frames

2016-11-01 Thread Timur Tabi
Pause frames are used to enable flow control. A MAC can send and receive pause frames in order to throttle traffic. However, the PHY must be configured to allow those frames to pass through. Signed-off-by: Timur Tabi --- drivers/net/ethernet/qualcomm/emac/emac-mac.c | 6

[PATCH 2/2] net: qcom/emac: enable flow control if requested

2016-11-01 Thread Timur Tabi
If the PHY has been configured to allow pause frames, then the MAC should be configured to generate and/or accept those frames. Signed-off-by: Timur Tabi --- drivers/net/ethernet/qualcomm/emac/emac-mac.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

2016-11-01 Thread Thomas Graf
On 1 November 2016 at 09:17, Tom Herbert wrote: > On Mon, Oct 31, 2016 at 5:37 PM, Thomas Graf wrote: >> {Open question: >> Tom brought up the question on whether it is safe to modify the packet >> in artbirary ways before dst_output(). This is the

Re: [PATCH] net/mlx5: Simplify a test

2016-11-01 Thread David Miller
From: Matan Barak Date: Tue, 1 Nov 2016 11:38:18 +0200 > On 01/11/2016 09:10, Christophe JAILLET wrote: >> 'create_root_ns()' does not return an error pointer, so the test can >> be >> simplified to be more consistent. >> >> Signed-off-by: Christophe JAILLET

SNMP read-write MIBs

2016-11-01 Thread Murali Karicheri
Hello netdev experts, I am investigating the requirements to support hsr/prp SNMP functions in kernel. Based on my investigation so far, the kernel include file include/net/snmp.h defines all of the SNMP MIBS related defines and structures. But the MIBs are read-only type MIBs. Is there any

Re: [PATCH net-next] sctp: clean up sctp_packet_transmit

2016-11-01 Thread Neil Horman
On Tue, Nov 01, 2016 at 12:49:41AM +0800, Xin Long wrote: > After adding sctp gso, sctp_packet_transmit is a quite big function now. > > This patch is to extract the codes for packing packet to sctp_packet_pack > from sctp_packet_transmit, and add some comments, simplify the err path by > freeing

Re: [PATCH v3 0/6] add NS2 support to bgmac

2016-11-01 Thread Scott Branden
Hi Jon, On 16-11-01 10:51 AM, Jon Mason wrote: Changes in v3: * Clean-up the bgmac DT binding doc (per Rob Herring) * Document the lane swap binding and make it generic (Per Andrew Lunn) Where is the documentation of the lane swap binding? Changes in v2: * Remove the PHY power-on (per

Re: [PATCH] net/mlx5: Simplify a test

2016-11-01 Thread Matan Barak
On 01/11/2016 09:10, Christophe JAILLET wrote: 'create_root_ns()' does not return an error pointer, so the test can be simplified to be more consistent. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +- 1 file

[PATCH v3 2/6] net: phy: broadcom: Add BCM54810 PHY entry

2016-11-01 Thread Jon Mason
The BCM54810 PHY requires some semi-unique configuration, which results in some additional configuration in addition to the standard config. Also, some users of the BCM54810 require the PHY lanes to be swapped. Since there is no way to detect this, add a device tree query to see if it is

[PATCH v3 4/6] net: ethernet: bgmac: device tree phy enablement

2016-11-01 Thread Jon Mason
Change the bgmac driver to allow for phy's defined by the device tree Signed-off-by: Jon Mason --- drivers/net/ethernet/broadcom/bgmac-bcma.c | 48 drivers/net/ethernet/broadcom/bgmac-platform.c | 48 +++-

  1   2   3   >