Re: [PATCH net-next 1/4] ixgbe: sparc: rename the ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER

2017-04-01 Thread Ding Tianhong
On 2017/4/2 2:26, David Miller wrote: > From: Ding Tianhong > Date: Sat, 1 Apr 2017 15:25:51 +0800 > >> Till now only the Intel ixgbe could support enable >> Relaxed ordering in the drivers for special architecture, >> but the ARCH_WANT_RELAX_ORDER is looks like a general name >> for all arch,

[PATCH 13/13] ftgmac100: Rework NAPI & interrupts handling

2017-04-01 Thread Benjamin Herrenschmidt
First, don't look at the interrupt status in the poll loop to decide what to poll. It's wrong. If we have run out of budget, we may still have RX packets to unqueue but no more RX interrupt pending. So instead move the code looking at the interrupt status into the interrupt handler where it belong

[PATCH 11/13] ftgmac100: Rework MAC reset and init

2017-04-01 Thread Benjamin Herrenschmidt
The HW requires a full MAC reset when changing the speed. Additionally the Aspeed documentation spells out that the MAC needs to be reset twice with a 10us interval. We thus move the speed setting and top level reset code into a new ftgmac100_reset_and_config_mac() function which handles both. Mo

net/sched: latent livelock in dev_deactivate_many() due to yield() usage

2017-04-01 Thread Mike Galbraith
Greetings network wizards, Quoting kernel/sched/core.c: /** * yield - yield the current processor to other threads. * * Do not ever use this function, there's a 99% chance you're doing it wrong. * * The scheduler is at all times free to pick the calling task as the most * eligible task to ru

[PATCH 12/13] ftgmac100: Remove useless tests in interrupt handler

2017-04-01 Thread Benjamin Herrenschmidt
The interrupt is neither enabled nor registered when the interface isn't running (regardless of whether we use nc-si or not) so the test isn't useful. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions

[PATCH 02/13] ftgmac100: Remove "banner" comments

2017-04-01 Thread Benjamin Herrenschmidt
The divisions they represent are not particularily meaningful and things are going to be moving around with upcoming changes making these comments more a burden than anything else. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 42 ---

[PATCH 07/13] ftgmac100: Move napi_add/del to open/close

2017-04-01 Thread Benjamin Herrenschmidt
Rather than probe/remove Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 8792c7c..ac22f71 1006

[PATCH 08/13] ftgmac100: Request the interrupt only after HW is reset

2017-04-01 Thread Benjamin Herrenschmidt
The interrupt isn't shared, so this will keep it masked until we have the HW in a known sane state. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/far

[PATCH 10/13] ftgmac100: Add a reset task and use it for link changes

2017-04-01 Thread Benjamin Herrenschmidt
Link speed changes require a full HW reset. This isn't done properly at the moment. It will involve delays and thus isn't suitable to do from the link poll callback. So let's create a reset_task that we can queue up when the link changes. It will be useful for various cases of error handling as we

[PATCH 04/13] ftgmac100: Remove "enabled" flags

2017-04-01 Thread Benjamin Herrenschmidt
It's not used in any meaningful way Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 02e0534..cc2271b 100644 ---

[PATCH 09/13] ftgmac100: Move the bulk of inits to a separate function

2017-04-01 Thread Benjamin Herrenschmidt
The link monitoring and error handling code will have to redo the ring inits and HW setup so move the code out of ftgmac100_open() into a dedicated function. This forces a bit of re-ordering of ftgmac100_open() but nothing dramatic. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet

[PATCH 06/13] ftgmac100: Split ring alloc, init and rx buffer alloc

2017-04-01 Thread Benjamin Herrenschmidt
Currently, a single function is used to allocate the rings themselves, initialize them, populate the rx ring, and allocate the rx buffers. The same happens on free. This splits them into separate functions. This will be useful when properly implementing re-initialization on link changes and error

[PATCH 01/13] ftgmac100: Use netdev->irq instead of private copy

2017-04-01 Thread Benjamin Herrenschmidt
There's a placeholder already for the irq, use it Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac10

[PATCH 05/13] ftgmac100: Cleanup speed/duplex tracking and fix duplex config

2017-04-01 Thread Benjamin Herrenschmidt
Keep track of both the current speed and duplex settings instead of only speed and properly apply the duplex setting to the HW. This reworks the adjust_link() function to also avoid trying to reconfigure the HW when there is no link and to display the link state to the user. Signed-off-by: Benjam

[PATCH 03/13] ftgmac100: Reorder struct fields and comment

2017-04-01 Thread Benjamin Herrenschmidt
Reorder the fields in struct ftgmac in slightly more logical groups. Will make more sense as I add/remove some. No code change. Signed-off-by: Benjamin Herrenschmidt --- drivers/net/ethernet/faraday/ftgmac100.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --g

[PATCH 00/13] ftgmac100: Rework batch 1 - Link & Interrupts

2017-04-01 Thread Benjamin Herrenschmidt
This is the first batch of updates to the ftgmac100 driver. Essentially: - A few misc cleanups - Fixing link speed & duplex handling (including dealing with an Aspeed requirement to double reset the controller when the speed changes) - And addition of a reset task workqueue which will

Re: [PATCH net 0/5] l2tp: fix usage of l2tp_session_find()

2017-04-01 Thread David Miller
From: Guillaume Nault Date: Fri, 31 Mar 2017 13:02:23 +0200 > l2tp_session_find() doesn't take a reference on the session returned to > its caller. Virtually all l2tp_session_find() users are racy, either > because the session can disappear from under them or because they take > a reference too l

Re: [PATCH net] sctp: use right in and out stream cnt

2017-04-01 Thread David Miller
From: Xin Long Date: Fri, 31 Mar 2017 17:57:28 +0800 > Since sctp reconf was added in sctp, the real cnt of in/out stream > have not been c.sinit_max_instreams and c.sinit_num_ostreams any > more. > > This patch is to replace them with stream->in/outcnt. > > Signed-off-by: Xin Long Applied, t

Re: [PATCH net-next] udp: use sk_protocol instead of pcflag to detect udplite sockets

2017-04-01 Thread David Miller
From: Paolo Abeni Date: Fri, 31 Mar 2017 11:47:39 +0200 > In the udp_sock struct, the 'forward_deficit' and 'pcflag' fields > share the same cacheline. While the first is dirtied by > udp_recvmsg, the latter is read, possibly several times, by the > bottom half processing to discriminate between

Re: [PATCH net-next] net: dsa: fix build error with devlink build as module

2017-04-01 Thread David Miller
From: Tobias Regnery Date: Fri, 31 Mar 2017 11:44:52 +0200 > After commit 96567d5dacf4 ("net: dsa: dsa2: Add basic support of devlink") > I see the following link error with CONFIG_NET_DSA=y and CONFIG_NET_DEVLINK=m: > > net/built-in.o: In function 'dsa_register_switch': > (.text+0xe226b): undef

Re: [PATCH v3 0/3] phylib EEE updates

2017-04-01 Thread David Miller
From: Russell King - ARM Linux Date: Fri, 31 Mar 2017 10:36:46 +0100 > This series of patches depends on the previous set of changes, and > is therefore net-next material. Series applied, thank you.

Re: [PATCH v2] net: Remove unnecessary cast on void pointer

2017-04-01 Thread Stephen Hemminger
On Wed, 29 Mar 2017 00:35:16 +0530 simran singhal wrote: > The following Coccinelle script was used to detect this: > @r@ > expression x; > void* e; > type T; > identifier f; > @@ > ( > *((T *)e) > | > ((T *)x)[...] > | > ((T*)x)->f > | > > - (T*) > e > ) > > Unnecessary parantheses are

Fw: [Bug 195217] New: irda doesn't work

2017-04-01 Thread Stephen Hemminger
Begin forwarded message: Date: Sat, 01 Apr 2017 22:02:08 + From: bugzilla-dae...@bugzilla.kernel.org To: step...@networkplumber.org Subject: [Bug 195217] New: irda doesn't work https://bugzilla.kernel.org/show_bug.cgi?id=195217 Bug ID: 195217 Summary: irda doesn't w

Re: [PATCH] Make EN2 pin optional in the TRF7970A driver

2017-04-01 Thread Samuel Ortiz
Hi Heiko, On Tue, Feb 07, 2017 at 06:22:04AM +0100, Heiko Schocher wrote: > From: Guan Ben > > Make the EN2 pin optional. This is useful for boards, > which have this pin fix wired, for example to ground. > > Signed-off-by: Guan Ben > Signed-off-by: Mark Jonas > Signed-off-by: Heiko Schocher

Re: [PATCH v2 net-next 1/6] bpf: introduce BPF_PROG_TEST_RUN command

2017-04-01 Thread Jesper Dangaard Brouer
On Sat, 1 Apr 2017 08:45:01 -0700 Alexei Starovoitov wrote: > On 4/1/17 12:14 AM, Jesper Dangaard Brouer wrote: > > On Thu, 30 Mar 2017 21:45:38 -0700 > > Alexei Starovoitov wrote: > > > >> static u32 bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, u32 > >> *time) > >> +{ > >> + u

Re: pull-request: mac80211 2017-03-31

2017-04-01 Thread David Miller
From: Johannes Berg Date: Fri, 31 Mar 2017 08:14:34 +0200 > Before netconf, I figured I'd get these two fixes to you, at least > I wanted to have them out of the way. > > Please pull and let me know if there's any problem. Pulled, thank you.

Re: [net-next v3] vxlan: fix ND proxy when skb doesn't have transport header offset

2017-04-01 Thread kbuild test robot
Hi Vincent, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Vincent-Bernat/vxlan-fix-ND-proxy-when-skb-doesn-t-have-transport-header-offset/20170401-182312 config: x86_64-randconfig-v0-04020359 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8

Re: [PATCH v2 net-next 0/6] bpf: program testing framework

2017-04-01 Thread David Miller
From: Alexei Starovoitov Date: Thu, 30 Mar 2017 21:45:37 -0700 > Development and testing of networking bpf programs is quite cumbersome. > Especially tricky are XDP programs that attach to real netdevices and > program development feels like working on the car engine while > the car is in motion.

Re: [PATCH net-next v2] net: dsa: Mock-up driver

2017-04-01 Thread David Miller
From: Florian Fainelli Date: Thu, 30 Mar 2017 18:43:21 -0700 > This patch adds support for a DSA mock-up driver which essentially does > the following: > > - registers/unregisters 4 fixed PHYs to the slave network devices > - uses eth0 (configurable) as the master netdev > - registers the switch

Re: [PATCH net 0/3] BPF fixes on map_value_adj reg types

2017-04-01 Thread David Miller
From: Daniel Borkmann Date: Fri, 31 Mar 2017 02:24:01 +0200 > This set adds two fixes for map_value_adj register type in the > verifier and user space tests along with them for the BPF self > test suite. For details, please see individual patches. Series applied and queued up for -stable, thanks

Re: [PATCH net-next v2 0/9] net: dsa: mv88e6xxx: program cross-chip bridging

2017-04-01 Thread David Miller
From: Vivien Didelot Date: Thu, 30 Mar 2017 17:37:06 -0400 > The purpose of this patch series is to bring hardware cross-chip > bridging configuration to the DSA layer and the mv88e6xxx DSA driver. This series seems like a step in the right direction so I have applied it to net-next. We can add

Re: [PATCH] r8152: The Microsoft Surface docks also use R8152 v2

2017-04-01 Thread David Miller
From: Rene Rebe Date: Tue, 28 Mar 2017 07:56:51 +0200 (CEST) > Without this the generic cdc_ether grabs the device, > and does not really work. > > Signed-off-by: René Rebe Applied, thank you.

Re: [PATCH net v2] openvswitch: Fix ovs_flow_key_update()

2017-04-01 Thread David Miller
From: Yi-Hung Wei Date: Thu, 30 Mar 2017 12:36:03 -0700 > ovs_flow_key_update() is called when the flow key is invalid, and it is > used to update and revalidate the flow key. Commit 329f45bc4f19 > ("openvswitch: add mac_proto field to the flow key") introduces mac_proto > field to flow key and u

Re: [PATCH] net/faraday: Explicitly include linux/of.h and linux/property.h

2017-04-01 Thread David Miller
From: Mark Brown Date: Thu, 30 Mar 2017 17:00:12 +0100 > This driver uses interfaces from linux/of.h and linux/property.h but > relies on implict inclusion of those headers which means that changes in > other headers could break the build, as happened in -next for arm today. > Add a explicit incl

Re: [PATCH] dpaa_eth: use AVOIDBLOCK for Tx confirmation queues

2017-04-01 Thread David Miller
From: Madalin Bucur Date: Thu, 30 Mar 2017 16:24:15 +0300 > The AVOIDBLOCK flag determines the Tx confirmation queues processing > to be redirected to any available CPU when the current one is slow > in processing them. This may result in a higher Tx confirmation > interrupt count but may reduce

Re: [PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0

2017-04-01 Thread santosh.shilim...@oracle.com
On 3/31/17 3:56 PM, Sowmini Varadhan wrote: The rds_connect_worker() has a bug in the check that enforces the canonical connection order described in the comments of rds_tcp_state_change(). The intention is to make sure that all the multipath connections are always initiated by the smaller IP add

Re: [PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN

2017-04-01 Thread santosh.shilim...@oracle.com
On 3/31/17 3:56 PM, Sowmini Varadhan wrote: rds_conn_shutdown() runs in workq context, and marks the rds_connection as DISCONNECTING before quiescing Tx/Rx paths. However, after all I/O has quiesced, we may still find the rds_connection state to be RDS_CONN_ERROR if an intervening FIN was process

Re: [PATCH] fsl/fman: take into account all RGMII modes

2017-04-01 Thread David Miller
From: Madalin Bucur Date: Thu, 30 Mar 2017 16:21:40 +0300 > Accept the internal delay RGMII variants. > > Signed-off-by: Madalin Bucur Applied, thanks.

Re: [PATCH net-next] vxlan: vxlan dev should inherit lowerdev's gso_max_size

2017-04-01 Thread David Miller
From: Felix Manlunas Date: Wed, 29 Mar 2017 17:56:43 -0700 > vxlan dev currently ignores lowerdev's gso_max_size, which adversely > affects TSO performance of liquidio if it's the lowerdev. Egress TCP > packets' skb->len often exceed liquidio's advertised gso_max_size. This > may happen on othe

Re: [PATCH net-next 1/4] ixgbe: sparc: rename the ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER

2017-04-01 Thread David Miller
From: Ding Tianhong Date: Sat, 1 Apr 2017 15:25:51 +0800 > Till now only the Intel ixgbe could support enable > Relaxed ordering in the drivers for special architecture, > but the ARCH_WANT_RELAX_ORDER is looks like a general name > for all arch, so rename to a specific name for intel > card look

[PATCH net-next 1/2] rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN

2017-04-01 Thread Sowmini Varadhan
rds_conn_shutdown() runs in workq context, and marks the rds_connection as DISCONNECTING before quiescing Tx/Rx paths. However, after all I/O has quiesced, we may still find the rds_connection state to be RDS_CONN_ERROR if an intervening FIN was processed in softirq context. This is not a fatal er

[PATCH net-next 0/2] rds: tcp: couple of minor bug fixes

2017-04-01 Thread Sowmini Varadhan
A couple of minor bugfixes that showed up during testing Sowmini Varadhan (2): rds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked ERROR by an intervening FIN rds: tcp: canonical connection order for all paths with index > 0 net/rds/connection.c | 10 +

[PATCH net-next 2/2] rds: tcp: canonical connection order for all paths with index > 0

2017-04-01 Thread Sowmini Varadhan
The rds_connect_worker() has a bug in the check that enforces the canonical connection order described in the comments of rds_tcp_state_change(). The intention is to make sure that all the multipath connections are always initiated by the smaller IP address via rds_start_mprds. To achieve this, rds

[PATCH 0/2] Simplify NULL comparisons

2017-04-01 Thread Arushi Singhal
Simplify NULL comparisons to follow kernel coding style. Arushi Singhal (2): ipv4: netfilter: Simplify NULL comparisons ipv6: netfilter: Simplify NULL comparisons net/ipv4/netfilter/arp_tables.c| 3 +-- net/ipv4/netfilter/arptable_filter.c | 2 +- net/ipv4/netfilt

[PATCH 1/2] ipv4: netfilter: Simplify NULL comparisons

2017-04-01 Thread Arushi Singhal
Remove instances of explicit NULL comparisons for code compaction. Signed-off-by: Arushi Singhal --- net/ipv4/netfilter/arp_tables.c| 3 +-- net/ipv4/netfilter/arptable_filter.c | 2 +- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- net/ipv4/netfilter/ipt_SYN

[PATCH 2/2] ipv6: netfilter: Simplify NULL comparisons

2017-04-01 Thread Arushi Singhal
Remove instances of explicit NULL comparisons for code compaction. Signed-off-by: Arushi Singhal --- net/ipv6/netfilter/ip6t_SYNPROXY.c | 16 net/ipv6/netfilter/ip6t_ipv6header.c | 2 +- net/ipv6/netfilter/ip6table_filter.c | 2 +- net/ipv6/netf

Re: [PATCH 1/6] virtio: wrap find_vqs

2017-04-01 Thread Bjorn Andersson
On Wed 29 Mar 13:48 PDT 2017, Michael S. Tsirkin wrote: > We are going to add more parameters to find_vqs, let's wrap the call so > we don't need to tweak all drivers every time. > > Signed-off-by: Michael S. Tsirkin Acked-by: Bjorn Andersson Regards, Bjorn

Re: [PATCH net-next 1/2] rtnetlink: Convert rtnetlink_event to white list

2017-04-01 Thread David Ahern
On 3/31/17 8:27 PM, Vladislav Yasevich wrote: > diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c > index 9c3947a..f48a60d 100644 > --- a/net/core/rtnetlink.c > +++ b/net/core/rtnetlink.c > @@ -4116,22 +4116,23 @@ static int rtnetlink_event(struct notifier_block > *this, unsigned long event

Re: [PATCH v2 net-next 1/6] bpf: introduce BPF_PROG_TEST_RUN command

2017-04-01 Thread Alexei Starovoitov
On 4/1/17 12:14 AM, Jesper Dangaard Brouer wrote: On Thu, 30 Mar 2017 21:45:38 -0700 Alexei Starovoitov wrote: static u32 bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, u32 *time) +{ + u64 time_start, time_spent = 0; + u32 ret = 0, i; + + if (!repeat) +

[PATCH net] tcp: minimize false-positives on TCP/GRO check

2017-04-01 Thread Marcelo Ricardo Leitner
Markus Trippelsdorf reported that after commit dcb17d22e1c2 ("tcp: warn on bogus MSS and try to amend it") the kernel started logging the warning for a NIC driver that doesn't even support GRO. It was diagnosed that it was possibly caused on connections that were using TCP Timestamps but some pack

[PATCH] net: ipv4: netfilter: Remove unused function nf_nat_need_gre()

2017-04-01 Thread simran singhal
The function nf_nat_need_gre() on being called, simply returns back. The function doesn't have FIXME code around. Hence, nf_nat_need_gre() and its calls have been removed. Signed-off-by: simran singhal --- net/ipv4/netfilter/nf_nat_pptp.c | 2 -- net/ipv4/netfilter/nf_nat_proto_gre.c | 6 --

Re: [PATCH net] sctp: check for dst and pathmtu update in sctp_packet_config

2017-04-01 Thread Marcelo Ricardo Leitner
On Sat, Apr 01, 2017 at 05:15:59PM +0800, Xin Long wrote: > This patch is to move sctp_transport_dst_check into sctp_packet_config > from sctp_packet_transmit and add pathmtu check in sctp_packet_config. > > With this fix, sctp can update dst or pathmtu before appending chunks, > which can void dr

Re: [PATCHv2 net-next] sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp

2017-04-01 Thread Marcelo Ricardo Leitner
On Sat, Apr 01, 2017 at 05:07:46PM +0800, Xin Long wrote: > Before when implementing sctp prsctp, SCTP_PR_STREAM_STATUS wasn't > added, as it needs to save abandoned_(un)sent for every stream. > > After sctp stream reconf is added in sctp, assoc has structure > sctp_stream_out to save per stream i

Re: [PATCH] ipv4: netfilter: Comparison to NULL could be written

2017-04-01 Thread Joe Perches
On Sat, 2017-04-01 at 14:05 +0530, Arushi Singhal wrote: > Fixed coding style for null comparisons to be more > consistant with the rest of the kernel coding style. typo: consistent and trivia: > diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c [] > @@ -653,7 +653,7

[PATCH V4 net-next 00/18] net: hns: Misc. HNS Bug Fixes & Code Improvements

2017-04-01 Thread Salil Mehta
This patch set introduces various HNS bug fixes, optimizations and code improvements. Daode Huang (1): net: hns: bug fix of ethtool show the speed Kejian Yan (7): net: hns: Remove the redundant adding and deleting mac function net: hns: Remove redundant mac_get_id() net: hns: Remove redun

[PATCH V4 net-next 02/18] net: hns: Modify GMAC init TX threshold value

2017-04-01 Thread Salil Mehta
From: lipeng This patch reduces GMAC TX threshold value to avoid gmac hang-up with speed 100M/duplex half. Signed-off-by: lipeng Signed-off-by: JinchuanTian Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 6 ++ drivers/net/et

[PATCH V4 net-next 01/18] net: hns: Fix the implementation of irq affinity function

2017-04-01 Thread Salil Mehta
From: lipeng This patch fixes the implementation of the IRQ affinity function. This function is used to create the cpu mask which eventually is used to initialize the cpu<->queue association for XPS(Transmit Packet Steering). Signed-off-by: lipeng Signed-off-by: Kejian Yan Reviewed-by: Yisen Z

[PATCH V4 net-next 03/18] net: hns: Optimize the code for GMAC pad and crc Config

2017-04-01 Thread Salil Mehta
From: lipeng This patch optimises the init configuration code leg for gmac pad and crc set interface. Signed-off-by: lipeng Signed-off-by: JinchuanTian Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 36 ++ 1

[PATCH V4 net-next 04/18] net: hns: Remove redundant memset during buffer release

2017-04-01 Thread Salil Mehta
From: lipeng Because all members of desc_cb is assigned when xmit one package, so it can delete in hnae_free_buffer, as follows: - "dma, priv, length, type" are assigned in fill_v2_desc. - "page_offset, reuse_flag, buf" are not used in tx direction. Signed-off-by: lipeng Signed-

[PATCH V4 net-next 06/18] net: hns: Optimize hns_nic_common_poll for better performance

2017-04-01 Thread Salil Mehta
From: lipeng After polling less than buget packages, we need check again. If there are still some packages, we call napi_schedule add softirq queue, this is not better way. So we return buget value instead of napi_schedule. Signed-off-by: lipeng reviewed-by: Yisen Zhuang Signed-off-by: Salil M

[PATCH V4 net-next 05/18] net: hns: bug fix of ethtool show the speed

2017-04-01 Thread Salil Mehta
From: Daode Huang When run ethtool ethX on hns driver, the speed will show as "Unknown". The base.speed is not correct assigned, this patch fix this bug. Signed-off-by: Daode Huang Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 +

[PATCH V4 net-next 09/18] net: hns: Correct HNS RSS key set function

2017-04-01 Thread Salil Mehta
From: lipeng This patch fixes below ethtool configuration error: localhost:~ # ethtool -X eth0 hkey XX:XX:XX... Cannot set Rx flow hash configuration: Operation not supported Signed-off-by: lipeng Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hn

[PATCH V4 net-next 07/18] net: hns: Fix to adjust buf_size of ring according to mtu

2017-04-01 Thread Salil Mehta
From: lipeng Because buf_size of ring set to 2048, the process of rx_poll_one can reuse the page, therefore the performance of XGE can improve. But the chip only supports three bds in one package, so the max mtu is 6K when it sets to 2048. For better performane in litter mtu, we need change buf_s

[PATCH V4 net-next 11/18] net: hns: Remove redundant mac_get_id()

2017-04-01 Thread Salil Mehta
From: Kejian Yan There is a mac_id in mac control block structure, so the callback function mac_get_id() is useless. Here we remove this function. Reported-by: Weiwei Deng Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hn

[PATCH V4 net-next 08/18] net: hns: Replace netif_tx_lock to ring spin lock

2017-04-01 Thread Salil Mehta
From: lipeng netif_tx_lock is a global spin lock, it will take affect in all rings in the netdevice. In tx_poll_one process, it can only lock the current ring, in this case, we define a spin lock in hnae_ring struct for it. Signed-off-by: lipeng reviewed-by: Yisen Zhuang Signed-off-by: Salil M

[PATCH V4 net-next 15/18] net: hns: Simplify the exception sequence in hns_ppe_init()

2017-04-01 Thread Salil Mehta
From: Kejian Yan We need to free all ppe submodule if it fails to initialize ppe by any fault, so this patch will free all ppe resource before hns_ppe_init() returns exception situation Reported-by: JinchuanTian Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta --

[PATCH V4 net-next 10/18] net: hns: Remove the redundant adding and deleting mac function

2017-04-01 Thread Salil Mehta
From: Kejian Yan The functions (hns_dsaf_set_mac_mc_entry() and hns_mac_del_mac()) are not called by any functions. They are dead code in hns. And the same features are implemented by the patch (the id is 66355f5). Reported-by: Weiwei Deng Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Si

[PATCH V4 net-next 13/18] net: hns: Clean redundant code from hns_mdio.c file

2017-04-01 Thread Salil Mehta
From: Kejian Yan This patch cleans the redundant code from hns_mdio.c. Reported-by: Ping Zhang Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns_mdio.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/

[PATCH V4 net-next 12/18] net: hns: Remove redundant mac table operations

2017-04-01 Thread Salil Mehta
From: Kejian Yan This patch removes redundant functions used only for debugging purposes. Reported-by: Weiwei Deng Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 160 - drivers/net/et

[PATCH V4 net-next 14/18] net: hns: Optimise the code in hns_mdio_wait_ready()

2017-04-01 Thread Salil Mehta
From: Kejian Yan This patch fixes the code to clear pclint warning/info. Reported-by: Ping Zhang Signed-off-by: Kejian Yan Reviewed-by: Salil Mehta Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns_mdio.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

[PATCH V4 net-next 17/18] net: hns: Avoid Hip06 chip TX packet line bug

2017-04-01 Thread Salil Mehta
From: lipeng There is a bug on Hip06 that tx ring interrupts packets count will be clear when drivers send data to tx ring, so that the tx packets count will never upgrade to packets line, and cause the interrupts engendered was delayed. Sometimes, it will cause sending performance lower than exp

[PATCH V4 net-next 16/18] net: hns: Adjust the SBM module buffer threshold

2017-04-01 Thread Salil Mehta
From: Kejian Yan HNS needs SMB Buffers to store at least two packets after sending pause frame because of the link delay. The MTU of HNS is 9728. As the processor user manual described, the SBM buffer threshold should be modified. Reported-by: Ping Zhang Signed-off-by: Kejian Yan Reviewed-by:

[PATCH V4 net-next 18/18] net: hns: Some checkpatch.pl script & warning fixes

2017-04-01 Thread Salil Mehta
This patch fixes some checkpatch.pl script caught errors and warnings during the compilation time. Signed-off-by: Salil Mehta --- Change Log: Patch V3: Adressed the comment by Joe Perches * Link -> https://lkml.org/lkml/2017/3/31/538 --- drivers/net/ethernet/hisilicon/hns/hnae.h

[PATCH net] sctp: check for dst and pathmtu update in sctp_packet_config

2017-04-01 Thread Xin Long
This patch is to move sctp_transport_dst_check into sctp_packet_config from sctp_packet_transmit and add pathmtu check in sctp_packet_config. With this fix, sctp can update dst or pathmtu before appending chunks, which can void dropping packets in sctp_packet_transmit when dst is obsolete or dst's

[PATCHv2 net-next] sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp

2017-04-01 Thread Xin Long
Before when implementing sctp prsctp, SCTP_PR_STREAM_STATUS wasn't added, as it needs to save abandoned_(un)sent for every stream. After sctp stream reconf is added in sctp, assoc has structure sctp_stream_out to save per stream info. This patch is to add SCTP_PR_STREAM_STATUS by putting the prsc

Re: [PATCH net-next] sctp: add SCTP_PR_STREAM_STATUS sockopt for prsctp

2017-04-01 Thread Xin Long
On Sat, Apr 1, 2017 at 2:08 AM, Marcelo Ricardo Leitner wrote: > On Fri, Mar 31, 2017 at 06:14:09PM +0800, Xin Long wrote: >> Before when implementing sctp prsctp, SCTP_PR_STREAM_STATUS wasn't >> added, as it needs to save abandoned_(un)sent for every stream. >> >> After sctp stream reconf is adde

Re: [PATCH net-next 0/4] ixgbe: enable Relaxed Order for ARM64

2017-04-01 Thread Ding Tianhong
On 2017/4/1 16:39, Jeff Kirsher wrote: > On Sat, 2017-04-01 at 15:25 +0800, Ding Tianhong wrote: >> The IXGBE_ALLOW_RELAXED_ORDER will enable Relaxed Ordering (RO) which >> allows >> transactions that do not have any order of completion requirements to >> complete more efficiently compare to the

Re: [PATCH net-next 0/4] ixgbe: enable Relaxed Order for ARM64

2017-04-01 Thread Jeff Kirsher
On Sat, 2017-04-01 at 15:25 +0800, Ding Tianhong wrote: > The IXGBE_ALLOW_RELAXED_ORDER will enable Relaxed Ordering (RO) which > allows > transactions that do not have any order of completion requirements to > complete more efficiently compare to the Stricted Ordering (SO) for > ixbge > nic card.

[PATCH] ipv4: netfilter: Comparison to NULL could be written

2017-04-01 Thread Arushi Singhal
Fixed coding style for null comparisons to be more consistant with the rest of the kernel coding style. Signed-off-by: Arushi Singhal --- net/ipv4/netfilter/arp_tables.c| 2 +- net/ipv4/netfilter/arptable_filter.c | 2 +- net/ipv4/netfilter/ipt_CLUSTERIP.c

[PATCH net-next 0/4] ixgbe: enable Relaxed Order for ARM64

2017-04-01 Thread Ding Tianhong
The IXGBE_ALLOW_RELAXED_ORDER will enable Relaxed Ordering (RO) which allows transactions that do not have any order of completion requirements to complete more efficiently compare to the Stricted Ordering (SO) for ixbge nic card. Some architecture will see high write-to-memory performance when RO

[PATCH net-next 4/4] ixgbe: enable IXGBE_ALLOW_RELAXED_ORDER for ARM64

2017-04-01 Thread Ding Tianhong
The IXGBE_ALLOW_RELAXED_ORDER will enable Relaxed Ordering (RO) which allows transactions that do not have any order of completion requirements to complete more efficiently compare to the Stricted Ordering (SO) for ixgbe net card. Some architecture will see high write-to-memory performance when RO

[PATCH net-next 3/4] ixgbe: move IXGBE_ALLOW_RELAXED_ORDER from architecture to driver

2017-04-01 Thread Ding Tianhong
The Relaxed Ordering is an specific PCI option and impact some architecture performance just like SPARC and ARM64, so compare to drop this to the several architecture folder, put it in driver looks more appropriate, it will not impact or be seen for other architectures. Signed-off-by: Ding Tianhon

[PATCH net-next 2/4] ixgbe: ixgbevf: Clear the CONFIG_SPARC for ixgbevf and 82598

2017-04-01 Thread Ding Tianhong
The CONFIG_SPARC in ixgbevf and ixgbe_82598 is only used to enable relaxed ordering, the CONFIG_IXBGE_WANT_RELAXED_ORDER already did this, so rename this config for the same setting. Signed-off-by: Ding Tianhong --- drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c| 4 ++-- drivers/net/ethernet

[PATCH net-next 1/4] ixgbe: sparc: rename the ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER

2017-04-01 Thread Ding Tianhong
Till now only the Intel ixgbe could support enable Relaxed ordering in the drivers for special architecture, but the ARCH_WANT_RELAX_ORDER is looks like a general name for all arch, so rename to a specific name for intel card looks more appropriate. Signed-off-by: Ding Tianhong --- arch/Kconfig

Re: [PATCH v2 net-next 1/6] bpf: introduce BPF_PROG_TEST_RUN command

2017-04-01 Thread Jesper Dangaard Brouer
On Thu, 30 Mar 2017 21:45:38 -0700 Alexei Starovoitov wrote: > static u32 bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat, u32 > *time) > +{ > + u64 time_start, time_spent = 0; > + u32 ret = 0, i; > + > + if (!repeat) > + repeat = 1; > + time_start = ktime_g