Re: [PATCH net-next v6 3/3] A Sample of using socket cookie and uid for traffic monitoring

2017-03-20 Thread Alexei Starovoitov
On Mon, Mar 20, 2017 at 09:08:57PM -0700, Chenbo Feng wrote: > From: Chenbo Feng > > Add a sample program to demostrate the possible usage of > get_socket_cookie and get_socket_uid helper function. The program will > store bytes and packets counting of in/out traffic monitored

Re: [PATCHv2 net-next 2/7] sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter

2017-03-20 Thread Xin Long
On Tue, Mar 21, 2017 at 2:04 AM, Marcelo Ricardo Leitner wrote: > On Fri, Mar 10, 2017 at 12:11:07PM +0800, Xin Long wrote: >> This patch is to implement Receiver-Side Procedures for the SSN/TSN >> Reset Request Parameter described in rfc6525 section 6.2.4. >> >> The

Re: [PATCH net-next v6 2/3] Add a eBPF helper function to retrieve socket uid

2017-03-20 Thread Alexei Starovoitov
On Mon, Mar 20, 2017 at 09:08:56PM -0700, Chenbo Feng wrote: > From: Chenbo Feng > > Returns the owner uid of the socket inside a sk_buff. This is useful to > perform per-UID accounting of network traffic or per-UID packet > filtering. The socket need to be a fullsock otherwise

[PATCH net-stable] ipv4: keep skb->dst around in presence of IP options

2017-03-20 Thread Eric Dumazet
From: Eric Dumazet Upstream commit 34b2cef20f19c87999fff3da4071e66937db9644 ("ipv4: keep skb->dst around in presence of IP options") incorrectly root caused commit d826eb14ecef ("ipv4: PKTINFO doesnt need dst reference") as bug origin. This patch should fix the issue for

[PATCH net-next 2/8] skb_array: introduce batch dequeuing

2017-03-20 Thread Jason Wang
Signed-off-by: Jason Wang --- include/linux/skb_array.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index f4dfade..90e44b9 100644 --- a/include/linux/skb_array.h +++

[PATCH net-next 5/8] tun: support receiving skb through msg_control

2017-03-20 Thread Jason Wang
This patch makes tun_recvmsg() can receive from skb from its caller through msg_control. Vhost_net will be the first user. Signed-off-by: Jason Wang --- drivers/net/tun.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git

[PATCH net-next 7/8] vhost_net: try batch dequing from skb array

2017-03-20 Thread Jason Wang
We used to dequeue one skb during recvmsg() from skb_array, this could be inefficient because of the bad cache utilization and spinlock touching for each packet. This patch tries to batch them by calling batch dequeuing helpers explicitly on the exported skb array and pass the skb back through

[PATCH net-next 3/8] tun: export skb_array

2017-03-20 Thread Jason Wang
This patch exports skb_array through tun_get_skb_array(). Caller can then manipulate skb array directly. Signed-off-by: Jason Wang --- drivers/net/tun.c | 13 + include/linux/if_tun.h | 5 + 2 files changed, 18 insertions(+) diff --git

[PATCH net-next 8/8] vhost_net: use lockless peeking for skb array during busy polling

2017-03-20 Thread Jason Wang
For the socket that exports its skb array, we can use lockless polling to avoid touching spinlock during busy polling. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/net.c

[PATCH net-next 4/8] tap: export skb_array

2017-03-20 Thread Jason Wang
This patch exports skb_array through tap_get_skb_array(). Caller can then manipulate skb array directly. Signed-off-by: Jason Wang --- drivers/net/tap.c | 13 + include/linux/if_tap.h | 5 + 2 files changed, 18 insertions(+) diff --git

[PATCH net-next 0/8] vhost-net rx batching

2017-03-20 Thread Jason Wang
Hi all: This series tries to implement rx batching for vhost-net. This is done by batching the dequeuing from skb_array which was exported by underlayer socket and pass the sbk back through msg_control to finish userspace copying. Tests shows at most 19% improvment on rx pps. Please review.

[PATCH net-next 6/8] tap: support receiving skb from msg_control

2017-03-20 Thread Jason Wang
This patch makes tap_recvmsg() can receive from skb from its caller through msg_control. Vhost_net will be the first user. Signed-off-by: Jason Wang --- drivers/net/tap.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/tap.c

[PATCH net-next v6 2/3] Add a eBPF helper function to retrieve socket uid

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Returns the owner uid of the socket inside a sk_buff. This is useful to perform per-UID accounting of network traffic or per-UID packet filtering. The socket need to be a fullsock otherwise overflowuid is returned. Signed-off-by: Chenbo Feng

[PATCH net-next v6 1/3] Add a helper function to get socket cookie in eBPF

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Retrieve the socket cookie generated by sock_gen_cookie() from a sk_buff with a known socket. Generates a new cookie if one was not yet set.If the socket pointer inside sk_buff is NULL, 0 is returned. The helper function coud be useful in monitoring per socket

[PATCH net-next v6 0/3] net: core: Two Helper function about socket information

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Introduce two eBpf helper function to get the socket cookie and socket uid for each packet. The helper function is useful when the *sk field inside sk_buff is not empty. These helper functions can be used on socket and uid based traffic monitoring programs.

[PATCH net-next v6 3/3] A Sample of using socket cookie and uid for traffic monitoring

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Add a sample program to demostrate the possible usage of get_socket_cookie and get_socket_uid helper function. The program will store bytes and packets counting of in/out traffic monitored by iptables and store the stats in a bpf map in per socket base. The

[PATCH net-next 1/2] net: dwc-xlgmac: declaration of dual license in headers

2017-03-20 Thread Jie Deng
This patch adds declaration of dual license in file headers. Signed-off-by: Jie Deng --- drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 6 ++ drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 6 ++ drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c | 6 ++

[PATCH net-next 2/2] net: dwc-xlgmac: add module license

2017-03-20 Thread Jie Deng
Fix the warning about missing MODULE_LICENSE(). Signed-off-by: Jie Deng --- drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-common.c

Re: [PATCH 2/2] [net-next] net: dwc-xlgmac: add module license

2017-03-20 Thread Jie Deng
On 2017/3/20 16:51, Arnd Bergmann wrote: > When building the driver as a module, we get a warning about the > lack of a license: > > WARNING: modpost: missing MODULE_LICENSE() in > drivers/net/ethernet/synopsys/dwc-xlgmac.o > see include/linux/module.h for more information > > Curiously the text

Re: [PATCH 1/2] [net-next] net: dwc-xlgmac: include dcbnl.h

2017-03-20 Thread Jie Deng
On 2017/3/20 16:51, Arnd Bergmann wrote: > Without this header, we can run into a build error: > > drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c: In function > 'xlgmac_config_queue_mapping': > drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c:1548:36: error: > 'IEEE_8021QAZ_MAX_TCS' undeclared

Re: [PATCH net-next v4 1/2]L2TP:Adjust intf MTU, add underlay L3, L2 hdrs

2017-03-20 Thread R. Parameswaran
Hi James, Thanks for the response and suggestions, please see inline: On Mon, 20 Mar 2017, James Chapman wrote: > The patch comment of each patch should represent the changes of the > patch. You seem to be using a common description for your two commits > and this will look out of place when

[PATCH net-next] liquidio: fix Coverity scan errors

2017-03-20 Thread Felix Manlunas
Fix Coverity scan errors by not dereferencing lio->glists_dma_base pointer if it's NULL. See http://marc.info/?l=linux-netdev=149002294305614=2 Reported-by: Stephen Hemminger Signed-off-by: Felix Manlunas Signed-off-by: VSR Burru

Re: [PATCH] enic: Store permanent MAC address during probe()

2017-03-20 Thread Govindarajulu Varadarajan
On Mon, 20 Mar 2017, PJ Waskiewicz wrote: On Mon, Mar 20, 2017 at 5:33 PM, Govindarajulu Varadarajan wrote: On Mon, 20 Mar 2017, PJ Waskiewicz wrote: From: PJ Waskiewicz The permanent MAC address is useful to store for things like ethtool, and

[PATCH net v3 1/1] net: tcp: Permit user set TCP_MAXSEG to default value

2017-03-20 Thread fgao
From: Gao Feng When user_mss is zero, it means use the default value. But the current codes don't permit user set TCP_MAXSEG to the default value. It would return the -EINVAL when val is zero. Signed-off-by: Gao Feng --- v3: Correct the logic error, per Neal

Re: [PATCH net v2 1/1] net: tcp: Permit user set TCP_MAXSEG to default value

2017-03-20 Thread Feng Gao
On Tue, Mar 21, 2017 at 9:23 AM, Neal Cardwell wrote: > On Mon, Mar 20, 2017 at 8:45 PM, wrote: >> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c >> index 1e319a5..4f7f163 100644 >> --- a/net/ipv4/tcp.c >> +++ b/net/ipv4/tcp.c >> @@ -2470,7 +2470,7 @@ static

Re: [PATCH net v2 1/1] net: tcp: Permit user set TCP_MAXSEG to default value

2017-03-20 Thread Neal Cardwell
On Mon, Mar 20, 2017 at 8:45 PM, wrote: > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > index 1e319a5..4f7f163 100644 > --- a/net/ipv4/tcp.c > +++ b/net/ipv4/tcp.c > @@ -2470,7 +2470,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, > /* Values

RE: [PATCH] bna: integer overflow bug in debugfs

2017-03-20 Thread Mody, Rasesh
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Friday, March 17, 2017 1:53 PM > > We could allocate less memory than intended because we do: > > bnad->regdata = kzalloc(len << 2, GFP_KERNEL); > > The shift can overflow leading to a crash. This is debugfs code so the

Re: [PATCH v2 04/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner syscon

2017-03-20 Thread Rob Herring
On Tue, Mar 14, 2017 at 03:18:40PM +0100, Corentin Labbe wrote: > Signed-off-by: Corentin Labbe > --- > .../devicetree/bindings/misc/allwinner,syscon.txt | 19 > +++ > 1 file changed, 19 insertions(+) > create mode 100644 >

Re: [PATCH] enic: Store permanent MAC address during probe()

2017-03-20 Thread Govindarajulu Varadarajan
On Mon, 20 Mar 2017, PJ Waskiewicz wrote: From: PJ Waskiewicz The permanent MAC address is useful to store for things like ethtool, and when bonding with modes such as active/passive or LACP. Hi Peter, Is this patch fixing an issue with bonding drive on enic? This

[PATCH net v2 1/1] net: tcp: Permit user set TCP_MAXSEG to default value

2017-03-20 Thread fgao
From: Gao Feng When user_mss is zero, it means use the default value. But the current codes don't permit user set TCP_MAXSEG to the default value. It would return the -EINVAL when val is zero. Signed-off-by: Gao Feng --- v2: Make codes more clearer, per Eric

Re: [PATCH] enic: Store permanent MAC address during probe()

2017-03-20 Thread PJ Waskiewicz
On Mon, Mar 20, 2017 at 5:33 PM, Govindarajulu Varadarajan wrote: > On Mon, 20 Mar 2017, PJ Waskiewicz wrote: > >> From: PJ Waskiewicz >> >> The permanent MAC address is useful to store for things like ethtool, >> and when bonding with modes such as

Re: PROBLEM: null-ptr deref in ip_options_echo may lead to denial of service

2017-03-20 Thread Ben Hutchings
On Tue, 2017-03-21 at 00:33 +, Ben Hutchings wrote: > On Sun, 2017-03-19 at 22:25 -0700, Eric Dumazet wrote: > > On Mon, 2017-03-20 at 12:59 +0800, Anarcheuz Fritz wrote: > > > Hi David, > > > > > > > > > While working on some legacy kernel I stumbled upon a null-ptr deref in > > >

Re: PROBLEM: null-ptr deref in ip_options_echo may lead to denial of service

2017-03-20 Thread Ben Hutchings
On Sun, 2017-03-19 at 22:25 -0700, Eric Dumazet wrote: > On Mon, 2017-03-20 at 12:59 +0800, Anarcheuz Fritz wrote: > > Hi David, > > > > > > While working on some legacy kernel I stumbled upon a null-ptr deref in > > ip_options_echo. The bug has been verified on the latest version > > 3.2.87

[PATCH nf v3 1/1] netfilter: snmp: Fix one possible panic when snmp_trap_helper fail to register

2017-03-20 Thread fgao
From: Gao Feng In the commit 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp helper"), the snmp_helper is replaced by nf_nat_snmp_hook. So the snmp_helper is never registered. But it still tries to unregister the snmp_helper, it could cause the panic. Now remove the

Re: [PATCH nf v2 1/1] netfilter: snmp: Fix one possible panic when snmp_trap_helper fail to register

2017-03-20 Thread Feng Gao
On Tue, Mar 21, 2017 at 12:35 AM, Sergei Shtylyov wrote: > On 03/20/2017 01:15 PM, Feng Gao wrote: > From: Gao Feng In the commit <93557f53e1fb> ("netfilter: nf_conntrack: nf_conntrack snmp >>> >>> >>> >>>Angle brackets

Re: [PATCH] [v2, -net] cpsw/netcp: cpts depends on posix_timers

2017-03-20 Thread Nicolas Pitre
On Mon, 20 Mar 2017, Arnd Bergmann wrote: > With posix timers having become optional, we get a build error with > the cpts time sync option of the CPSW driver: > > drivers/net/ethernet/ti/cpts.c: In function 'cpts_find_ts': > drivers/net/ethernet/ti/cpts.c:291:23: error: implicit declaration of

Re: [Bridge] [PATCH net] bridge: ebtables: fix reception of frames DNAT-ed to bridge device

2017-03-20 Thread Linus Lüssing
On Sun, Mar 19, 2017 at 05:55:06PM +0100, Linus Lüssing wrote: > On Fri, Mar 17, 2017 at 02:10:44PM +0100, Pablo Neira Ayuso wrote: > > Wait. > > > > May this break local multicast listener that are bound to the bridge > > interface? Assuming the bridge interface got an IP address, and that > >

[net-next 07/13] i40e: exit ATR mode only when adding TCP/IPv4 filter succeeds

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller Move ATR exit check after we have sent the TCP/IPv4 filter to the ring successfully. This avoids an issue where we potentially update the filter count without actually succeeding in adding the filter. Now, we only increment the fd_tcp_rule after we've

[net-next 09/13] i40e: reset fd_tcp_rule count when restoring filters

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller Since we're about to reprogram the filters, we need to ensure that the fd_tcp_rule count is correctly reset to 0. Otherwise, we will keep a stale count that does not accurately reflect the number of programmed TCPv4 filters. Signed-off-by: Jacob

[net-next 00/13][pull request] 40GbE Intel Wired LAN Driver Updates 2017-03-20

2017-03-20 Thread Jeff Kirsher
This series contains updates to i40e and i40evf only. Philippe Reynes updates i40e and i40evf to use the new ethtool API for {get|set}_link_ksettings. Jake provides the remaining patches in the series, starting with a fix for i40e where the firmware expected the port numbers for the offloaded

[net-next 01/13] i40e: use new api ethtool_{get|set}_link_ksettings

2017-03-20 Thread Jeff Kirsher
From: 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 Tested-by:

[net-next 03/13] i40e: send correct port number to AdminQ when enabling UDP tunnels

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller The firmware expects the port numbers for offloaded UDP tunnels in Little Endian format. We accidentally sent the value in Big Endian format which obviously will cause the wrong port number to be put into the UDP tunnels list. This results in VxLAN

[net-next 11/13] i40e: add counters for UDP/IPv4 and IPv4 filters

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller In preparation for adding code to properly check the mask values, we will need to know the number of active filters for each type. Add counters for each filter type. Rename the already existing fd_tcp_rule to fd_tcp4_filter_cnt to match the style of

[net-next 02/13] i40evf: use new api ethtool_{get|set}_link_ksettings

2017-03-20 Thread Jeff Kirsher
From: 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 Tested-by:

[net-next 04/13] i40e: don't use arrays for (src|dst)_ip

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller The code originally included src_ip and dst_ip with enough space to support ipv6 filters. However, no actual support for ipv6 filters has been implemented. Thus, remove the arrays and just use __be32 values. Should ipv6 support be added in the future,

[net-next 13/13] i40e: always remove old filter when adding new FDir filter

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller The previous code relied on i40e_match_fdir_input_set to determine when determining whether to free the old filter. Change this code so that we simply unconditionally delete the old filter, even if it's identical to the new filter. This ensures that

[net-next 10/13] i40e: don't re-enable ATR when flushing filters if SB has TCP4/IPv4 rules

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller When flushing and replaying FDIR filters, it is possible we would disable ATR, and then re-enable it even though we should have kept it disabled due to existing TCP/IPv4 filters. Fix this by checking whether we have TCP4/IPv4 filters before

[net-next 12/13] i40e: explicitly fail on extended MAC field for ethtool_rx_flow_spec

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller Although we will fail the filter later due to checking flow_type which will have a bogus invalid type, it is possible future refactoring will remove this hidden failure case. Avoid a possible issue in the future by explicitly checking the flow type at

[net-next 05/13] i40e: rework exit flow of i40e_add_fdir_ethtool

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller Refactor the exit flow of the i40e_add_fdir_ethtool function. Move the input_label to the end of the function, removing the dependency on having a non-zero return value. Add a comment explaining why it is ok not to free the fdir data structure,

[net-next 06/13] i40e: return immediately when failing to add fdir filter

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller Instead of setting err=true and checking this to determine when to free the raw_packet near the end of the function, simply kfree and return immediately. The resulting code is a bit cleaner and has one less variable. This also resolves a subtle bug in

[net-next 08/13] i40e: remove redundant check for fd_tcp_rule when restoring filters

2017-03-20 Thread Jeff Kirsher
From: Jacob Keller i40e_fdir_filter_restore re-adds all existing filters, which already checks when adding a TCPv4 filter to disable ATR. We don't need to make the check twice, so remove this redundant code. Change-ID: Ia0b0690e23523915199d601494557def135c9d7f

[PATCH 3/3] soc: qcom: smd-rpm: Add msm8996 compatibility

2017-03-20 Thread Bjorn Andersson
With the RPM driver transitioned to RPMSG we can reuse the SMD-RPM driver ontop of GLINK for 8996, without any modifications. Signed-off-by: Bjorn Andersson --- drivers/soc/qcom/smd-rpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/smd-rpm.c

[PATCH 1/3] soc: qcom: smd: Transition client drivers from smd to rpmsg

2017-03-20 Thread Bjorn Andersson
By moving these client drivers to use RPMSG instead of the direct SMD API we can reuse them ontop of the newly added GLINK wire-protocol support found in the 820 and 835 Qualcomm platforms. As the new (RPMSG-based) and old SMD implementations are mutually exclusive we have to change all client

[PATCH 2/3] soc: qcom: smd: Remove standalone driver

2017-03-20 Thread Bjorn Andersson
Remove the standalone SMD implementation as we have transitioned the client drivers to use the RPMSG based one. Also remove all dependencies on QCOM_SMD from Kconfig files, in order to keep them selectable in the absence of the removed symbol. Signed-off-by: Bjorn Andersson

[net-next sample action optimization v4 1/4] openvswitch: Deferred fifo API change.

2017-03-20 Thread Andy Zhou
add_deferred_actions() API currently requires actions to be passed in as a fully encoded netlink message. So far both 'sample' and 'recirc' actions happens to carry actions as fully encoded netlink messages. However, this requirement is more restrictive than necessary, future patch will need to

[net-next sample action optimization v4 0/4]

2017-03-20 Thread Andy Zhou
The sample action can be used for translating Openflow 'clone' action. However its implementation has not been sufficiently optimized for this use case. This series attempts to close the gap. Patch 3 commit message has more details on the specific optimizations implemented. --- v3->v4: Enhance

[net-next sample action optimization v4 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-20 Thread Andy Zhou
Added clone_execute() that both the sample and the recirc action implementation can use. Signed-off-by: Andy Zhou --- net/openvswitch/actions.c | 176 -- 1 file changed, 93 insertions(+), 83 deletions(-) diff --git

RE: [Intel-wired-lan] [PATCH] i40e: fix memcpy with swapped arguments

2017-03-20 Thread Keller, Jacob E
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@lists.osuosl.org] On > Behalf Of Colin King > Sent: Monday, March 20, 2017 7:46 AM > To: Kirsher, Jeffrey T ; intel-wired- > l...@lists.osuosl.org; netdev@vger.kernel.org > Cc:

[net-next sample action optimization v4 2/4] openvswitch: Refactor recirc key allocation.

2017-03-20 Thread Andy Zhou
The logic of allocating and copy key for each 'exec_actions_level' was specific to execute_recirc(). However, future patches will reuse as well. Refactor the logic into its own function clone_key(). Signed-off-by: Andy Zhou Acked-by: Pravin B Shelar ---

[net-next sample action optimization v4 3/4] openvswitch: Optimize sample action for the clone use cases

2017-03-20 Thread Andy Zhou
With the introduction of open flow 'clone' action, the OVS user space can now translate the 'clone' action into kernel datapath 'sample' action, with 100% probability, to ensure that the clone semantics, which is that the packet seen by the clone action is the same as the packet seen by the action

Re: [PATCH net-next v5 2/3] Add a eBPF helper function to retrieve socket uid

2017-03-20 Thread Daniel Borkmann
On 03/20/2017 07:41 PM, Chenbo Feng wrote: From: Chenbo Feng Returns the owner uid of the socket inside a sk_buff. This is useful to perform per-UID accounting of network traffic or per-UID packet filtering. The socket need to be a fullsock otherwise overflowuid is returned.

Re: [PATCH net-next v5 3/3] A Sample of using socket cookie and uid for traffic monitoring

2017-03-20 Thread Daniel Borkmann
On 03/20/2017 07:41 PM, Chenbo Feng wrote: From: Chenbo Feng Add a sample program to demostrate the possible usage of get_socket_cookie and get_socket_uid helper function. The program will store bytes and packets counting of in/out traffic monitored by iptables and store the

Re: [PATCH net-next v5 1/3] Add a helper function to get socket cookie in eBPF

2017-03-20 Thread Daniel Borkmann
On 03/20/2017 07:41 PM, Chenbo Feng wrote: From: Chenbo Feng Retrieve the socket cookie generated by sock_gen_cookie() from a sk_buff with a known socket. Generates a new cookie if one was not yet set.If the socket pointer inside sk_buff is NULL, 0 is returned. The helper

Re: [PATCH net 1/1] net: tcp: Permit user set TCP_MAXSEG to default value

2017-03-20 Thread Eric Dumazet
On Tue, 2017-03-21 at 05:30 +0800, f...@ikuai8.com wrote: > From: Gao Feng > > When user_mss is zero, it means use the default value. But the current > codes don't permit user set TCP_MAXSEG to the default value. > It would return the -EINVAL when val is zero. > >

[PATCH] enic: Store permanent MAC address during probe()

2017-03-20 Thread PJ Waskiewicz
From: PJ Waskiewicz The permanent MAC address is useful to store for things like ethtool, and when bonding with modes such as active/passive or LACP. This follows the model of other Ethernet drivers, such as ixgbe. This was verified on a C220 chassis with the Cisco VNIC

Re: [net-next PATCH 1/2] net: Busy polling should ignore sender CPUs

2017-03-20 Thread Eric Dumazet
On Mon, 2017-03-20 at 14:48 -0700, Alexander Duyck wrote: > From: Alexander Duyck > > This patch is a cleanup/fix for NAPI IDs following the changes that made it > so that sender_cpu and napi_id were doing a better job of sharing the same > location in the sk_buff. >

Re: [PATCH v2 03/20] ARM: sun8i: dt: Add DT bindings documentation for Allwinner dwmac-sun8i

2017-03-20 Thread Rob Herring
On Tue, Mar 14, 2017 at 03:18:39PM +0100, Corentin Labbe wrote: > This patch adds documentation for Device-Tree bindings for the > Allwinner dwmac-sun8i driver. "dt-bindings: net: ..." is the preferred subject prefix if you respin. > > Signed-off-by: Corentin Labbe

Re: [PATCH net-next 10/12] dt-bindings: net: document bcmgenet WoL interrupt

2017-03-20 Thread Rob Herring
On Mon, Mar 13, 2017 at 05:41:40PM -0700, Doug Berger wrote: > A third interrupt cell can be provided to optionally specify > the interrupt used for handling Wake on LAN events. > > Typically the wake up handling uses a separate interrupt > controller, so the interrupts-extended property is used

Re: [PATCH net-next] stmmac: call stmmac_init_phy from stmmac_dvr_probe

2017-03-20 Thread Florian Fainelli
On 03/20/2017 11:34 AM, Niklas Cassel wrote: > On 03/20/2017 06:43 PM, Florian Fainelli wrote: >> On 03/20/2017 10:29 AM, Niklas Cassel wrote: >>> From: Niklas Cassel >>> >>> It is usually possible to do >>> ethtool -s autoneg on >>> so that you trigger an autoneg before

Re: [PATCH 1/7] Documentation: dt: net: Update the ath9k binding for SoC devices

2017-03-20 Thread Rob Herring
On Mon, Mar 13, 2017 at 10:05:09PM +0100, Alban wrote: > The current binding only cover PCI devices so extend it for SoC devices. > > Most SoC platforms use an MTD partition for the calibration data > instead of an EEPROM. The qca,no-eeprom property was added to allow > loading the EEPROM content

Re: [net-next PATCH 2/2] tcp: Record Rx hash and NAPI ID in tcp_child_process

2017-03-20 Thread Eric Dumazet
On Mon, Mar 20, 2017 at 2:48 PM, Alexander Duyck wrote: > From: Alexander Duyck > > While working on some recent busy poll changes we found that child sockets > were being instantiated without NAPI ID being set. In our first attempt to >

Re: [PATCH net v2] net: Do not hold the reference for the same sk_rx_dst

2017-03-20 Thread Kaiwen Xu
On Sun, Mar 19, 2017 at 09:09:38PM -0700, Cong Wang wrote: > On Sat, Mar 18, 2017 at 9:03 PM, Kaiwen Xu wrote: > > On Sat, Mar 18, 2017 at 08:49:43PM -0700, Cong Wang wrote: > >> On Sat, Mar 18, 2017 at 6:48 PM, Kevin Xu wrote: > >> > In some rare cases,

linux-next-20170320 breaks stmmac on meson (Amlogic S905GXBB)

2017-03-20 Thread Heiner Kallweit
As reported by Corentin Labbe before: stmmac in the latest next kernel is broken also on meson8b. The following commit seems to create the trouble: 6deee2221e11 "net: stmmac: prepare dma op mode config for multiple queues" I also get queue timeout errors. Rgds, Heiner

[net-next PATCH 0/2] NAPI ID fixups related to busy polling

2017-03-20 Thread Alexander Duyck
These two patches are a couple of minor clean-ups related to busy polling. The first one addresses the fact that we were trying to busy poll on sender_cpu values instead of true NAPI IDs. The second addresses the fact that there were a few paths where TCP sockets were being instanciated based on

[net-next PATCH 1/2] net: Busy polling should ignore sender CPUs

2017-03-20 Thread Alexander Duyck
From: Alexander Duyck This patch is a cleanup/fix for NAPI IDs following the changes that made it so that sender_cpu and napi_id were doing a better job of sharing the same location in the sk_buff. One issue I found is that we weren't validating the napi_id as being

[net-next PATCH 2/2] tcp: Record Rx hash and NAPI ID in tcp_child_process

2017-03-20 Thread Alexander Duyck
From: Alexander Duyck While working on some recent busy poll changes we found that child sockets were being instantiated without NAPI ID being set. In our first attempt to fix it, it was suggested that we should just pull programming the NAPI ID into the function

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

2017-03-20 Thread Philippe Reynes
Hi Xin Long, On 3/20/17, Xin Long wrote: > On Sat, Mar 18, 2017 at 7:13 PM, 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

Re: mlx5e backports for v4.9 -stable

2017-03-20 Thread Saeed Mahameed
On 03/17/2017 02:06 AM, David Miller wrote: > > Commits: > > > From b0d4660b4cc52e6477ca3a43435351d565dfcedc Mon Sep 17 00:00:00 2001 > From: Tariq Toukan > Date: Wed, 22 Feb 2017 17:20:14 +0200 > Subject: [PATCH] net/mlx5e: Fix broken CQE compression

[PATCH net 1/1] net: tcp: Permit user set TCP_MAXSEG to default value

2017-03-20 Thread fgao
From: Gao Feng When user_mss is zero, it means use the default value. But the current codes don't permit user set TCP_MAXSEG to the default value. It would return the -EINVAL when val is zero. Signed-off-by: Gao Feng --- net/ipv4/tcp.c | 3 ++- 1 file

Re: [net-next sample action optimization v3 4/4] Openvswitch: Refactor sample and recirc actions implementation

2017-03-20 Thread Andy Zhou
On Sat, Mar 18, 2017 at 12:22 PM, Pravin Shelar wrote: > On Thu, Mar 16, 2017 at 3:48 PM, Andy Zhou wrote: >> Added clone_execute() that both the sample and the recirc >> action implementation can use. >> >> Signed-off-by: Andy Zhou >> --- >>

Re: [PATCH net-next 0/2] netvsc: performance regressions in net-next

2017-03-20 Thread Stephen Hemminger
On Mon, 20 Mar 2017 13:28:03 -0700 Stephen Hemminger wrote: > Fix for performance regression introduced with NAPI change; > and followup cleanup of vmbus core code. > > Stephen Hemminger (2): > netvsc: fix NAPI performance regression > vmbus: no longer expose

[PATCH net-next 2/2] vmbus: no longer expose iterator internals

2017-03-20 Thread Stephen Hemminger
Since NAPI no longer needs to jump out of iterator early, no need to expose the internal iterator steps. Signed-off-by: Stephen Hemminger --- drivers/hv/ring_buffer.c | 51 include/linux/hyperv.h | 22

[PATCH net-next 1/2] netvsc: fix NAPI performance regression

2017-03-20 Thread Stephen Hemminger
When using NAPI, the single stream performance declined signifcantly because the poll routine was updating host after every burst of packets. This excess signalling caused host throttling. This fix restores the old behavior. Host is only signalled after the ring has been emptied. Signed-off-by:

[PATCH net-next 0/2] netvsc: performance regressions in net-next

2017-03-20 Thread Stephen Hemminger
Fix for performance regression introduced with NAPI change; and followup cleanup of vmbus core code. Stephen Hemminger (2): netvsc: fix NAPI performance regression vmbus: no longer expose iterator internals drivers/hv/ring_buffer.c| 51 +

Re: [PATCH net-next v4 2/2]L2TP:Adjust intf MTU, add underlay L3, L2 hdrs

2017-03-20 Thread R. Parameswaran
Hi James, Please see inline: On Mon, 20 Mar 2017, James Chapman wrote: > I suggest change the wording of the first paragraph in the patch comment > to better represent why the changes are being made. Perhaps something > like the following? > > "Existing L2TP kernel code does not derive the

linux-next-20170320 break stmmac on dwmac-sunxi

2017-03-20 Thread Corentin Labbe
Hello Just pushed next-20170320 to my boards and stmmac stop working on both intree dwmac-sunxi and my dev dwmac-sun8i. It seems that interrupts never fire, and transmit queue timeout. I will try to bisect this problem but perhaps other people could try to reproduce it. Regards Corentin Labbe

Re: "TCP: eth0: Driver has suspect GRO implementation, TCP performance may be compromised." message with "ethtool -K eth0 gro off"

2017-03-20 Thread Marcelo Ricardo Leitner
On Sun, Mar 19, 2017 at 12:20:26PM -0700, Eric Dumazet wrote: > On Sun, 2017-03-19 at 13:14 +0100, Markus Trippelsdorf wrote: > > On 2017.02.06 at 19:12 -0200, Marcelo Ricardo Leitner wrote: > > > On Fri, Feb 03, 2017 at 06:47:33AM -0800, Eric Dumazet wrote: > > > > On Fri, 2017-02-03 at 12:28

[PATCH] sock: introduce SO_MEMINFO getsockopt

2017-03-20 Thread Josh Hunt
Allows reading of SK_MEMINFO_VARS via socket option. This way an application can get all meminfo related information in single socket option call instead of multiple calls. Adds helper function, sk_get_meminfo(), and uses that for both getsockopt and sock_diag_put_meminfo(). Suggested by Eric

Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver

2017-03-20 Thread Akshay Bhat
Hi Wolfgang, On 03/20/2017 12:46 PM, Wolfgang Grandegger wrote: ..snip.. >> >> The top 3 bits of HI3110_READ_ERR (BUSOFF, TXERRP, RXERRP) are valid >> even if HI3110_INT_BUSERR is not set. > > I'm confused! If you disable BUSERR interrupts, you do not get the > status bits any longer, you said.

Re: [PATCH net] sctp: out_qlen should be updated when pruning unsent queue

2017-03-20 Thread Marcelo Ricardo Leitner
On Sat, Mar 18, 2017 at 08:03:59PM +0800, Xin Long wrote: > This patch is to fix the issue that sctp_prsctp_prune_sent forgot > to update q->out_qlen when removing a chunk from unsent queue. > > Fixes: 8dbdf1f5b09c ("sctp: implement prsctp PRIO policy") > Signed-off-by: Xin Long

[PATCH net-next v5 1/3] Add a helper function to get socket cookie in eBPF

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Retrieve the socket cookie generated by sock_gen_cookie() from a sk_buff with a known socket. Generates a new cookie if one was not yet set.If the socket pointer inside sk_buff is NULL, 0 is returned. The helper function coud be useful in monitoring per socket

[PATCH net-next v5 2/3] Add a eBPF helper function to retrieve socket uid

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Returns the owner uid of the socket inside a sk_buff. This is useful to perform per-UID accounting of network traffic or per-UID packet filtering. The socket need to be a fullsock otherwise overflowuid is returned. Signed-off-by: Chenbo Feng

[PATCH net-next v5 3/3] A Sample of using socket cookie and uid for traffic monitoring

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Add a sample program to demostrate the possible usage of get_socket_cookie and get_socket_uid helper function. The program will store bytes and packets counting of in/out traffic monitored by iptables and store the stats in a bpf map in per socket base. The

[PATCH net-next v5 0/3] net: core: Two Helper function about socket information

2017-03-20 Thread Chenbo Feng
From: Chenbo Feng Introduce two eBpf helper function to get the socket cookie and socket uid for each packet. The helper function is useful when the *sk field inside sk_buff is not empty. These helper functions can be used on socket and uid based traffic monitoring programs.

SCTP MSG_MORE code

2017-03-20 Thread David Laight
Something needs to be done with SCTP MSG_MORE before the end of the rc cycle. The current code is definitely broken. I objected to the last 'fix' patch because it clears the flag is a place where I don't think it is necessary to do so - so could generate extra ethernet frames. David

Re: [PATCH net-next] stmmac: call stmmac_init_phy from stmmac_dvr_probe

2017-03-20 Thread Niklas Cassel
On 03/20/2017 06:43 PM, Florian Fainelli wrote: > On 03/20/2017 10:29 AM, Niklas Cassel wrote: >> From: Niklas Cassel >> >> It is usually possible to do >> ethtool -s autoneg on >> so that you trigger an autoneg before calling >> ip link set dev eth0 up > This is

[PATCH net-next 1/2] net: vrf: performance improvements for IPv4

2017-03-20 Thread David Ahern
The VRF driver allows users to implement device based features for an entire domain. For example, a qdisc or netfilter rules can be attached to a VRF device or tcpdump can be used to view packets for all devices in the L3 domain. The device-based features come with a performance penalty, most

[PATCH net-next 0/2] net: vrf: performance improvements

2017-03-20 Thread David Ahern
Device based features for VRF such as qdisc, netfilter and packet captures are implemented by switching the dst on skbuffs to its per-VRF dst. This has the effect of controlling the output function which points a function in the VRF driver. [1] The skb proceeds down the stack with dst->dev

[PATCH net-next 2/2] net: vrf: performance improvements for IPv6

2017-03-20 Thread David Ahern
The VRF driver allows users to implement device based features for an entire domain. For example, a qdisc or netfilter rules can be attached to a VRF device or tcpdump can be used to view packets for all devices in the L3 domain. The device-based features come with a performance penalty, most

[PATCH 4.10 34/63] team: use ETH_MAX_MTU as max mtu

2017-03-20 Thread Greg Kroah-Hartman
4.10-stable review patch. If anyone has any objections, please let me know. -- From: Jarod Wilson [ Upstream commit 3331aa378e9bcbd0d16de9034b0c20f4050e26b4 ] This restores the ability to set a team device's mtu to anything higher than 1500. Similar to the

  1   2   3   >