Yuchung Cheng [Mon, 12 May 2014 03:22:12 +0000 (20:22 -0700)]
tcp: improve fastopen icmp handling
If a fast open socket is already accepted by the user, it should
be treated like a connected socket to record the ICMP error in
sk_softerr, so the user can fetch it. Do that in both tcp_v4_err
and tcp_v6_err.
Also refactor the sequence window check to improve readability
(e.g., there were two local variables named 'req').
Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Daniel Lee <longinus00@gmail.com> Signed-off-by: Jerry Chu <hkchu@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Mon, 12 May 2014 03:22:11 +0000 (20:22 -0700)]
tcp: use tcp_v4_send_synack on first SYN-ACK
To avoid large code duplication in IPv6, we need to first simplify
the complicate SYN-ACK sending code in tcp_v4_conn_request().
To use tcp_v4(6)_send_synack() to send all SYN-ACKs, we need to
initialize the mini socket's receive window before trying to
create the child socket and/or building the SYN-ACK packet. So we move
that initialization from tcp_make_synack() to tcp_v4_conn_request()
as a new function tcp_openreq_init_req_rwin().
After this refactoring the SYN-ACK sending code is simpler and easier
to implement Fast Open for IPv6.
Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Daniel Lee <longinus00@gmail.com> Signed-off-by: Jerry Chu <hkchu@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Mon, 12 May 2014 03:22:10 +0000 (20:22 -0700)]
tcp: simplify fast open cookie processing
Consolidate various cookie checking and generation code to simplify
the fast open processing. The main goal is to reduce code duplication
in tcp_v4_conn_request() for IPv6 support.
Removes two experimental sysctl flags TFO_SERVER_ALWAYS and
TFO_SERVER_COOKIE_NOT_CHKD used primarily for developmental debugging
purposes.
Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Daniel Lee <longinus00@gmail.com> Signed-off-by: Jerry Chu <hkchu@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Mon, 12 May 2014 03:22:09 +0000 (20:22 -0700)]
tcp: move fastopen functions to tcp_fastopen.c
Move common TFO functions that will be used by both v4 and v6
to tcp_fastopen.c. Create a helper tcp_fastopen_queue_check().
Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Daniel Lee <longinus00@gmail.com> Signed-off-by: Jerry Chu <hkchu@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 May 2014 21:46:19 +0000 (17:46 -0400)]
Merge branch 'cdc_mbim-next'
Bjørn Mork says:
====================
cdc_mbim: cleanups and new features
This series depends on commit 6b5eeb7f874b ("net: cdc_mbim: handle
unaccelerated VLAN tagged frames"), which is currently in "net" but
not yet in "net-next".
Patch 4 might have a minor context collision with the "cdc_ncm: add
buffer tuning and stats using ethtool" series I just posted for
review. Please let me know if I should submit an adjusted version
in either direction. These two series' are otherwise completely
independent of each other.
The major new feature here is in patch 1, which I hope will solve
some problems with the original design without changing the existing
API, optionally allowing IP session 0 to be treated like any other
MBIM session.
The rest are some minor cleanups and finally some documentation of
the current driver APIs, after this series has been applied. I
started feeling a bit more mortal than usual lately, which probably
is healthy, and realized that I should put some of the stuff in my
head in a somewhat less volatile storage.
v2:
Fixed patch 1 so that it actually does what it claims to do. This time
it is even tested for functionality, and not just build tested...
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Bjørn Mork [Sun, 11 May 2014 08:47:15 +0000 (10:47 +0200)]
net: cdc_ncm/cdc_mbim: rework probing of NCM/MBIM functions
The NCM class match in the cdc_mbim driver is confusing and
cause unexpected behaviour. The USB core guarantees that a
USB interface is in altsetting 0 when probing starts. This
means that devices implementing a NCM 1.0 backwards
compatible MBIM function (a "NCM/MBIM function") always hit
the NCM entry in the cdc_mbim driver match table. Such
functions will never match any of the MBIM entries.
This causes unexpeced behaviour for cases where the NCM and
MBIM entries are differet, which is currently the case for
all except Ericsson devices.
Improve the probing of NCM/MBIM functions by looking up the
device again in the cdc_mbim match table after switching to
the MBIM identity.
The shared altsetting selection is updated to better
accommodate the new probing logic, returning the preferred
altsetting for the control interface instead of the data
interface. The control interface altsetting update is moved
to the cdc_mbim driver. It is never necessary to change the
control interface altsetting for NCM.
Cc: Greg Suarez <gsuarez@smithmicro.com>
Reported by: Yu-an Shih <yshih@nvidia.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Bjørn Mork [Sun, 11 May 2014 08:47:13 +0000 (10:47 +0200)]
net: cdc_mbim: reject IP packets on DSS VLANs
DSS VLANs are pseudo network interfaces representing arbitrary
data streams, and specifically not IP. Preventing spurious IP
packets can sometimes be a hassle. The kernel will for example
send an IPv6 Router Solicit when the interface is brought up
unless the user has been careful enough to disable IPv6 first.
Such packets forwared to a MBIM DSS session will look like
spurious noise to the device, and can cause it to log an error
or even malfunction.
Drop all IP packets on the designated DSS VLANs to prevent such
unwanted spurious transmissions.
Cc: Greg Suarez <gsuarez@smithmicro.com> Reported-by: Arnaud Desmier <adesmier@sequans.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Bjørn Mork [Sun, 11 May 2014 08:47:12 +0000 (10:47 +0200)]
net: cdc_mbim: optionally use VLAN ID 4094 for IP session 0
The cdc_mbim driver maps 802.1q VLANs to MBIM IP and DSS
sessions. MBIM IP session 0 is handled as an exception and
is mapped to untagged frames.
This patch adds optional support for remapping MBIM IP
session 0 to 802.1q VLAN ID 4094 instead. The default
behaviour is not changed. The new behaviour is triggered
by adding a link for this previously unsupported VLAN.
The untagged mapping was chosen initially to support the
assumed most common use case: Most current MBIM devices only
support a single IP session (i.e. session 0 only), and using
untagged frames lets the users completely ignore the
additonal complexity of the multiplexing layer.
But when the multiplexing features of MBIM are used, then
this netdev gets a double meaning: It becomes the master
interface for all the VLAN subdevs the additional sessions
are mapped to, while still serving as the untagged IP
interface for session 0.
This can be problematic, especially when using Device Service
Streams (DSS), as have become apparent recently with the
availability of devices with real DSS support. Some use cases
need to e.g set a MTU which is higher than allowed for IP
Session 0. The dual role also leads to the situation where
the IP Session 0 interface cannot be taken down without
breaking unrelated IP or DSS sessions - a devastating side
effect which applications managing a simple IP session cannot
be expected to be aware of. A typical DHCP client will assume
that it should bring the interface down after releasing the
IP lease.
These problems can be avoided by tagging IP session 0 packets
too, making this session similar to all other multiplexed
sessions. This redefines the main netdev as an upper master
interface only.
Cc: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Compile tested only, but I'd seriously wonder if this broke anything.
Suggested-by: Dave Miller <davem@davemloft.net> Signed-off-by: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mathias Krause [Sat, 10 May 2014 20:23:28 +0000 (22:23 +0200)]
net: ptp: mark filter as __initdata
sk_unattached_filter_create() will copy the filter's instructions so we
don't need to have the master copy hanging around after initialization.
Signed-off-by: Mathias Krause <minipli@googlemail.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 May 2014 17:13:33 +0000 (13:13 -0400)]
net: filter: Fix redefinition warnings on x86-64.
Do not collide with the x86-64 PTRACE user API namespace.
net/core/filter.c:57:0: warning: "R8" redefined [enabled by default]
arch/x86/include/uapi/asm/ptrace-abi.h:38:0: note: this is the location of the previous definition
Fix by adding a BPF_ prefix to the register macros.
Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Sat, 10 May 2014 18:33:54 +0000 (11:33 -0700)]
bnx2x: fix build when BNX2X_SRIOV is not enabled
Fix build when BNX2X_SRIOV is not enabled.
Change one parameter struct from bnx2 to bnx2x and don't return a value
from a void function.
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h:576:48: warning: 'struct bnx2' declared inside parameter list [enabled by default]
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h:576:48: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h:576:60: warning: 'return' with a value, in function returning void [enabled by default]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 13 May 2014 04:11:07 +0000 (00:11 -0400)]
Merge branch 'cpsw'
Mugunthan V N says:
====================
Add DRA7xx and AM43xx platform support in cpsw-phy-sel driver
Adding DRA7xx and AM43xx platform support to cpsw-phy-sel driver to select
phy mode in control driver and fixing the uninitialized dev by initializing
to platform device structure pointer.
Changes from Initial version
* Added back the missing patch (1/3)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Sun, 4 May 2014 23:39:18 +0000 (16:39 -0700)]
net: rename local_df to ignore_df
As suggested by several people, rename local_df to ignore_df,
since it means "ignore df bit if it is set".
Cc: Maciej Żenczykowski <maze@google.com> Cc: Florian Westphal <fw@strlen.de> Cc: David S. Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
The netlink conflict dealt with moving to netlink_capable() and
netlink_ns_capable() in the 'net' tree vs. supporting 'tc' operations
in non-init namespaces. These were simple transformations from
netlink_capable to netlink_ns_capable.
The Altera driver conflict was simply code removal overlapping some
void pointer cast cleanups in net-next.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 12 May 2014 16:48:25 +0000 (12:48 -0400)]
Merge branch 'cxgb4'
Hariprasad Shenai says:
====================
Misc. fixes for cxgb4 and cxgb4vf driver
This series of patch provides fixes for cxgb4 and cxgb4vf driver related to
rx checksum counter and decodes module type a bit more for ethtool output.
The patches series is created against David Miller's 'net-next' tree.
We would like to request this patch series to get merged via David Miller's
'net-next' tree.
We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Duan Jiong [Fri, 9 May 2014 05:31:43 +0000 (13:31 +0800)]
ipv6: remove parameter rt from fib6_prune_clones()
the parameter rt will be assigned to c.arg in function fib6_clean_tree(),
but function fib6_prune_clone() doesn't use c.arg, so we can remove it
safely.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Haiyang Zhang [Thu, 8 May 2014 22:14:10 +0000 (15:14 -0700)]
Add support for netvsc build without CONFIG_SYSFS flag
This change ensures the driver can be built successfully without the
CONFIG_SYSFS flag.
MS-TFS: 182270
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Thu, 8 May 2014 21:54:42 +0000 (14:54 -0700)]
ptp: fix kconfig dependency warnings
Fix kconfig warnings:
PTP_1588_CLOCK selects NET_PTP_CLASSIFY, which depends on NET,
so PTP_1588_CLOCK should also depend on NET.
PTP_1588_CLOCK_PCH selects PTP_1588_CLOCK so the former should
depend on NET.
warning: (IXP4XX_ETH && PTP_1588_CLOCK) selects NET_PTP_CLASSIFY which has unmet direct dependencies (NET)
warning: (SFC && TILE_NET && BFIN_MAC_USE_HWSTAMP && TIGON3 && FEC && E1000E && IGB && IXGBE && I40E && MLX4_EN && SXGBE_ETH && STMMAC_ETH && TI_CPTS && PTP_1588_CLOCK_GIANFAR && PTP_1588_CLOCK_IXP46X && DP83640_PHY && PTP_1588_CLOCK_PCH) selects PTP_1588_CLOCK which has unmet direct dependencies (NET)
[This warning is caused by the new 'depends on NET' in PTP_1588_CLOCK.]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 12 May 2014 04:25:51 +0000 (00:25 -0400)]
Merge branch 'filter-next'
Alexei Starovoitov says:
====================
BPF testsuite and cleanup
This patchset adds BPF testsuite and improves readability of classic
to internal BPF converter.
The testsuite helped to find 'negative offset bug' in x64 JIT that was
fixed by commit fdfaf64e ("x86: bpf_jit: support negative offsets")
It can be very useful for classic and internal JIT compiler developers.
Also it serves as performance benchmark.
x86_64/i386 pass all tests with and without JIT. arm32 JIT is failing
negative offset tests which are unsupported.
Internal BPF tests are much larger than classic tests to cover different
combinations of registers. Negative tests check correctness of classic
BPF verifier which must reject them.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
"Here are a few small fixes for the current cycle: radiotap TX flags were
wrong (fix by Bob), Chun-Yeow fixes an SMPS issue with mesh interfaces,
Eliad fixes a locking bug and a cfg80211 state problem and finally
Henning sent me a fix for IBSS rate information."
Please let me know if there are problems!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
wangweidong [Thu, 8 May 2014 12:55:01 +0000 (20:55 +0800)]
Revert "sctp: optimize the sctp_sysctl_net_register"
This revert commit efb842c45("sctp: optimize the sctp_sysctl_net_register"),
Since it doesn't kmemdup a sysctl_table for init_net, so the
init_net->sctp.sysctl_header->ctl_table_arg points to sctp_net_table
which is a static array pointer. So when doing sctp_sysctl_net_unregister,
it will free sctp_net_table, then we will get a NULL pointer dereference
like that:
Arnd Bergmann [Thu, 8 May 2014 14:46:52 +0000 (16:46 +0200)]
mdio_bus: fix devm_mdiobus_alloc_size export
commit 6d48f44b7b2 "mdio_bus: implement devm_mdiobus_alloc/devm_mdiobus_free"
introduced a new function devm_mdiobus_alloc_size() but added an export
for a different function devm_mdiobus_alloc(), which was obviously
a simple mistake that leads to build error whenever this function is
used from a loadable module:
bonding: make a generic sysfs option store and fix comments
Introduce a generic option store function for sysfs and remove the
specific ones. The attribute name is used to match against the option
which is to be set.
Also adjust the "name" of tlb_dynamic_lb option to match the sysfs
entry and fix the comments and comment style in bond_sysfs.c
The comments which showed obvious behaviour (i.e. behaviour that's seen
in the option's entry) are removed, the ones that explained important
points about the setting function have been moved above the respective
set function in bond_options.c
There's only 1 exception: num_unsol_na/num_grat_arp since it has 2 names
CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: David S. Miller <davem@davemloft.net> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Yuval Mintz [Thu, 8 May 2014 09:34:31 +0000 (12:34 +0300)]
bnx2x: Fix UNDI driver unload
Commit 91ebb928b "bnx2x: Add support for Multi-Function UNDI" contains a bug
which prevent the emptying of the device's Rx buffers before reset.
As a result, on new boards it is likely HW will reach some fatal assertion
once its interfaces load after UNDI was previously loaded.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Fix potential null-pointer dereference at probe if the mdio-gpio device
has not been successfully probed yet.
The offending commit is plain wrong for a number of reasons. First of
all it accesses internal driver data of an unrelated device. Neither
does it check that the data is non-null (which it is in case the device
has not been probed yet).
Furthermore, the decision on whether to treat any driver data according
to the mdio-gpio driver's internals is made based on the node name. But
the name is not compared against "mdio" which is the normal name for the
node, but rather against "gpio" which the node does not have to be named
(and shouldn't be according to the binding documentation). [ If this
hack is to be kept out-of-tree it should at least be matching against
the compatible property. ]
Cc: Stefan Roese <sr@denx.de> Cc: stable <stable@vger.kernel.org> # v3.14 Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This driver maps 802.1q VLANs to MBIM sessions. The mapping is based on
a bogus assumption that all tagged frames will use the acceleration API
because we enable NETIF_F_HW_VLAN_CTAG_TX. This fails for e.g. frames
tagged in userspace using packet sockets. Such frames will erroneously
be considered as untagged and silently dropped based on not being IP.
Fix by falling back to looking into the ethernet header for a tag if no
accelerated tag was found.
Fixes: a82c7ce5bc5b ("net: cdc_ncm: map MBIM IPS SessionID to VLAN ID") Cc: Greg Suarez <gsuarez@smithmicro.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 9 May 2014 17:13:44 +0000 (13:13 -0400)]
Merge branch 'be2net-next'
Sathya Perla says:
====================
be2net: patch set
This patch set contains the following modificatons:
* three patches (1/7 to 3/7) that fix indentation style issues
* convert the u8 vlan[] array to a bit-map to reduce memory usage
* use MCCQ instead of MBOX in be_cmd_rss_config() as the MCCQ is already
created by that time
* include rx-comp-error counter in ethtool stats
* remove the unused promiscuous setting from be_cmd_vlan_config()
Pls apply to net-next tree. Thanks!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Fri, 9 May 2014 07:59:19 +0000 (13:29 +0530)]
be2net: use MCCQ instead of MBOX in be_cmd_rss_config()
be_cmd_rss_config() is called after the MCCQ is created; so this cmd is
now modified to use the MCCQ instead of MBOX. Also fixed some indentation
problem in this routine.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Fri, 9 May 2014 07:59:18 +0000 (13:29 +0530)]
be2net: include rx-compl error counter in ethtool stats
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh AP [Fri, 9 May 2014 07:59:17 +0000 (13:29 +0530)]
be2net: remove unused code in be_cmd_vlan_config()
For putting interface into vlan promiscuous mode, we use be_cmd_rx_filter()
and not be_cmd_vlan_config(). So remove the "promiscuous" argument from
be_cmd_vlan_config().
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch converts the vlan u8[] used to track vlan-id
membership to a bit-map as it reduces memory usage.
Signed-off-by: Ravikumar Nelavelli <ravikumar.nelavelli@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Fri, 9 May 2014 07:59:15 +0000 (13:29 +0530)]
be2net: fix line wrap and function call indentation in be_ethtool.c
When a funtion definition or a function call spans more than one
line, ensure that the first argument on the subsequent lines is
aligned to the first column after the opening paranthesis of the
function call.
Also removes unnecessary line wrap.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Fri, 9 May 2014 07:59:14 +0000 (13:29 +0530)]
be2net: fix function call indentation in be_cmds.c
When a funtion definition or a function call spans more than one
line, ensure that the first argument on the subsequent lines is
aligned to the first column after the opening paranthesis of the
function call.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Fri, 9 May 2014 07:59:13 +0000 (13:29 +0530)]
be2net: fix line wrap and function call indentation in be_main.c
When a funtion definition or a function call spans more than one
line, ensure that the first argument on the subsequent lines is
aligned to the first column after the opening paranthesis of the
function call.
Also remove unnecessary line wrap.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 9 May 2014 17:10:12 +0000 (13:10 -0400)]
Merge branch 'qlcnic-next'
Rajesh Borundia says:
====================
qlcnic: SR-IOV and FW-dump enhancements
This patch series contain following enhancements.
* SR-IOV enhancements:
- Allow SR-IOV VF's to probe in hypervisor. SR-IOV VF can be
uplinked to bridge/macvtap device with this change.
- Commands from VF are processed in process context
as it may sleep during PF-VF communication. Earlier
we use to process qlcnic_sriov_vf_set_multi function in
process context but now we process individual commands.
- As SR-IOV VF's can be uplinked to bridge/macvtap device
support mac-learning to allow communication through
embedded switch.
* FW-dump enhancement:
- Support to collect RDMEM section of firmware dump using
PEX DMA method for 82xx series adapter.
* Changes in v2:
- Removed unnecessary cast from void pointer to something
else and verified this issue in entire patch series as
per David Miller's suggestion.
Please apply this series to net-next.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Shahed Shaikh [Fri, 9 May 2014 06:51:32 +0000 (02:51 -0400)]
qlcnic: Collect firmware dump using DMA on 82xx adapters
o Add support to collect RDMEM section of firmware dump
using PEX DMA method.
o This patch uses most of the code used for PEX DMA support
on 83xx series adapters and some refactoring.
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Fri, 9 May 2014 06:51:31 +0000 (02:51 -0400)]
qlcnic: Add mac learning support to SR-IOV VF.
o SR-IOV VF can be uplinked to bridge/macvtap device.
Enable mac learning to support communication through
embedded switch.
o Learn vlan filters based on QLCNIC_VLAN_FILTERING flag.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Fri, 9 May 2014 06:51:30 +0000 (02:51 -0400)]
qlcnic: Add support to process commands in atomic context
o Commands from VF may sleep during PF-VF communication.
Earlier we use to process qlcnic_sriov_vf_set_multi
function in process context. Now individual commands
that are called in atomic context are processed in
process context without waiting for completion of
command.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Fri, 9 May 2014 06:51:29 +0000 (02:51 -0400)]
qlcnic: Allow SR-IOV VF probe in hypervisor.
o Add support for SR-IOV VF probe in hypervisor to enable
assignment of VFs within hypervisor.
o SR-IOV VF can be uplinked to bridge/macvtap device with this change.
o Refactor SR-IOV enable/disable code. We cannot take rtnl lock
while enabling/disabling SR-IOV as VF probe will take an rtnl
lock.
o Disable spoofchk by default.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
We currently have two problems with the node flags field:
- The naming of the individual action flags is unclear and confusing
- The flags are often not cleared individually, making it hard to follow
where this happens.
So the series aims to solve above two problems.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Ying Xue [Thu, 8 May 2014 00:54:40 +0000 (08:54 +0800)]
tipc: don't directly overwrite node action_flags
Each node action flag should be set or cleared separately, instead
we now set the whole flags variable in one shot, and it's turned
out to be hard to see which other flags are affected. Therefore,
for instance, we explicitly clear TIPC_WAIT_OWN_LINKS_DOWN bit in
node_lost_contact().
Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 9 May 2014 03:48:01 +0000 (23:48 -0400)]
Merge branch 'inet_csums_part2'
Tom Herbert says:
====================
net: Checksum offload changes - Part II
I am working on overhauling RX checksum offload. Goals of this effort
are:
- Specify what exactly it means when driver returns CHECKSUM_UNNECESSARY
- Preserve CHECKSUM_COMPLETE through encapsulation layers
- Don't do skb_checksum more than once per packet
- Unify GRO and non-GRO csum verification as much as possible
- Unify the checksum functions (checksum_init)
- Simply code
What is in this second patch set:
- Call common inet checksum validation functions in ICMP{4,6},
GRE{4,6}, and IGMP.
- In UDP, verify checksum before handing off to encap_rcv.
- Remove custom UDP checksum validation code in L2TP.
Please review carefully and test if possible, mucking with basic
checksum functions is always a little precarious :-)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 7 May 2014 23:52:48 +0000 (16:52 -0700)]
l2tp: Remove UDP checksum verification
Validating the UDP checksum is now done in UDP before handing
packets to the encapsulation layer. Note that this also eliminates
the "feature" where L2TP can ignore a non-zero UDP checksum (doing
this was contrary to RFC 1122).
Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 7 May 2014 19:52:57 +0000 (12:52 -0700)]
mellanox: Logging message cleanups
Use a more current logging style.
o Coalesce formats
o Add missing spaces for coalesced formats
o Align arguments for modified formats
o Add missing newlines for some logging messages
o Use DRV_NAME as part of format instead of %s, DRV_NAME to
reduce overall text.
o Use ..., ##__VA_ARGS__ instead of args... in macros
o Correct a few format typos
o Use a single line message where appropriate
Signed-off-by: Joe Perches <joe@perches.com> Acked-By: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
dingtianhong [Wed, 7 May 2014 14:10:21 +0000 (22:10 +0800)]
bonding: remove the unused macro
Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
dingtianhong [Wed, 7 May 2014 14:10:20 +0000 (22:10 +0800)]
bonding: simplify the slave_do_arp_validate_only()
The argument slave is not used for slave_do_arp_validate_only(), so no need
to keep it, make the function more simple.
Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
dingtianhong [Wed, 7 May 2014 14:10:19 +0000 (22:10 +0800)]
bonding: remove the unnecessary struct bond_net
Move the structure bond_net forward, and remove the unnecessary structure declaration.
Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Driver for Beckhoff CX5020 EtherCAT master module.
This driver adds support for EtherCAT master module located on CCAT
FPGA found on Beckhoff CX series industrial PCs. The driver exposes
EtherCAT master as an ethernet interface.
EtherCAT is a fieldbus protocol defined on top of ethernet and Beckhoff
CX5020 PCs come with built-in EtherCAT master module located on a FPGA,
which in turn is connected to a PCI bus.
Signed-off-by: Dariusz Marcinkiewicz <reksio@newterm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Tue, 6 May 2014 18:02:50 +0000 (11:02 -0700)]
ping: move ping_group_range out of CONFIG_SYSCTL
Similarly, when CONFIG_SYSCTL is not set, ping_group_range should still
work, just that no one can change it. Therefore we should move it out of
sysctl_net_ipv4.c. And, it should not share the same seqlock with
ip_local_port_range.
BTW, rename it to ->ping_group_range instead.
Cc: David S. Miller <davem@davemloft.net> Cc: Francois Romieu <romieu@fr.zoreil.com> Reported-by: Stefan de Konink <stefan@konink.de> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Cong Wang [Tue, 6 May 2014 18:02:49 +0000 (11:02 -0700)]
ipv4: move local_port_range out of CONFIG_SYSCTL
When CONFIG_SYSCTL is not set, ip_local_port_range should still work,
just that no one can change it. Therefore we should move it out of sysctl_inet.c.
Also, rename it to ->ip_local_ports instead.
Cc: David S. Miller <davem@davemloft.net> Cc: Francois Romieu <romieu@fr.zoreil.com> Reported-by: Stefan de Konink <stefan@konink.de> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Harish Patil [Wed, 7 May 2014 06:06:15 +0000 (02:06 -0400)]
qlcnic: Fix Kconfig dependency on HWMON
Commit 1f0f467b670e "qlcnic: Add hwmon interface to export board
temperature" introduced a randconfig build error in the case
when the hwmon framework is built as a module and the qlcnic
driver itself is built-in:
drivers/built-in.o: In function `qlcnic_register_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1301:
undefined reference to `hwmon_device_register_with_groups'
drivers/built-in.o: In function `qlcnic_unregister_hwmon_dev':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c:1309:
undefined reference to `hwmon_device_unregister'.
This changes the Kconfig logic to enforce that the qlcnic hwmon
support can only be enabled if it is possible to successfully
build it.
Signed-off-by: Harish Patil <harish.patil@qlogic.com> Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Mack [Tue, 6 May 2014 16:52:16 +0000 (18:52 +0200)]
net: mdio: of_mdiobus_register(): fall back to mdiobus_register() for !CONFIG_OF
If CONFIG_OF is not set, make of_mdiobus_register() call
mdiobus_register() instead of returning -ENOSYS.
This way, we can just call of_mdiobus_register() from all DT-enabled
drivers to handle the compat cases.
Signed-off-by: Daniel Mack <zonque@gmail.com> Suggested-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sergey Popovich [Tue, 6 May 2014 15:23:08 +0000 (18:23 +0300)]
ipv4: fib_semantics: increment fib_info_cnt after fib_info allocation
Increment fib_info_cnt in fib_create_info() right after successfuly
alllocating fib_info structure, overwise fib_metrics allocation failure
leads to fib_info_cnt incorrectly decremented in free_fib_info(), called
on error path from fib_create_info().
Signed-off-by: Sergey Popovich <popovich_sergei@mail.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 May 2014 20:53:28 +0000 (16:53 -0400)]
Merge branch 'qlcnic_net'
Rajesh Borundia says:
====================
qlcnic: Bug fixes.
This patch series contain following bug fixes.
* Fix panic where driver was accessing un-initialized crb_intr_mask
in non Multi-Tx queue mode while dumping TX queue.
* Do not set netdev->real_num_tx_queues directly from driver instead
use kernel defined netif_set_real_num_tx_queues() API. Also notify
stack about change in number of Rx queues.
Please apply this series to net.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Shahed Shaikh [Tue, 6 May 2014 07:46:49 +0000 (03:46 -0400)]
qlcnic: Set real_num_{tx|rx}_queues properly
Do not set netdev->real_num_tx_queues directly,
let netif_set_real_num_tx_queues() take care of it.
Do not overwrite netdev->num_tx_queues everytime when driver
changes its Tx ring size through ethtool -L and also notify
stack to update number of Rx queues.
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Manish Chopra [Tue, 6 May 2014 07:46:48 +0000 (03:46 -0400)]
qlcnic: Fix panic while dumping TX queues on TX timeout
o In case of non-multi TX queue mode driver does not initialize "crb_intr_mask" pointer
and driver was accessing that un-initialized pointer while dumping TX queue.
So dump "crb_intr_mask" only when it is initilaized.
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 May 2014 20:51:22 +0000 (16:51 -0400)]
Merge branch 'micrel_ksz9031'
Hubert Chaumette says:
====================
net/phy: micrel: Add DT configuration support and documentation for KSZ9031
- Adds DT configuration support for ksz9031
- Renames micrel-ksz9021.txt to micrel-ksz90x1.txt and adds ksz9031 binding
documentation
Changes since v3:
- Rebased on net-next
Changes since v2:
- Merged together ksz9031_load_{clk,data,ctrl}_skew_values()
- Added field length and number of fields prameter to account for registers
specificities
- Added binding documentation
Changes since v1:
- Removed ksz9021 and ksz9031 fixup deletions from arch/arm/mach-imx/mach-imx6q.c
Hubert Chaumette (2):
Update Micrel KSZ90x1 binding documentation
ARM: i.MX6: Add OF configuration support for ksz9031
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
ARM: i.MX6: Add OF configuration support for ksz9031
Adds support for ksz9031 PAD skew configuration over devicetree.
Signed-off-by: Hubert Chaumette <hchaumette@adeneo-embedded.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Renames micrel-ksz9021.txt to micrel-ksz90x1.txt and adds documentation for
the KSZ9031 binding from patch 1. Also adds step increment information, and
note about phy fixups.
Signed-off-by: Hubert Chaumette <hchaumette@adeneo-embedded.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong [Mon, 5 May 2014 22:55:55 +0000 (15:55 -0700)]
net: clean up snmp stats code
commit 8f0ea0fe3a036a47767f9c80e (snmp: reduce percpu needs by 50%)
reduced snmp array size to 1, so technically it doesn't have to be
an array any more. What's more, after the following commit:
We simply say that regular this_cpu use must be safe regardless of
preemption and interrupt state. That has no material change for x86
and s390 implementations of this_cpu operations. However, arches that
do not provide their own implementation for this_cpu operations will
now get code generated that disables interrupts instead of preemption.
probably no arch wants to have SNMP_ARRAY_SZ == 2. At least after
almost 3 years, no one complains.
So, just convert the array to a single pointer and remove snmp_mib_init()
and snmp_mib_free() as well.
Cc: Christoph Lameter <cl@linux.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Horman [Mon, 5 May 2014 18:51:47 +0000 (14:51 -0400)]
jme: Fix DMA unmap warning
The jme driver forgot to check the return status from pci_map_page in its tx
path, causing a dma api warning on unmap. Easy fix, just do the check and
augment the tx path to tell the stack that the driver is busy so we re-queue the
frame.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Guo-Fu Tseng <cooldavid@cooldavid.org> CC: "David S. Miller" <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 7 May 2014 19:49:16 +0000 (15:49 -0400)]
Merge branch 'gso_forward'
Florian Westphal says:
====================
net: ip: push gso skb forwarding handling down the stack
Turns out doing the segmentation in forwarding was not a bright idea,
there are corner-cases where this has unintended side-effects.
This patch pushes the segmentation downwards.
After this, netif_skb_dev_features() function can be removed
again, it was only added to fetch the features of the output device,
we can just use skb->dev after the pushdown.
Tested with following setup:
host -> kvm_router -> kvm_host
mtu 1500 mtu1280
- 'host' has route to kvm_host with locked mtu of 1500
- gso/gro enabled on all interfaces
Did tests with all of following combinations:
- netfilter conntrack off and on on kvm_router
- virtio-net and e1000 driver on kvm_router
- tcp and udp bulk xmit from host to kvm_host
for tcp, I added TCPMSS mangling on kvm_host to make it lie about tcp mss.
Also added a dummy '-t mangle -A POSTROUTING -p udp -f'
rule to make sure no udp fragments are seen in the 'conntrack on'
and 'virtio-net' case.
Also checked (with ping -M do -s 1400)' that it still sends the wanted
icmp error message when size exceeds 1280.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
net: ip: push gso skb forwarding handling down the stack
Doing the segmentation in the forward path has one major drawback:
When using virtio, we may process gso udp packets coming
from host network stack. In that case, netfilter POSTROUTING
will see one packet with udp header followed by multiple ip
fragments.
Delay the segmentation and do it after POSTROUTING invocation
to avoid this.
Fixes: fe6cc55f3a9 ("net: ip, ipv6: handle gso skbs in forwarding path") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>