[PATCH net] net: pktgen: fix pkt_size

2016-09-29 Thread Paolo Abeni
The commit 879c7220e828 ("net: pktgen: Observe needed_headroom of the device") increased the 'pkt_overhead' field value by LL_RESERVED_SPACE. As a side effect the generated packet size, computed as: /* Eth + IPh + UDPh + mpls */ datalen = pkt_dev->cur_pkt_size - 14 - 20 - 8 -

Re: [PATCH v2 net-next 4/5] xps_flows: XPS for packets that don't have a socket

2016-09-29 Thread Eric Dumazet
On Thu, 2016-09-29 at 10:08 -0400, Tom Herbert wrote: > It addresses the issue that Rick Jones pointed out was happening with > XPS. When packets are sent for a flow that has no socket and XPS is > enabled then each packet uses the XPS queue based on the running CPU. > Since the thread sending

Re: [PATCH v2 net-next 4/5] xps_flows: XPS for packets that don't have a socket

2016-09-29 Thread Tom Herbert
On Thu, Sep 29, 2016 at 12:54 AM, Eric Dumazet wrote: > On Wed, 2016-09-28 at 20:54 -0700, Tom Herbert wrote: >> xps_flows maintains a per device flow table that is indexed by the >> skbuff hash. The table is only consulted when there is no queue saved in >> a transmit

Re: [PATCH v2 net-next 4/5] xps_flows: XPS for packets that don't have a socket

2016-09-29 Thread Eric Dumazet
On Thu, 2016-09-29 at 08:53 -0400, Tom Herbert wrote: > On Thu, Sep 29, 2016 at 12:54 AM, Eric Dumazet wrote: > > On Wed, 2016-09-28 at 20:54 -0700, Tom Herbert wrote: > >> xps_flows maintains a per device flow table that is indexed by the > >> skbuff hash. The table is

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Eric Dumazet
On Thu, 2016-09-29 at 11:31 +0200, Paolo Abeni wrote: > On Wed, 2016-09-28 at 18:42 -0700, Eric Dumazet wrote: > > On Wed, 2016-09-28 at 12:52 +0200, Paolo Abeni wrote: > > > > > +static void udp_rmem_release(struct sock *sk, int partial) > > > +{ > > > + struct udp_sock *up = udp_sk(sk); > > > +

[NetDev] [ANNOUNCE] Netdev 1.2 program announced

2016-09-29 Thread Hajime Tazaki
Hello, The program of Linux netdev 1.2 is now online ! http://netdevconf.org/1.2/schedule.html As we stated, all of registered people is now in the mailing list, people at netdevconf.org. If you wish to communicate with the attendees of netdev 1.2, feel free to exchange messages. -- Hajime

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Eric Dumazet
On Thu, Sep 29, 2016 at 7:34 AM, Paolo Abeni wrote: > On Thu, 2016-09-29 at 07:13 -0700, Eric Dumazet wrote: >> On Thu, 2016-09-29 at 16:01 +0200, Paolo Abeni wrote: >> >> > When we reach __sk_mem_reduce_allocated() we are sure we can free the >> > specified amount of memory,

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Eric Dumazet
On Thu, 2016-09-29 at 16:01 +0200, Paolo Abeni wrote: > When we reach __sk_mem_reduce_allocated() we are sure we can free the > specified amount of memory, so we only need to ensure consistent > sk_prot->memory_allocated updates. The current atomic operation suffices > to this. Then why are you

Re: [PATCH RFC iproute2] iplink: Support envhdrlen

2016-09-29 Thread Jiri Benc
On Tue, 27 Sep 2016 17:55:40 +0900, Toshiaki Makita wrote: > This adds support for envhdrlen. > > Example: > # ip link set eno1 envhdrlen 8 I don't see why this should be user visible, let alone requiring user to set it. This should be transparent, kernel should compute the value as needed

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Paolo Abeni
On Thu, 2016-09-29 at 07:13 -0700, Eric Dumazet wrote: > On Thu, 2016-09-29 at 16:01 +0200, Paolo Abeni wrote: > > > When we reach __sk_mem_reduce_allocated() we are sure we can free the > > specified amount of memory, so we only need to ensure consistent > > sk_prot->memory_allocated updates.

Re: [PATCH v2 net-next 4/5] xps_flows: XPS for packets that don't have a socket

2016-09-29 Thread Tom Herbert
On Thu, Sep 29, 2016 at 9:18 AM, Eric Dumazet wrote: > On Thu, 2016-09-29 at 08:53 -0400, Tom Herbert wrote: >> On Thu, Sep 29, 2016 at 12:54 AM, Eric Dumazet >> wrote: >> > On Wed, 2016-09-28 at 20:54 -0700, Tom Herbert wrote: >> >> xps_flows

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Paolo Abeni
On Thu, 2016-09-29 at 06:24 -0700, Eric Dumazet wrote: > On Thu, 2016-09-29 at 11:31 +0200, Paolo Abeni wrote: > > On Wed, 2016-09-28 at 18:42 -0700, Eric Dumazet wrote: > > > On Wed, 2016-09-28 at 12:52 +0200, Paolo Abeni wrote: > > > > > > > +static void udp_rmem_release(struct sock *sk, int

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Paolo Abeni
On Thu, 2016-09-29 at 07:49 -0700, Eric Dumazet wrote: > On Thu, Sep 29, 2016 at 7:34 AM, Paolo Abeni wrote: > > On Thu, 2016-09-29 at 07:13 -0700, Eric Dumazet wrote: > >> On Thu, 2016-09-29 at 16:01 +0200, Paolo Abeni wrote: > >> > >> > When we reach

pull-request: wireless-drivers-next 2016-09-29

2016-09-29 Thread Kalle Valo
Hi Dave, this should be the last wireless-drivers-next pull request for 4.9, from now on only important bugfixes. Nothing really special stands out, iwlwifi being most active but other drivers also getting attention. More details in the signed tag. Please let me know if there are any problems.

Re: [PATCH v2 net-next 4/5] xps_flows: XPS for packets that don't have a socket

2016-09-29 Thread Eric Dumazet
On Thu, 2016-09-29 at 07:51 -0700, Eric Dumazet wrote: > On Thu, 2016-09-29 at 10:08 -0400, Tom Herbert wrote: > > > It addresses the issue that Rick Jones pointed out was happening with > > XPS. When packets are sent for a flow that has no socket and XPS is > > enabled then each packet uses the

Re: [PATCH RFC net-next] bnx2x: avoid printing unnecessary messages during register dump

2016-09-29 Thread Guilherme G. Piccoli
On 09/27/2016 11:43 PM, David Miller wrote: > From: "Guilherme G. Piccoli" > Date: Tue, 27 Sep 2016 15:33:54 -0300 > >> The bnx2x driver prints multiple error messages during register dump, >> with "ethtool -d" for example. The driver even warn that many messages

[PATCH net-next 06/10] net: dsa: mv88e6xxx: rename mv88e6xxx_vtu_stu_entry

2016-09-29 Thread Vivien Didelot
The STU (if the switch has one) is abstracted and accessed through the VTU operations and data registers. Thus rename the mv88e6xxx_vtu_stu_entry struct to mv88e6xxx_vtu_entry. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 46

Re: [PATCH v2 net-next 4/5] xps_flows: XPS for packets that don't have a socket

2016-09-29 Thread Rick Jones
On 09/29/2016 06:18 AM, Eric Dumazet wrote: Well, then what this patch series is solving ? You have a producer of packets running on 8 vcpus in a VM. Packets are exiting the VM and need to be queued on a mq NIC in the hypervisor. Flow X can be scheduled on any of these 8 vcpus, so XPS is

[PATCH net-next 08/10] net: dsa: mv88e6xxx: add chip-wide ops

2016-09-29 Thread Vivien Didelot
Introduce a mv88e6xxx_ops structure to describe supported chip-wide functions and assign the correct variant to the chip models. For the moment, add only PHY access routines. This allows to get rid of the PHY ops structures and the usage of PHY flags. Signed-off-by: Vivien Didelot

[PATCH net-next 10/10] net: dsa: mv88e6xxx: add eeprom ops

2016-09-29 Thread Vivien Didelot
Remove EEPROM flags in favor of new {get,set}_eeprom chip-wide functions in the mv88e6xxx_ops structure. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 34 +- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h |

[PATCH net-next 04/10] net: dsa: mv88e6xxx: expose mv88e6xxx_num_databases

2016-09-29 Thread Vivien Didelot
The mv88e6xxx_num_databases will be used by shared code, so move it inline to the header file. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 5 - drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 5 + 2 files changed, 5

Re: [PATCH net v2] L2TP:Adjust intf MTU,factor underlay L3,overlay L2

2016-09-29 Thread James Chapman
On 22/09/16 21:52, R. Parameswaran wrote: > From ed585bdd6d3d2b3dec58d414f514cd764d89159d Mon Sep 17 00:00:00 2001 > From: "R. Parameswaran" > Date: Thu, 22 Sep 2016 13:19:25 -0700 > Subject: [PATCH] L2TP:Adjust intf MTU,factor underlay L3,overlay L2 > > Take into account

Re: [PATCH net v2] L2TP:Adjust intf MTU,factor underlay L3,overlay L2

2016-09-29 Thread James Chapman
On 29/09/16 03:36, R. Parameswaran wrote: > I agree that something like 2. below would be needed in the long run (it > will need some effort and redesign -e.g. how do I lookup the parent tunnel > from the socket when receiving a PMTU update, existing pointer chain runs > from tunnel to socket).

[PATCH net-next 05/10] net: dsa: mv88e6xxx: add mv88e6xxx_num_ports helper

2016-09-29 Thread Vivien Didelot
Add an mv88e6xxx_num_ports helper instead of digging in the chip info structure. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 30 +++--- drivers/net/dsa/mv88e6xxx/global2.c | 8

[PATCH net-next 07/10] net: dsa: mv88e6xxx: rename mv88e6xxx_ops

2016-09-29 Thread Vivien Didelot
The mv88e6xxx_ops is used to describe how to access the chip registers. It can be through SMI (via an MDIO bus), or via another interface such as crafted remote management frames. The correct BUS operations structure is chosen at runtime, depending on the chip address and connectivity. We will

Re: [PATCH v2 3/3] net: make net namespace sysctls belong to container's owner

2016-09-29 Thread Dmitry Torokhov
Hi David, On Wed, Aug 10, 2016 at 2:36 PM, Dmitry Torokhov wrote: > If net namespace is attached to a user namespace let's make container's > root owner of sysctls affecting said network namespace instead of global > root. > > This also allows us to clean up

[PATCH net-next 09/10] net: dsa: mv88e6xxx: add set_switch_mac to ops

2016-09-29 Thread Vivien Didelot
Add a set_switch_mac chip-wide function to mv88e6xxx_ops and remove MV88E6XXX_FLAG_G2_SWITCH_MAC flags. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 28 +--- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 8

[PATCH net-next 00/10] net: dsa: mv88e6xxx: Global (1) cosmetics

2016-09-29 Thread Vivien Didelot
The Global (1) internal SMI device of Marvell switches is a set of registers providing support to different units for MAC addresses (ATU), VLANs (VTU), PHY polling (PPU), etc. Chips (like 88E6060) may use a different address for it, or have subtleties in the units (e.g. different number of

[PATCH net-next 03/10] net: dsa: mv88e6xxx: add flags for FID registers

2016-09-29 Thread Vivien Didelot
Add flags to describe the presence of Global 1 ATU FID register (0x01) and VTU FID register (0x02), instead of checking families. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 16 +++-

[PATCH net-next 01/10] net: dsa: mv88e6xxx: add global1 helpers

2016-09-29 Thread Vivien Didelot
The Global (1) internal SMI device is an extended set of registers containing ATU, PPU, VTU, STU, etc. It is present on every switches, usually at SMI address 0x1B. But old models such as 88E6060 access it at address 0xF, thus using REG_GLOBAL is erroneous. Add a global1_addr info member used by

[PATCH net-next 02/10] net: dsa: mv88e6xxx: abstract REG_GLOBAL2

2016-09-29 Thread Vivien Didelot
Similarly to the ports, phys, and Global SMI devices, abstract the SMI device address of the Global 2 registers in a few g2 static helpers. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/global2.c | 78 ++-

[PATCH net v2] tg3: Avoid NULL pointer dereference in tg3_io_error_detected()

2016-09-29 Thread Guilherme G. Piccoli
From: Milton Miller While the driver is probing the adapter, an error may occur before the netdev structure is allocated and attached to pci_dev. In this case, not only netdev isn't available, but the tg3 private structure is also not available as it is just math from the

[PATCH v6 6/7] ipv6: Remove useless parameter in __snmp6_fill_statsdev

2016-09-29 Thread Jia He
The parameter items(is always ICMP6_MIB_MAX) is useless for __snmp6_fill_statsdev Signed-off-by: Jia He --- net/ipv6/addrconf.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 2f1f5d4..35d4baa

[PATCH v6 3/7] proc: Reduce cache miss in snmp6_seq_show

2016-09-29 Thread Jia He
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He --- net/ipv6/proc.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-)

[PATCH v6 0/7] Reduce cache miss for snmp_fold_field

2016-09-29 Thread Jia He
In a PowerPc server with large cpu number(160), besides commit a3a773726c9f ("net: Optimize snmp stat aggregation by walking all the percpu data at once"), I watched several other snmp_fold_field callsites which would cause high cache miss rate. test source code: My simple test

[PATCH v6 7/7] net: Suppress the "Comparison to NULL could be written" warnings

2016-09-29 Thread Jia He
This is to suppress the checkpatch.pl warning "Comparison to NULL could be written". No functional changes here. Signed-off-by: Jia He --- net/ipv4/proc.c | 32 net/sctp/proc.c | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff

[PATCH v6 1/7] net:snmp: Introduce generic interfaces for snmp_get_cpu_field{,64}

2016-09-29 Thread Jia He
This is to introduce the generic interfaces for snmp_get_cpu_field{,64}. It exchanges the two for-loops for collecting the percpu statistics data. This can aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He Suggested-by: Marcelo

[PATCH v6 5/7] proc: Reduce cache miss in xfrm_statistics_seq_show

2016-09-29 Thread Jia He
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He --- net/xfrm/xfrm_proc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH v6 2/7] proc: Reduce cache miss in snmp_seq_show

2016-09-29 Thread Jia He
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Then snmp_seq_show is split into 2 parts to avoid build warning "the frame size" larger than 1024. Signed-off-by: Jia He ---

[PATCH v6 4/7] proc: Reduce cache miss in sctp_snmp_seq_show

2016-09-29 Thread Jia He
This is to use the generic interfaces snmp_get_cpu_field{,64}_batch to aggregate the data by going through all the items of each cpu sequentially. Signed-off-by: Jia He --- net/sctp/proc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

Re: [PATCH V2 for-next 0/8] Bug Fixes and Code Improvement in HNS driver

2016-09-29 Thread David Miller
From: Salil Mehta Date: Thu, 29 Sep 2016 18:09:08 +0100 > This patch-set introduces fix to some Bugs, potential problems > and code improvements identified during internal review and > testing of Hisilicon Network Subsystem driver. > > Submit Change > V1->V2: This

Re: [PATCH v1] mlx4: remove unused fields

2016-09-29 Thread David Miller
From: David Decotigny Date: Wed, 28 Sep 2016 11:00:04 -0700 > From: David Decotigny > > This also can address following UBSAN warnings: > [ 36.640343] > > [ 36.648772]

Re: [PATCH v8 0/8] thunderbolt: Introducing Thunderbolt(TM) Networking

2016-09-29 Thread David Miller
From: Amir Levy Date: Wed, 28 Sep 2016 17:44:22 +0300 > This driver enables Thunderbolt Networking on non-Apple platforms > running Linux. Greg, any idea where this should get merged once fully vetted? I can take it through the net-next tree, but I'm fine with another

Re: [PATCH net v2] L2TP:Adjust intf MTU,factor underlay L3,overlay L2

2016-09-29 Thread R. Parameswaran
Hi James, On Thu, 29 Sep 2016, James Chapman wrote: > On 22/09/16 21:52, R. Parameswaran wrote: > > From ed585bdd6d3d2b3dec58d414f514cd764d89159d Mon Sep 17 00:00:00 2001 > > From: "R. Parameswaran" > > Date: Thu, 22 Sep 2016 13:19:25 -0700 > > Subject: [PATCH]

Re: [PATCH] ipv6 addrconf: implement RFC7559 router solicitation backoff

2016-09-29 Thread David Miller
From: Maciej Żenczykowski Date: Tue, 27 Sep 2016 23:57:58 -0700 > From: Maciej Żenczykowski > > This implements: > https://tools.ietf.org/html/rfc7559 > > Backoff is performed according to RFC3315 section 14: >

Re: [PATCH v2 3/3] net: make net namespace sysctls belong to container's owner

2016-09-29 Thread David Miller
From: Dmitry Torokhov Date: Thu, 29 Sep 2016 08:46:05 -0700 > Hi David, > > On Wed, Aug 10, 2016 at 2:36 PM, Dmitry Torokhov > wrote: >> If net namespace is attached to a user namespace let's make container's >> root owner of sysctls

Re: [PATCH RFC net-next] bnx2x: avoid printing unnecessary messages during register dump

2016-09-29 Thread David Miller
From: "Guilherme G. Piccoli" Date: Thu, 29 Sep 2016 13:19:39 -0300 > David, thanks for your comment. I confess I didn't understand your > statement quite well. You say we shouldn't dump registers that will > cause timeouts, that's it? Yes, basically. If this

Re: [PATCH net-next 00/10] net: dsa: mv88e6xxx: Global (1) cosmetics

2016-09-29 Thread David Miller
From: Vivien Didelot Date: Thu, 29 Sep 2016 12:21:52 -0400 > The Global (1) internal SMI device of Marvell switches is a set of > registers providing support to different units for MAC addresses (ATU), > VLANs (VTU), PHY polling (PPU), etc. ... Looks like a

Re: pull-request: wireless-drivers-next 2016-09-29

2016-09-29 Thread David Miller
From: Kalle Valo Date: Thu, 29 Sep 2016 19:57:28 +0300 > this should be the last wireless-drivers-next pull request for 4.9, from > now on only important bugfixes. Nothing really special stands out, > iwlwifi being most active but other drivers also getting attention. More

Re: [PATCH net v2] tg3: Avoid NULL pointer dereference in tg3_io_error_detected()

2016-09-29 Thread David Miller
From: "Guilherme G. Piccoli" Date: Thu, 29 Sep 2016 13:24:08 -0300 > From: Milton Miller > > While the driver is probing the adapter, an error may occur before the > netdev structure is allocated and attached to pci_dev. In this case, > not only

Re: [PATCH net-next 0/6] rxrpc: Fixes and adjustments

2016-09-29 Thread David Miller
c-rewrite > > Tagged thusly: > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > rxrpc-rewrite-20160929 Pulled, thanks David.

[PATCH V2 for-next 8/8] net: hns: delete redundant broadcast packet filter process

2016-09-29 Thread Salil Mehta
From: Daode Huang The broadcast packets is filtered in the hardware now, so this process is no need in the driver, just delete it. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta

[PATCH V2 for-next 4/8] net: hns: delete repeat read fbd num after while

2016-09-29 Thread Salil Mehta
From: Daode Huang Because we handle the received packets after napi, so delete the checking before submitting. It delete the code of read the fbd number register, which reduces the cpu usages while receiving packets Signed-off-by: Daode Huang

[PATCH V2 for-next 6/8] net: hns: fix the bug of forwarding table

2016-09-29 Thread Salil Mehta
From: Daode Huang As the sub queue id in the broadcast forwarding table is always set to absolute queue 0 rather than the interface's relative queue 0, this will cause the received broadcast packets loopback to rcb. This patch sets the sub queue id to relative queue 0

Re: [PATCH -next] net: macb: fix missing unlock on error in macb_start_xmit()

2016-09-29 Thread Nicolas Ferre
Le 12/09/2016 à 19:40, Helmut Buchsbaum a écrit : > On 09/10/2016 01:17 PM, Wei Yongjun wrote: >> From: Wei Yongjun >> >> Fix missing unlock before return from function macb_start_xmit() >> in the error handling case. >> >> Fixes: 007e4ba3ee13 ("net: macb: initialize

[PATCH V2 for-next 2/8] net: hns: bug fix about setting coalsecs-usecs to 0

2016-09-29 Thread Salil Mehta
From: Daode Huang When set rx/tx coalesce usecs to 0, the interrupt coalesce will be disabled, but there is a interrupt rate limit which set to 1us, it will cause no interrupt occurs. This patch disable interrupt limit when sets coalsecs usecs to 0, and restores it to 1

[PATCH V2 for-next 0/8] Bug Fixes and Code Improvement in HNS driver

2016-09-29 Thread Salil Mehta
This patch-set introduces fix to some Bugs, potential problems and code improvements identified during internal review and testing of Hisilicon Network Subsystem driver. Submit Change V1->V2: This addresses the feedbacks provided by David Miller and Doug Ledford Daode Huang (6): net:

[PATCH V2 for-next 1/8] net: hns: fix port unavailable after hnae_reserve_buffer_map fail

2016-09-29 Thread Salil Mehta
From: lipeng When hnae_reserve_buffer_map fail, it will break cycle and some buffer description has no available memory, therefore the port will be unavailable. Signed-off-by: Peng Li Reviewed-by: Yisen Zhuang Signed-off-by:

[PATCH V2 for-next 5/8] net: hns: fix port not available after testing loopback

2016-09-29 Thread Salil Mehta
From: Kejian Yan After running command "ethtool -t eth0", eth0 can not be connected to network. It is caused by the changing the inner loopback register and this register cannot be changed when hns connected to network. The routine of setting this register needs to be

[PATCH V2 for-next 3/8] net: hns: add fini_process for v2 napi process

2016-09-29 Thread Salil Mehta
From: Daode Huang This patch adds fini_process for v2, it handles the packets recevied by the hardware in the napi porcess. With this patch, the hardware irq numbers will drop 50% per sec. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang

[PATCH V2 for-next 7/8] net: hns: bug fix about broadcast/multicast packets

2016-09-29 Thread Salil Mehta
From: Daode Huang When the dsaf mode receives a broadcast packet, it will filter the packet by comparing the received queue number and destination queue number(get from forwarding table), if they are the same, the packet will be filtered. Otherwise, the packet will be

Re: [PATCH net] net: pktgen: fix pkt_size

2016-09-29 Thread Sergei Shtylyov
Hello. On 09/29/2016 05:04 PM, Paolo Abeni wrote: The commit 879c7220e828 ("net: pktgen: Observe needed_headroom of the device") increased the 'pkt_overhead' field value by LL_RESERVED_SPACE. As a side effect the generated packet size, computed as: /* Eth + IPh + UDPh + mpls */

Re: next-20160929 build: 2 failures 4 warnings (next-20160929)

2016-09-29 Thread Mark Brown
On Thu, Sep 29, 2016 at 12:40:35PM +0100, Build bot for Mark Brown wrote: For the past couple of days -next has been failing to build an ARM allmodconfig due to: > arm-allmodconfig > ERROR: "__aeabi_uldivmod" [net/netfilter/xt_hashlimit.ko] undefined! which appears to be triggered by

[PATCH net-next v3] netfilter: xt_hashlimit: Fix link error in 32bit arch because of 64bit division

2016-09-29 Thread Vishwanath Pai
v2: Remove unnecessary div64_u64 around constants v3: remove backslashes -- Fix link error in 32bit arch because of 64bit division Division of 64bit integers will cause linker error undefined reference to `__udivdi3'. Fix this by replacing divisions with div64_64 Signed-off-by: Vishwanath Pai

Re: pull-request: wireless-drivers-next 2016-09-29

2016-09-29 Thread Pablo Neira Ayuso
On Thu, Sep 29, 2016 at 07:57:28PM +0300, Kalle Valo wrote: > Hi Dave, > > this should be the last wireless-drivers-next pull request for 4.9, from > now on only important bugfixes. Nothing really special stands out, > iwlwifi being most active but other drivers also getting attention. More >

Re: [PATCH net v2] tg3: Avoid NULL pointer dereference in tg3_io_error_detected()

2016-09-29 Thread Michael Chan
On Thu, Sep 29, 2016 at 9:24 AM, Guilherme G. Piccoli wrote: > From: Milton Miller > > While the driver is probing the adapter, an error may occur before the > netdev structure is allocated and attached to pci_dev. In this case, > not only netdev

Re: next-20160929 build: 2 failures 4 warnings (next-20160929)

2016-09-29 Thread Vishwanath Pai
On 09/29/2016 02:47 PM, Mark Brown wrote: > On Thu, Sep 29, 2016 at 12:40:35PM +0100, Build bot for Mark Brown wrote: > > For the past couple of days -next has been failing to build an ARM > allmodconfig due to: > >> arm-allmodconfig >> ERROR: "__aeabi_uldivmod"

[PATCH net-next 2/2] openvswitch: remove skb_mpls_header

2016-09-29 Thread Jiri Benc
skb_mpls_header is equivalent to skb_network_header now. There's no reason to keep it. Signed-off-by: Jiri Benc --- include/net/mpls.h| 11 --- net/openvswitch/actions.c | 10 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git

[PATCH net-next 1/2] openvswitch: mpls: set network header correctly on key extract

2016-09-29 Thread Jiri Benc
After the 48d2ab609b6b ("net: mpls: Fixups for GSO"), MPLS handling in openvswitch was changed to have network header pointing to the start of the MPLS headers and inner_network_header pointing after the MPLS headers. However, key_extract was missed by the mentioned commit, causing incorrect

[PATCH net-next 0/2] openvswitch: mpls fix and clean up

2016-09-29 Thread Jiri Benc
Convert to the new mpls skb layout the last remaining place in openvswitch, forgotten on the mpls GSO rework. The GSO rework also allows for some nice cleanup in the second patch. Jiri Benc (2): openvswitch: mpls: set network header correctly on key extract openvswitch: remove skb_mpls_header

Re: [PATCH] brcmfmac: implement more accurate skb tracking

2016-09-29 Thread Rafał Miłecki
On 27 September 2016 at 11:24, Arend Van Spriel wrote: > On 26-9-2016 14:38, Rafał Miłecki wrote: >> On 26 September 2016 at 14:13, Rafał Miłecki wrote: >>> On 26 September 2016 at 13:46, Arend Van Spriel >>> wrote:

[net-next PATCH] i40e: Clean up handling of msg_enable flags and debug parameter

2016-09-29 Thread Alexander Duyck
So the i40e driver had a really convoluted configuration for how to handle the debug flags contained in msg_enable. Part of the issue is that the driver has its own 32 bit mask that it was using to track a separate set of debug features. From what I can tell it was trying to use the upper 4 bits

net-next tree broken with CONFIG_NETFILTER_INGRESS=n

2016-09-29 Thread Marcel Holtmann
Hi Dave, the net-next tree is broken since a few days now when CONFIG_NETFILTER_INGRESS=n is set. CC net/netfilter/core.o In file included from ./include/linux/linkage.h:4:0, from ./include/linux/kernel.h:6, from net/netfilter/core.c:10:

[PATCH v3 net 1/2] net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions

2016-09-29 Thread Shmulik Ladkani
Generic skb_vlan_push/skb_vlan_pop functions don't properly handle the case where the input skb data pointer does not point at the mac header: - They're doing push/pop, but fail to properly unwind data back to its original location. For example, in the skb_vlan_push case, any subsequent

[PATCH v3 net 2/2] net: skbuff: Limit skb_vlan_pop/push() to expect skb->data at mac header

2016-09-29 Thread Shmulik Ladkani
skb_vlan_pop/push were too generic, trying to support the cases where skb->data is at mac header, and cases where skb->data is arbitrarily elsewhere. Supporting an arbitrary skb->data was complex and bogus: - It failed to unwind skb->data to its original location post actual pop/push.

Re: [PATCH/RFC 00/12] Programming Open vSwitch (-like) flows into hardware using SwitchDev

2016-09-29 Thread Simon Horman
Hi Or, On Wed, Sep 28, 2016 at 04:54:40PM +0300, Or Gerlitz wrote: > On Wed, Sep 28, 2016 at 3:42 PM, Simon Horman > wrote: > > > A different approach, not implemented by this patch-set, is for user-space > > to program flows into hardware by some other means, for

Re: [PATCH v3 net 1/2] net/sched: act_vlan: Push skb->data to mac_header prior calling skb_vlan_*() functions

2016-09-29 Thread Shmulik Ladkani
David, On Thu, 29 Sep 2016 12:10:40 +0300 Shmulik Ladkani wrote: > This patch fixes act_vlan to point to the mac_header prior calling > skb_vlan_*() functions, as other callers do. > This 1/2 patch fixes the problem detailed in [1] for act_vlan, last known caller of

Re: [PATCH] ipv6 addrconf: remove addrconf_sysctl_hop_limit()

2016-09-29 Thread Erik Kline
Seems fine to me. Acked-by: Erik Kline

Re: [PATCH RFC 5/6] net: phy: Trigger state machine on state change and not polling.

2016-09-29 Thread Andrew Lunn
On Wed, Sep 28, 2016 at 02:31:54PM -0700, Florian Fainelli wrote: > On 09/28/2016 01:32 AM, Andrew Lunn wrote: > > The phy_start() is used to indicate the PHY is now ready to do its > > work. The state is changed, normally to PHY_UP which means that both > > the MAC and the PHY are ready. > > > >

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Paolo Abeni
Hi Eric, On Wed, 2016-09-28 at 18:42 -0700, Eric Dumazet wrote: > On Wed, 2016-09-28 at 12:52 +0200, Paolo Abeni wrote: > > > +static void udp_rmem_release(struct sock *sk, int partial) > > +{ > > + struct udp_sock *up = udp_sk(sk); > > + int fwd, amt; > > + > > + if (partial &&

[PATCH] ipv6 addrconf: remove addrconf_sysctl_hop_limit()

2016-09-29 Thread Maciej Żenczykowski
From: Maciej Żenczykowski This is an effective no-op in terms of user observable behaviour. By preventing the overwrite of non-null extra1/extra2 fields in addrconf_sysctl() we can enable the use of proc_dointvec_minmax(). This allows us to eliminate the constant min/max

Re: [PATCH v1] mlx4: remove unused fields

2016-09-29 Thread Tariq Toukan
On 28/09/2016 9:00 PM, David Decotigny wrote: From: David Decotigny This also can address following UBSAN warnings: [ 36.640343] [ 36.648772] UBSAN: Undefined behaviour in

[PATCH v3 net-next 1/4] net/sched: act_mirred: Rename tcfm_ok_push to tcfm_mac_header_xmit and make it a bool

2016-09-29 Thread Shmulik Ladkani
'tcfm_ok_push' specifies whether a mac_len sized push is needed upon egress to the target device (if action is performed at ingress). Rename it to 'tcfm_mac_header_xmit' as this is actually an attribute of the target device (and use a bool instead of int). This allows to decouple the attribute

Re: How to submit potential patch in linux kernel

2016-09-29 Thread Daniel Baluta
Hi Shyam, On Thu, Sep 29, 2016 at 1:02 PM, Andrew Lunn wrote: > On Thu, Sep 29, 2016 at 04:32:29AM +0530, Shyam Saini wrote: >> Hi everyone, >> >> I'm Shyam, final year undergraduate student. I wanted to know how one can >> submit potential linux kernel patch in networking

Re: [PATCH v2 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-29 Thread Shmulik Ladkani
Hi Eric, On Tue, 27 Sep 2016 14:27:13 -0700 Eric Dumazet wrote: > > Since this runs lockless, another cpu might change m->tcfm_eaction in > the middle, and you could call dev_queue_xmit(skb2) while the skb2 was > prepared for the opposite action. Well, seem members of

[PATCH v3 net-next 0/4] act_mirred: Ingress actions support

2016-09-29 Thread Shmulik Ladkani
This patch series implements action mirred 'ingress' actions TCA_INGRESS_REDIR and TCA_INGRESS_MIRROR. This allows attaching filters whose target is to hand matching skbs into the rx processing of a specified device. v3: in 4/4, addressed non coherency due to reading m->tcfm_eaction multiple

[PATCH v3 net-next 3/4] net/sched: tc_mirred: Rename public predicates 'is_tcf_mirred_redirect' and 'is_tcf_mirred_mirror'

2016-09-29 Thread Shmulik Ladkani
These accessors are used in various drivers that support tc offloading, to detect properties of a given 'tc_action'. 'is_tcf_mirred_redirect' tests that the action is TCA_EGRESS_REDIR. 'is_tcf_mirred_mirror' tests that the action is TCA_EGRESS_MIRROR. As a prep towards supporting INGRESS

[PATCH v3 net-next 2/4] net/sched: act_mirred: Refactor detection whether dev needs xmit at mac header

2016-09-29 Thread Shmulik Ladkani
Move detection logic that tests whether device expects skb data to point at mac_header upon xmit into a function. Signed-off-by: Shmulik Ladkani --- net/sched/act_mirred.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git

[PATCH v3 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-29 Thread Shmulik Ladkani
Up until now, 'action mirred' supported only egress actions (either TCA_EGRESS_REDIR or TCA_EGRESS_MIRROR). This patch implements the corresponding ingress actions TCA_INGRESS_REDIR and TCA_INGRESS_MIRROR. This allows attaching filters whose target is to hand matching skbs into the rx processing

Re: [PATCH net-next v3 2/3] udp: implement memory accounting helpers

2016-09-29 Thread Paolo Abeni
On Wed, 2016-09-28 at 18:42 -0700, Eric Dumazet wrote: > On Wed, 2016-09-28 at 12:52 +0200, Paolo Abeni wrote: > > > +static void udp_rmem_release(struct sock *sk, int partial) > > +{ > > + struct udp_sock *up = udp_sk(sk); > > + int fwd, amt; > > + > > + if (partial &&

Re: [PATCH] ipv6 addrconf: implement RFC7559 router solicitation backoff

2016-09-29 Thread Erik Kline
Passes my local unittest for this behaviour. Acked-by: Erik Kline

Re: How to submit potential patch in linux kernel

2016-09-29 Thread Andrew Lunn
On Thu, Sep 29, 2016 at 04:32:29AM +0530, Shyam Saini wrote: > Hi everyone, > > I'm Shyam, final year undergraduate student. I wanted to know how one can > submit potential linux kernel patch in networking subsystem. Documentation/SubmittingPatches is a good starting point. Then post a patch

Re: [RFC] net: store port/representative id in metadata_dst

2016-09-29 Thread Jakub Kicinski
On Fri, 23 Sep 2016 14:20:40 -0700, John Fastabend wrote: > On 16-09-23 01:45 PM, Jakub Kicinski wrote: > > On Fri, 23 Sep 2016 13:25:10 -0700, John Fastabend wrote: > >> On 16-09-23 01:17 PM, Jakub Kicinski wrote: > >>> On Fri, 23 Sep 2016 10:22:59 -0700, Samudrala, Sridhar wrote: >

RE: [PATCH 3/3] net: fec: align IP header in hardware

2016-09-29 Thread David Laight
From: Eric Nelson > Sent: 28 September 2016 18:15 > On 09/28/2016 09:42 AM, David Laight wrote: > > From: Eric Nelson > >> Sent: 26 September 2016 19:40 > >> Hi David, > >> > >> On 09/26/2016 02:26 AM, David Laight wrote: > >>> From: Eric Nelson > Sent: 24 September 2016 15:42 > The FEC

[PATCH net-next 0/6] rxrpc: Fixes and adjustments

2016-09-29 Thread David Howells
/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-rewrite Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-rewrite-20160929 David --- David Howells (6): rxrpc: Fix exclusive client connections rxrpc: Make Tx loss-injection

Re: UDP wierdness around skb_copy_and_csum_datagram_msg()

2016-09-29 Thread Christian Lamparter
On Wednesday, September 28, 2016 7:20:39 PM CEST Jay Smith wrote: > Actually, on a little more searching of this list's archives, I think > that this discussion: https://patchwork.kernel.org/patch/9260733/ is > about exactly the same issue I've found, except from the TCP side. I'm > cc'ing a few

[PATCH net-next 1/6] rxrpc: Fix exclusive client connections

2016-09-29 Thread David Howells
Exclusive connections are currently reusable (which they shouldn't be) because rxrpc_alloc_client_connection() checks the exclusive flag in the rxrpc_connection struct before it's initialised from the function parameters. This means that the DONT_REUSE flag doesn't get set. Fix this by checking

Re: next-20160929 build: 2 failures 4 warnings (next-20160929)

2016-09-29 Thread Arnd Bergmann
On Thursday 29 September 2016, Vishwanath Pai wrote: > I have sent a patch for this a couple of days ago to netdev, it hasn't > made it to net-next yet. Here's the latest one: > > [PATCH net-next v3] netfilter: xt_hashlimit: Fix link error in 32bit > arch because of 64bit division > > This

Re: [PATCH net-next 1/2] openvswitch: mpls: set network header correctly on key extract

2016-09-29 Thread pravin shelar
On Thu, Sep 29, 2016 at 12:19 PM, Jiri Benc wrote: > After the 48d2ab609b6b ("net: mpls: Fixups for GSO"), MPLS handling in > openvswitch was changed to have network header pointing to the start of the > MPLS headers and inner_network_header pointing after the MPLS headers. > >

Re: UDP wierdness around skb_copy_and_csum_datagram_msg()

2016-09-29 Thread Eric Dumazet
On Fri, 2016-09-30 at 01:28 +0200, Christian Lamparter wrote: > On Wednesday, September 28, 2016 7:20:39 PM CEST Jay Smith wrote: > > Actually, on a little more searching of this list's archives, I think > > that this discussion: https://patchwork.kernel.org/patch/9260733/ is > > about exactly

  1   2   >