[PATCH v2] net/ethoc: support big-endian register layout

2015-09-22 Thread Max Filippov
This allows using OpenCores ethernet controller attached to its host in native-endian mode with bi-endian CPUs. Example of such system is Xtensa XTFPGA platform. Signed-off-by: Max Filippov --- Changes v1->v2: - expand changelog with motivation for the change. drivers/net/ethernet/ethoc.c | 14

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Herbert Xu
On Tue, Sep 22, 2015 at 12:10:56PM -0400, Tejun Heo wrote: > > That's a pentium pro era errata. Virtually no working machine is > affected by that anymore and nobody builds kernel with that option. > In most cases, store_release and load_acquire are cheaper as they're > more specific. On x86, sto

Re: [PATCH net-next 0/9] net: Refactor ip_route_input_slow

2015-09-22 Thread Alexander Duyck
On 09/22/2015 03:55 PM, David Ahern wrote: ip_route_input_slow is a maze of gotos (9 of them!) making it error prone and difficult to read. This patchset refactors it, removing all but 2 of the labels. The brd_input label for broadcast path requires too many inputs to make a reasonble helper out

Re: [PATCH 4/9] powerpc: inline ip_fast_csum()

2015-09-22 Thread Denis Kirjanov
On 9/22/15, Christophe Leroy wrote: > In several architectures, ip_fast_csum() is inlined > There are functions like ip_send_check() which do nothing > much more than calling ip_fast_csum(). > Inlining ip_fast_csum() allows the compiler to optimise better Hi Christophe, I did try it and see no di

Re: [PATCH v2] net/wireless: enable wiphy device to suspend/resume asynchronously

2015-09-22 Thread Fu, Zhonghui
Hi johannes, Could you please tell me which kernel version will merge this patch? Thanks, Zhonghui On 2015/9/22 22:05, Johannes Berg wrote: > On Sat, 2015-09-19 at 10:40 +0800, Fu, Zhonghui wrote: >> Now, PM core supports asynchronous suspend/resume mode for devices >> during system suspend/

[PATCH] ip6_gre: Reduce log level in ip6gre_err() to debug

2015-09-22 Thread Matt Bennett
Currently error log messages in ip6gre_err are printed at 'warn' level. This is different to most other tunnel types which don't print any messages. These log messages don't provide any information that couldn't be deduced with networking tools. Also it can be annoying to have one end of the tunnel

Re: [PATCH net 0/2] lwtunnel: make it really work, for IPv4

2015-09-22 Thread Eric W. Biederman
Jiri Benc writes: > One of the selling points of lwtunnel was the ability to specify the tunnel > destination using routes. However, this doesn't really work currently, as > ARP and ndisc replies are not handled correctly. ARP and ndisc replies won't > have tunnel metadata attached, thus they wil

[PATCH net] fib_rules: fix fib rule dumps across multiple skbs

2015-09-22 Thread Roopa Prabhu
From: Wilson Kok dump_rules returns skb length and not error. But when family == AF_UNSPEC, the caller of dump_rules assumes that it returns an error. Hence, when family == AF_UNSPEC, we continue trying to dump on -EMSGSIZE errors resulting in incorrect dump idx carried between skbs belonging to

[PATCH v2 net-next] tcp: factorize sk_txhash init

2015-09-22 Thread Eric Dumazet
From: Eric Dumazet Neal suggested to move sk_txhash init into tcp_create_openreq_child(), called both from IPv4 and IPv6. This opportunity was missed in commit 58d607d3e52f ("tcp: provide skb->hash to synack packets") Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell --- v2: respin n

Re: [PATCH net-next] tcp: factorize sk_txhash init

2015-09-22 Thread Eric Dumazet
On Tue, 2015-09-22 at 17:31 -0700, David Miller wrote: > This doesn't apply to net-next, please respin. Sure. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info

Re: [PATCH net-next 4/9] net: Move rth handling from ip_route_input_slow to helper

2015-09-22 Thread David Ahern
On 9/22/15 8:33 PM, Alexander Duyck wrote: Why pass loopback_dev instead of just passing the net pointer? Seems like in the path below there are cases where you end up not needing to dereference it and it might be worth the effort to avoid dereferencing it if you don't need to. Same thing for n

Re: [PATCH net-next 3/9] net: Remove e_nobufs label from ip_route_input_slow

2015-09-22 Thread David Ahern
On 9/22/15 8:15 PM, Eric W. Biederman wrote: David Ahern writes: e_nobufs has 1 user. Move setting err to -ENOBUFS for the 1 user and use the goto out label instead of e_nobufs. Stepping stone patch; next one moves rth code into a helper function. Ick you are pessimizing the code. You will

Re: [PATCH net-next 4/9] net: Move rth handling from ip_route_input_slow to helper

2015-09-22 Thread Alexander Duyck
On 09/22/2015 03:55 PM, David Ahern wrote: Move the rth lookup and allocation from ip_route_input_slow into a helper function. Code move only; no operational change intended. Signed-off-by: David Ahern --- net/ipv4/route.c | 104 --- 1 file

Re: [PATCH net-next 3/9] net: Remove e_nobufs label from ip_route_input_slow

2015-09-22 Thread Eric W. Biederman
David Ahern writes: > e_nobufs has 1 user. Move setting err to -ENOBUFS for the 1 user and > use the goto out label instead of e_nobufs. Stepping stone patch; next > one moves rth code into a helper function. Ick you are pessimizing the code. You will almost certainly have better code generatio

Re: [PATCH next 02/84] ipvs: Don't use current in proc_do_defense_mode

2015-09-22 Thread Eric W. Biederman
Simon Horman writes: > On Mon, Sep 21, 2015 at 01:01:39PM -0500, Eric W. Biederman wrote: >> Instead store ipvs in extra2 so that proc_do_defense_mode can easily >> find the ipvs that it's value is associated with. >> >> Signed-off-by: "Eric W. Biederman" > > I am wondering if this fix should b

Re: [PATCH net-next 1/9] net: Remove martian_source_keep_err goto label

2015-09-22 Thread Alexander Duyck
On 09/22/2015 06:04 PM, Alexander Duyck wrote: On 09/22/2015 03:55 PM, David Ahern wrote: err is initialized to -EINVAL when it is declared. It is not reset until fib_lookup which is well after the 3 users of the martian_source jump. So resetting err to -EINVAL at martian_source label is not nee

Re: [PATCH] net: davinci_emac: Add support for fixed-link PHY

2015-09-22 Thread Tony Lindgren
* Neil Armstrong [150922 02:01]: > In case the DaVinci Emac is directly connected to a > non-mdio PHY/device, it should be possible to provide > a fixed link configuration in the DT. > > Signed-off-by: Neil Armstrong Ethernet works for me with this patch: Tested-by: Tony Lindgren > --- > dr

Re: [PATCH next 02/84] ipvs: Don't use current in proc_do_defense_mode

2015-09-22 Thread Simon Horman
On Mon, Sep 21, 2015 at 01:01:39PM -0500, Eric W. Biederman wrote: > Instead store ipvs in extra2 so that proc_do_defense_mode can easily > find the ipvs that it's value is associated with. > > Signed-off-by: "Eric W. Biederman" I am wondering if this fix should be included in v4.3 and stable. C

Re: [PATCH net-next 1/9] net: Remove martian_source_keep_err goto label

2015-09-22 Thread Alexander Duyck
On 09/22/2015 03:55 PM, David Ahern wrote: err is initialized to -EINVAL when it is declared. It is not reset until fib_lookup which is well after the 3 users of the martian_source jump. So resetting err to -EINVAL at martian_source label is not needed. Removing that line obviates the need for t

[PATCH] net: mdio-octeon: Add PCI driver binding.

2015-09-22 Thread David Daney
From: David Daney When the Cavium mdio-octeon devices appear in the Thunder family of arm64 based SoCs, they show up as PCI devices. Add PCI driver wrapping so the driver is bound in the standard PCI device scan. When in this form, a single PCI device may have more than a single bus, we call th

Re: [PATCH] net: dsa: Fix Marvell Egress Trailer check

2015-09-22 Thread David Miller
From: Neil Armstrong Date: Tue, 22 Sep 2015 11:28:14 +0200 > The Marvell Egress rx trailer check must be fixed to > correctly detect bad bits in the third byte of the > Eggress trailer as described in the Table 28 of the > 88E6060 datasheet. > The current code incorrectly omits to check the third

Re: [PATCH v2] lib: fix data race in rhashtable_rehash_one

2015-09-22 Thread David Miller
From: Dmitry Vyukov Date: Tue, 22 Sep 2015 10:51:52 +0200 > rhashtable_rehash_one() uses complex logic to update entry->next field, > after INIT_RHT_NULLS_HEAD and NULLS_MARKER expansion: > > entry->next = 1 | ((base + off) << 1) > > This can be compiled along the lines of: > > entry->next = b

Re: [PATCH] ch9200: Convert to use module_usb_driver

2015-09-22 Thread David Miller
From: Tobias Klauser Date: Tue, 22 Sep 2015 09:29:49 +0200 > Converts the ch9200 driver to use the module_usb_driver() macro which > makes the code smaller and a bit simpler. > > Signed-off-by: Tobias Klauser Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev"

Re: [PATCH net v2] openvswitch: Zero flows on allocation.

2015-09-22 Thread David Miller
From: Jesse Gross Date: Mon, 21 Sep 2015 20:21:20 -0700 > When support for megaflows was introduced, OVS needed to start > installing flows with a mask applied to them. Since masking is an > expensive operation, OVS also had an optimization that would only > take the parts of the flow keys that w

Re: [PATCH net-next] tcp: factorize sk_txhash init

2015-09-22 Thread David Miller
From: Eric Dumazet Date: Mon, 21 Sep 2015 16:28:27 -0700 > From: Eric Dumazet > > Neal suggested to move sk_txhash init into tcp_create_openreq_child(), > called both from IPv4 and IPv6. > > This opportunity was missed in commit 58d607d3e52f ("tcp: provide > skb->hash to synack packets") > >

Re: [GIT PULL] ARCNET: refactoring and cleanup

2015-09-22 Thread David Miller
From: Michael Grzeschik Date: Tue, 22 Sep 2015 11:01:41 +0200 > git://git.pengutronix.de/git/mgr/linux.git tags/arcnet-cleanup-v4.3-rc2 Please build this tree against net-next, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vg

Re: [PATCH] net: dsa: actually force the speed on the CPU port

2015-09-22 Thread David Miller
From: Russell King Date: Mon, 21 Sep 2015 21:42:59 +0100 > Commit 54d792f257c6 ("net: dsa: Centralise global and port setup > code into mv88e6xxx.") merged in the 4.2 merge window broke the link > speed forcing for the CPU port of Marvell DSA switches. The original > code was: > > /* MA

Re: [PATCH next 00/84] ipvs: Stop guessing the network namespace (take 2)

2015-09-22 Thread Simon Horman
On Tue, Sep 22, 2015 at 10:50:41AM +0200, Pablo Neira Ayuso wrote: > On Tue, Sep 22, 2015 at 10:22:13AM +0300, Julian Anastasov wrote: > [...] > > > > v2 looks good to me, > > > > Acked-by: Julian Anastasov > > Thanks a lot for reviewing Julian. > > Simon, please let me know how you want t

[PATCH net] bnx2x: byte swap rss_key to comply to Toeplitz specs

2015-09-22 Thread Eric Dumazet
From: Eric Dumazet After a good amount of debugging, I found bnx2x was byte swaping the 40 bytes of rss_key. If we byte swap the key, then bnx2x generates hashes matching MSDN specs as documented in (Verifying the RSS Hash Calculation) https://msdn.microsoft.com/en-us/library/windows/hardware/f

[Patch net] net: revert "net_sched: move tp->root allocation into fw_init()"

2015-09-22 Thread Cong Wang
fw filter uses tp->root==NULL to check if it is the old method, so it doesn't need allocation at all in this case. This patch reverts the offending commit and adds some comments for old method to make it obvious. Fixes: 33f8b9ecdb15 ("net_sched: move tp->root allocation into fw_init()") Reported-b

Re: [PATCH net v2] openvswitch: Zero flows on allocation.

2015-09-22 Thread Pravin Shelar
On Mon, Sep 21, 2015 at 8:21 PM, Jesse Gross wrote: > When support for megaflows was introduced, OVS needed to start > installing flows with a mask applied to them. Since masking is an > expensive operation, OVS also had an optimization that would only > take the parts of the flow keys that were c

[net-next 04/17] fm10k: drop transmitted messages in Tx FIFO as part of reset_work

2015-09-22 Thread Jeff Kirsher
From: Jacob Keller This patch fixes a corner case issue with the PF/VF mailbox code. Currently, fm10k_mbx_reset_work clears various state about the mailbox. However, it does not clear the Tx FIFO head/tail pointers. We can't simply clear these pointers as we unintentionally drop untransmitted mes

[net-next 08/17] e1000: remove dead e1000_init_eeprom_params calls

2015-09-22 Thread Jeff Kirsher
From: Francois Romieu The device probe method e1000_probe calls e1000_init_eeprom_params itself so there's no reason to call it again from e1000_do_write_eeprom or e1000_do_read_eeprom. The sentence above assumes that e1000_init_eeprom_params is effective. e1000_init_eeprom_params depends mostly

[net-next 03/17] ixgbe: Add fdir support for SCTP on X550

2015-09-22 Thread Jeff Kirsher
From: Don Skidmore X550 has HW support for SCTP flow director filters SCTP mask. This patch adds it like we do for UDP and TCP. Signed-off-by: Donald C Skidmore Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 10 ++ drivers/

[net-next 00/17][pull request] Intel Wired LAN Driver Updates 2015-09-22

2015-09-22 Thread Jeff Kirsher
This series contains updates to e1000, e1000e, igbvf, ixgbe, ixgbevf and fm10k. Jacob provides several updates for fm10k, which cleans up comments and most notably a fix for a corner case issue with the PF/VF mailbox code. The issue being fm10k_mbx_reset_work clears various states about the mailbo

[net-next 02/17] ixgbe: Add SFP+ detection for X550 hardware

2015-09-22 Thread Jeff Kirsher
From: Don Skidmore This patch is part of the future enablement of X550 SFP+ support. This HW uses different SDP so the interrupts need to be set up accordingly. Signed-off-by: Donald C Skidmore Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 +--- 1

[net-next 12/17] ixgbe: Accept SFP not present errors on all devices

2015-09-22 Thread Jeff Kirsher
From: Mark Rustad When an SFP not present error is returned by the reset_hw method, accept it and go on, since an SFP can still be inserted. Previously it was only accepted for 82598 devices. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- drivers/net/ether

[net-next 10/17] e1000e: Enable TSO for stacked VLAN

2015-09-22 Thread Jeff Kirsher
From: Toshiaki Makita Setting ndo_features_check to passthru_features_check allows the driver to skip the check for multiple tagged TSO packets and enables stacked VLAN TSO. Tested with I217-LM. Signed-off-by: Toshiaki Makita Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net

[net-next 13/17] ixgbe: Add X550EM support for SFP insertion interrupt

2015-09-22 Thread Jeff Kirsher
From: Mark Rustad Add support for the SFP insertion interrupt on X550EM devices with SFPs. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethern

[net-next 09/17] igbvf: Enable TSO for stacked VLAN

2015-09-22 Thread Jeff Kirsher
From: Toshiaki Makita Setting ndo_features_check to passthru_features_check allows the driver to skip the check for multiple tagged TSO packets and enables stacked VLAN TSO. Tested with I350. Signed-off-by: Toshiaki Makita Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/et

[net-next 14/17] ixgbe: Provide I2C combined on X550EM

2015-09-22 Thread Jeff Kirsher
From: Mark Rustad Provide I2C combined operations on X550EM, not X550 devices. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/

[net-next 15/17] ixgbe: Provide unlocked I2C methods

2015-09-22 Thread Jeff Kirsher
From: Mark Rustad Most I2C accesses take and release semaphores for each access. Now there is a reason to perform multiple I2C operations under the same holding of the semaphore, so provide unlocked I2C methods for that purpose. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by:

[net-next 01/17] fm10k: remove comment about rtnl_lock around mbx operations

2015-09-22 Thread Jeff Kirsher
From: Jacob Keller This comment is no longer true due to a couple of mailbox locking refactors, and we now don't actually do any rtnl protected operations directly in the mailbox path. Remove this comment as it is factually incorrect and confusing. Signed-off-by: Jacob Keller Tested-by: Krishne

[net-next 11/17] ixgbevf: Enables TSO for stacked VLAN

2015-09-22 Thread Jeff Kirsher
From: Toshiaki Makita Setting ndo_features_check to passthru_features_check allows the driver to skip the check for multiple tagged TSO packets and enables stacked VLAN TSO. Tested with 82599ES. Signed-off-by: Toshiaki Makita Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbevf/

[net-next 16/17] ixgbe: Set lan_id before first I2C eeprom access

2015-09-22 Thread Jeff Kirsher
From: Mark Rustad The lan_id is being set after a previous I2C eeprom access which makes no sense because it needs to be set before any access. Move the setting to before the access. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel

[net-next 17/17] ixgbe: Enable bit-banging mode on X550

2015-09-22 Thread Jeff Kirsher
From: Mark Rustad Set the bit banging mode in the hardware when performing bit banging I2C operations on X550. Also control the output enable on both the clock and data lines. Signed-off-by: Mark Rustad Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/

[net-next 06/17] fm10k: TRIVIAL remove unnecessary comma

2015-09-22 Thread Jeff Kirsher
From: Jacob Keller Signed-off-by: Jacob Keller Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/i

[net-next 07/17] fm10k: add support for extra debug statistics

2015-09-22 Thread Jeff Kirsher
From: Jacob Keller Add a private ethtool flag to enable display of these statistics, which are generally less useful. However, sometimes it can be useful for debugging purposes. The most useful portion is the ability to see what the PF thinks the VF mailboxes look like. Signed-off-by: Jacob Kell

[net-next 05/17] fm10k: create "correct" header for the remote end on connect

2015-09-22 Thread Jeff Kirsher
From: Jacob Keller When we connect to the mailbox, we insert a fake disconnect header so that the code does not see an invalid header and thus instantly error every time we bring up the mailbox. However, we incorrectly record the tail and head from the local perspective. Since the remote end shou

Re: [PATCH v3] geneve: ensure ECN info is handled properly in all tx/rx paths

2015-09-22 Thread David Miller
From: "John W. Linville" Date: Mon, 21 Sep 2015 10:29:09 -0400 > Partially due to a pre-exising "thinko", the new metadata-based tx/rx > paths were handling ECN propagation differently than the traditional > tx/rx paths. This patch removes the "thinko" (involving multiple > ip_hdr assignments) o

Re: [PATCH 2/7] 8139cp: Do not re-enable RX interrupts in cp_tx_timeout()

2015-09-22 Thread David Miller
From: David Woodhouse Date: Mon, 21 Sep 2015 15:02:07 +0100 > From: David Woodhouse > > If an RX interrupt was already received but NAPI has not yet run when > the RX timeout happens, we end up in cp_tx_timeout() with RX interrupts > already disabled. Blindly re-enabling them will cause an IRQ

Re: [PATCH 1/7] 8139cp: Improve accuracy of cp_interrupt() return, to survive IRQ storms

2015-09-22 Thread David Miller
From: David Woodhouse Date: Mon, 21 Sep 2015 15:01:49 +0100 > From: David Woodhouse > > The TX timeout handling has been observed to trigger RX IRQ storms. And > since cp_interrupt() just keeps saying that it handled the interrupt, > the machine then dies. Fix the return value from cp_interrupt

Re: [PATCH net-next] bnx2x: add ethtool support to read and change RSS key

2015-09-22 Thread Eric Dumazet
On Tue, 2015-09-22 at 16:06 -0700, David Miller wrote: > From: David Miller > Date: Tue, 22 Sep 2015 14:59:35 -0700 (PDT) > > > From: Eric Dumazet > > Date: Fri, 18 Sep 2015 15:21:52 -0700 > > > >> From: Eric Dumazet > >> > >> While trying to understand why bnx2x RSS hash was not matching > >

Re: [PATCH 27/38] usbnet: remove invalid check

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:59 +0200 > skb->len is always non-negative. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 > > Signed

Re: [PATCH 21/38] mwifiex: fix comparison expression

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:53 +0200 > To avoid underflows signed variables should be used in expression. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http://permalink.gmane.org/gman

Re: [PATCH 22/38] orinoco: fix checking for default value

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:54 +0200 > Thresholds uses -1 to indicate that default value should be used. > Since thresholds are unsigned sign checking makes no sense. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_t

Re: [PATCH 19/38] net: stmmac: fix type of entry variable

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:51 +0200 > Variable can store negative values. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 > > Sig

Re: [PATCH 23/38] rndis_wlan: fix checking for default value

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:55 +0200 > Thresholds uses -1 to indicate that default value should be used. > Since thresholds are unsigned sign checking makes no sense. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_t

Re: [PATCH 17/38] isdn: hisax: fix frame calculation

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:49 +0200 > Difference of unsigned values is also unsigned so it does not make > sense to check its sign. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http

Re: [PATCH 20/38] net: brcm80211: fix range check

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:52 +0200 > Unsigned minus constant is still unsigned so checking its sign makes no > sense. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http://permalink.

Re: [PATCH 18/38] net/ibm/emac: fix type of phy_mode

2015-09-22 Thread David Miller
From: Andrzej Hajda Date: Mon, 21 Sep 2015 15:33:50 +0200 > phy_mode can be negative. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 > > Signed-off-by

Re: [PATCH net-next] bnx2x: add ethtool support to read and change RSS key

2015-09-22 Thread David Miller
From: David Miller Date: Tue, 22 Sep 2015 14:59:35 -0700 (PDT) > From: Eric Dumazet > Date: Fri, 18 Sep 2015 15:21:52 -0700 > >> From: Eric Dumazet >> >> While trying to understand why bnx2x RSS hash was not matching >> Toeplitz specifications, I implemented driver code to support >> ethtool

[PATCH net-next 2/9] net: Remove e_inval label from ip_route_input_slow

2015-09-22 Thread David Ahern
e_inval has 1 explicit user and 1 fallthrough user -- martian_destination. Move setting err to EINVAL before the 2 users and use the goto out label instead of e_inval. Signed-off-by: David Ahern --- net/ipv4/route.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/i

[PATCH net-next 5/9] net: Move martian_destination to helper

2015-09-22 Thread David Ahern
Move stat and logging for martian_destination error into helper function similar to ip_handle_martian_source. Code move only; no functional change. Signed-off-by: David Ahern --- net/ipv4/route.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/net/ip

[PATCH net-next 1/9] net: Remove martian_source_keep_err goto label

2015-09-22 Thread David Ahern
err is initialized to -EINVAL when it is declared. It is not reset until fib_lookup which is well after the 3 users of the martian_source jump. So resetting err to -EINVAL at martian_source label is not needed. Removing that line obviates the need for the martian_source_keep_err label so delete it

[PATCH net-next 4/9] net: Move rth handling from ip_route_input_slow to helper

2015-09-22 Thread David Ahern
Move the rth lookup and allocation from ip_route_input_slow into a helper function. Code move only; no operational change intended. Signed-off-by: David Ahern --- net/ipv4/route.c | 104 --- 1 file changed, 60 insertions(+), 44 deletions(-) di

[PATCH net-next 9/9] net: Remove no_route label

2015-09-22 Thread David Ahern
Move no_route code into helper. Add call to helper at jump sites and remove goto label. Signed-off-by: David Ahern --- net/ipv4/route.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 454c38b

[PATCH net-next 6/9] net: Remove martian_source goto

2015-09-22 Thread David Ahern
Move call to ip_handle_martian_source to various jump sites. The function only increments a counter and possibly does additional logging if CONFIG_IP_ROUTE_VERBOSE is enabled. Signed-off-by: David Ahern --- net/ipv4/route.c | 38 -- 1 file changed, 20 insertio

[PATCH net-next 3/9] net: Remove e_nobufs label from ip_route_input_slow

2015-09-22 Thread David Ahern
e_nobufs has 1 user. Move setting err to -ENOBUFS for the 1 user and use the goto out label instead of e_nobufs. Stepping stone patch; next one moves rth code into a helper function. Signed-off-by: David Ahern --- net/ipv4/route.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

[PATCH net-next 7/9] net: Remove martian_destination label

2015-09-22 Thread David Ahern
Move call to ip_handle_martian_dest to various jump sites. The function only increments a counter and possibly does additional logging if CONFIG_IP_ROUTE_VERBOSE is enabled. Signed-off-by: David Ahern --- net/ipv4/route.c | 24 +--- 1 file changed, 13 insertions(+), 11 deleti

[PATCH net-next 0/9] net: Refactor ip_route_input_slow

2015-09-22 Thread David Ahern
ip_route_input_slow is a maze of gotos (9 of them!) making it error prone and difficult to read. This patchset refactors it, removing all but 2 of the labels. The brd_input label for broadcast path requires too many inputs to make a reasonble helper out of it so I left it as is. None of these patc

[PATCH net-next 8/9] net: Remove local_input label

2015-09-22 Thread David Ahern
Move calls to ip_route_local_input to jump sites and remove local_input label. Signed-off-by: David Ahern --- net/ipv4/route.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index efc8e58c1964..454c38bd23a8 100644 --- a/ne

Re: [FAILED COMPILE v4.3-rc2] conntrack.c:316: undefined reference to `nf_ct_frag6_gather'

2015-09-22 Thread Steven Rostedt
On Tue, 22 Sep 2015 15:16:27 -0700 Joe Stringer wrote: > On 22 September 2015 at 15:05, Steven Rostedt wrote: > > > > The attached config gives the following error: > > > > net/built-in.o: In function `handle_fragments': > > net/openvswitch/conntrack.c:316: undefined reference to `nf_ct_frag6_ga

[PATCH] kernel: Remove unneeded return from void functions

2015-09-22 Thread Guillaume Gomez
Signed-off-by: Guillaume Gomez --- include/linux/clockchips.h | 2 +- include/linux/crypto.h | 2 +- include/linux/device.h | 2 +- include/linux/netdevice.h | 2 +- include/linux/percpu-refcount.h | 2 +- include/linux/timekeeping.h | 2 +- kernel/time/clocksourc

Re: [FAILED COMPILE v4.3-rc2] conntrack.c:316: undefined reference to `nf_ct_frag6_gather'

2015-09-22 Thread Joe Stringer
On 22 September 2015 at 15:05, Steven Rostedt wrote: > > The attached config gives the following error: > > net/built-in.o: In function `handle_fragments': > net/openvswitch/conntrack.c:316: undefined reference to `nf_ct_frag6_gather' > Makefile:916: recipe for target 'vmlinux' failed > > -- Steve

Re: [PATCH v2] netpoll: Close race condition between poll_one_napi and napi_disable

2015-09-22 Thread Stephen Hemminger
On Tue, 22 Sep 2015 16:01:36 -0400 Neil Horman wrote: > + clear_bit(NAPI_STATE_NPSVC, &n->state); > + > } why introduce extra line here? > + /* > + * If we set this bit but see that it has already been set, > + * that indicates that napi has been disabled and we need > +

[FAILED COMPILE v4.3-rc2] conntrack.c:316: undefined reference to `nf_ct_frag6_gather'

2015-09-22 Thread Steven Rostedt
The attached config gives the following error: net/built-in.o: In function `handle_fragments': net/openvswitch/conntrack.c:316: undefined reference to `nf_ct_frag6_gather' Makefile:916: recipe for target 'vmlinux' failed -- Steve config.gz Description: application/gzip

Re: [PATCH 4/7] 8139cp: Fix TSO/scatter-gather descriptor setup

2015-09-22 Thread Francois Romieu
David Woodhouse : [...] > What do you think of finally enabling hw csum and TSO by default, btw? Your router can actively use it and you'll have to keep the pieces together if it breaks, right ? So I'd go for it. -- Ueimor -- To unsubscribe from this list: send the line "unsubscribe netdev" in

Re: [PATCH net-next] bnx2x: add ethtool support to read and change RSS key

2015-09-22 Thread David Miller
From: Eric Dumazet Date: Fri, 18 Sep 2015 15:21:52 -0700 > From: Eric Dumazet > > While trying to understand why bnx2x RSS hash was not matching > Toeplitz specifications, I implemented driver code to support > ethtool -x|-X to try various RSS key combinations easily. > > Then, after some debu

[PATCH] netpoll: Drop budget parameter from NAPI polling call hierarchy

2015-09-22 Thread Alexander Duyck
For some reason we were carrying the budget value around between the various calls to napi->poll. If for example one of the drivers called had a bug in which it returned a non-zero value for work this could result in the budget value becoming negative. Rather than carry around a value of budget t

[net PATCH 3/3] ixgbe: Fix handling of napi budget when multiple queues are enabled per vector

2015-09-22 Thread Alexander Duyck
This patch corrects an issue in which the polling routine would increase the budget for Rx to at least 1 per queue if multiple queues were present. This would result in Rx packets being processed when the budget was 0 which is meant to indicate that no Rx can be handled. Signed-off-by: Alexander D

[net PATCH 0/3] netpoll fixes for Intel drivers

2015-09-22 Thread Alexander Duyck
While reviewing some other patches related to netpoll I started looking at how the drivers were handling their budgets. It turns out that the ixgbe, fm10k, and i40e drivers contained cases where they would increase the budget from 0 and as a result it was possible for them to clean Rx frames insid

[net PATCH 2/3] fm10k: Fix handling of napi budget when multiple queues are enabled per vector

2015-09-22 Thread Alexander Duyck
This patch corrects an issue in which the polling routine would increase the budget for Rx to at least 1 per queue if multiple queues were present. This would result in Rx packets being processed when the budget was 0 which is meant to indicate that no Rx can be handled. Signed-off-by: Alexander D

[net PATCH 1/3] i40e: Fix handling of napi budget

2015-09-22 Thread Alexander Duyck
The polling routine for i40e was rounding up the budget for Rx cleanup to 1. This is incorrect as netpoll will call is expecting no Rx to be processed as the budget passed was 0. Signed-off-by: Alexander Duyck --- drivers/net/ethernet/intel/i40e/i40e_txrx.c |5 + 1 file changed, 5 inser

Re: [PATCH net v2] skbuff: Fix skb checksum flag on skb pull

2015-09-22 Thread Tom Herbert
On Tue, Sep 22, 2015 at 12:57 PM, Pravin B Shelar wrote: > VXLAN device can receive skb with checksum partial. But the checksum > offset could be in outer header which is pulled on receive. This results > in negative checksum offset for the skb. Such skb can cause the assert > failure in skb_check

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Linus Torvalds
On Tue, Sep 22, 2015 at 1:36 PM, Bjørn Mork wrote: > > http://download.intel.com/design/archives/processors/pro/docs/24268935.pdf > > Says "NoFix" for erratas 66 and 92. Yeah, 66 and 92 do look like they could cause the apparent ordering of accesses to be violated. That said, both of them seem to

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Bjørn Mork
Linus Torvalds writes: > The PPRO_FENCE_BUG thing is rather questionable. I'm not sure it's > even documented, but I can't find the official PPro errata now. I > think I discussed it with Andy Glew back when Intel was starting to > document the memory ordering rules. > > I'd be willing to get rid

Re: [PATCH 00/30] Netfilter/IPVS updates for net-next

2015-09-22 Thread David Miller
From: Pablo Neira Ayuso Date: Tue, 22 Sep 2015 11:13:50 +0200 > The following patchset contains Netfilter/IPVS updates for your net-next tree > in this 4.4 development cycle, they are: ... Pulled, thanks Pablo. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of

Re: [PATCH net-next] tcp: Fix CWV being too strict on thin streams

2015-09-22 Thread Neal Cardwell
On Tue, Sep 22, 2015 at 2:02 PM, Neal Cardwell wrote: > More generally, my sense is that we should tweak the is_cwnd_limited code to > shift from saying "set is_cwnd_limited to true iff the cwnd is known to be > limiting transmits" to saying "set is_cwnd_limited to true iff the packets in > flight

[PATCH v2] netpoll: Close race condition between poll_one_napi and napi_disable

2015-09-22 Thread Neil Horman
Drivers might call napi_disable while not holding the napi instance poll_lock. In those instances, its possible for a race condition to exist between poll_one_napi and napi_disable. That is to say, poll_one_napi only tests the NAPI_STATE_SCHED bit to see if there is work to do during a poll, and a

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Linus Torvalds
On Tue, Sep 22, 2015 at 12:50 PM, Tejun Heo wrote: > > Hmmm? We're doing that. PPRO_FENCE makes both acquire and release > use smp_mb(). Oh, right you are. I just grepped for rmb, and missed it because as you say, it's a full mb. The PPRO_FENCE_BUG thing is rather questionable. I'm not sure it

[PATCH net v2] skbuff: Fix skb checksum flag on skb pull

2015-09-22 Thread Pravin B Shelar
VXLAN device can receive skb with checksum partial. But the checksum offset could be in outer header which is pulled on receive. This results in negative checksum offset for the skb. Such skb can cause the assert failure in skb_checksum_help(). Following patch fixes the bug by setting checksum-none

Re: [RHEL6.6 PATCH] netpoll: Close race condition between poll_one_napi and napi_disable

2015-09-22 Thread Neil Horman
On Tue, Sep 22, 2015 at 12:46:13PM -0700, Alexander Duyck wrote: > On 09/22/2015 12:01 PM, Neil Horman wrote: > >On Tue, Sep 22, 2015 at 02:00:23PM -0400, Neil Horman wrote: > >>Drivers might call napi_disable while not holding the napi instance > >>poll_lock. > >>In those instances, its possible

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Tejun Heo
Hello, On Tue, Sep 22, 2015 at 12:28:45PM -0700, Linus Torvalds wrote: > Both acquire and smp_rmb() are equally free on x86. Was this always like this? Ah, okay, from 2007. Was thinking it's still doing an actual rmb. Talk about being confused. > It appears that we don't do the X86_PPRO_FENCE

Re: [RHEL6.6 PATCH] netpoll: Close race condition between poll_one_napi and napi_disable

2015-09-22 Thread Alexander Duyck
On 09/22/2015 12:01 PM, Neil Horman wrote: On Tue, Sep 22, 2015 at 02:00:23PM -0400, Neil Horman wrote: Drivers might call napi_disable while not holding the napi instance poll_lock. In those instances, its possible for a race condition to exist between poll_one_napi and napi_disable. That is t

Re: [PATCH v2 1/3] net: irda: pxaficp_ir: use sched_clock() for time management

2015-09-22 Thread Robert Jarzmik
David Miller writes: > From: Robert Jarzmik > Date: Fri, 18 Sep 2015 18:36:56 +0200 > >> Which brings me to wonder which is the more correct : >> (a) replace to reproduce the same calculation >> Previously mtt was compared to a difference of 76ns steps (as 307ns / 4 >> = >> 76ns): >>

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Linus Torvalds
On Tue, Sep 22, 2015 at 11:53 AM, Tejun Heo wrote: > > I see. The write path here is cold so the competition is between rmb > and acquire. Unless some significant archs completely screwed it up, > acquire still seems like the better option. It's essentially free on > x86 after all. Both acquir

Re: [RHEL6.6 PATCH] netpoll: Close race condition between poll_one_napi and napi_disable

2015-09-22 Thread Neil Horman
On Tue, Sep 22, 2015 at 02:00:23PM -0400, Neil Horman wrote: > Drivers might call napi_disable while not holding the napi instance poll_lock. > In those instances, its possible for a race condition to exist between > poll_one_napi and napi_disable. That is to say, poll_one_napi only tests the > NA

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Tejun Heo
Hello, Linus. On Tue, Sep 22, 2015 at 11:42:33AM -0700, Linus Torvalds wrote: ... > smp_rmb() should generally be about the same cost as an acquire. It > can go either way. > > So *if* the algorithm is amenable to smp_wmb()/smp_rmb() kind of > barriers, that's actually quite possibly better than

Re: [PATCH v2] netlink: Replace rhash_portid with bound

2015-09-22 Thread Linus Torvalds
On Tue, Sep 22, 2015 at 9:10 AM, Tejun Heo wrote: > > That's a pentium pro era errata. Virtually no working machine is > affected by that anymore and nobody builds kernel with that option. > In most cases, store_release and load_acquire are cheaper as they're > more specific. On x86, store_relea

  1   2   3   >