summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-06-27selftests: forwarding: Move multipath_eval() to lib.shPetr Machata2-39/+39
This function will be useful for the GRE multipath test that is coming later. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-27net/tls: Remove VLA usage on nonceKees Cook1-2/+8
It looks like the prior VLA removal, commit b16520f7493d ("net/tls: Remove VLA usage"), and a new VLA addition, commit c46234ebb4d1e ("tls: RX path for ktls"), passed in the night. This removes the newly added VLA, which happens to have its bounds based on the same max value. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26selftests: forwarding: mirror_gre_vlan_bridge_1q: Unset rp_filterPetr Machata1-0/+9
The IP addresses of tunnel endpoint at H3 are set at the VLAN device $h3.555. Therefore when test_gretap_untagged_egress() sets vlan 555 to egress untagged at $swp3, $h3's rp_filter rejects these packets. The test then spuriously fails. Therefore turn off net.ipv4.conf.{all, $h3}.rp_filter. Fixes: 9c7c8a82442c ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests") Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26mdio-mux-gpio: Remove VLA usageKees Cook1-8/+14
In the quest to remove all stack VLA usage from the kernel[1], this allocates the values buffer during the callback instead of putting it on the stack. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge branch 'net-sched-support-replay-of-filter-offload-when-binding-to-block'David S. Miller23-46/+342
Jakub Kicinski says: ==================== net: sched: support replay of filter offload when binding to block This series from John adds the ability to replay filter offload requests when new offload callback is being registered on a TC block. This is most likely to take place for shared blocks today, when a block which already has rules is bound to another interface. Prior to this patch set if any of the rules were offloaded the block bind would fail. A new tcf_proto_op is added to generate a filter-specific offload request. The new 'offload' op is supporting extack from day 0, hence we need to propagate extack to .ndo_setup_tc TC_BLOCK_BIND/TC_BLOCK_UNBIND and through tcf_block_cb_register() to tcf_block_playback_offloads(). The immediate use of this patch set is to simplify life of drivers which require duplicating rules when sharing blocks. Switch drivers (mlxsw) can bind ports to rule lists dynamically, NIC drivers generally don't have that ability and need the rules to be duplicated for each ingress they match on. In code terms this means that switch drivers don't register multiple callbacks for each port. NIC drivers do, and get a separate request and hance rule per-port, as if the block was not shared. The registration fails today, however, if some rules were already present. As John notes in description of patch 7, drivers which register multiple callbacks to shared blocks will likely need to flush the rules on block unbind. This set makes the core not only replay the the offload add requests but also offload remove requests when callback is unregistered. v2: - name parameters in patch 2; - use unsigned int instead of u32 for in_hw_coun; - improve extack message in patch 7. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: call reoffload op on block callback regJohn Hurley3-12/+52
Call the reoffload tcf_proto_op on all tcf_proto nodes in all chains of a block when a callback tries to register to a block that already has offloaded rules. If all existing rules cannot be offloaded then the registration is rejected. This replaces the previous policy of rejecting such callback registration outright. On unregistration of a callback, the rules are flushed for that given cb. The implementation of block sharing in the NFP driver, for example, duplicates shared rules to all devs bound to a block. This meant that rules could still exist in hw even after a device is unbound from a block (assuming the block still remains active). Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: cls_bpf: implement offload tcf_proto_opJohn Hurley1-0/+39
Add the offload tcf_proto_op in cls_bpf to generate an offload message for each bpf prog in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' prog. A prog contains a flag to indicate if it is in hardware or not. To ensure the offload function properly maintains this flag, keep a reference counter for the number of instances of the prog that are in hardware. Only update the flag when this counter changes from or to 0. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: cls_u32: implement offload tcf_proto_opJohn Hurley1-0/+111
Add the offload tcf_proto_op in cls_u32 to generate an offload message for each filter and the hashtable in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' rule. A filter contains a flag to indicate if it is in hardware or not. To ensure the offload function properly maintains this flag, keep a reference counter for the number of instances of the filter that are in hardware. Only update the flag when this counter changes from or to 0. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: cls_matchall: implement offload tcf_proto_opJohn Hurley1-0/+32
Add the reoffload tcf_proto_op in matchall to generate an offload message for each filter in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' rule. Ensure matchall flags correctly report if the rule is in hw by keeping a reference counter for the number of instances of the rule offloaded. Only update the flag when this counter changes from or to 0. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: cls_flower: implement offload tcf_proto_opJohn Hurley2-0/+59
Add the reoffload tcf_proto_op in flower to generate an offload message for each filter in the given tcf_proto. Call the specified callback with this new offload message. The function only returns an error if the callback rejects adding a 'hardware only' rule. A filter contains a flag to indicate if it is in hardware or not. To ensure the reoffload function properly maintains this flag, keep a reference counter for the number of instances of the filter that are in hardware. Only update the flag when this counter changes from or to 0. Add a generic helper function to implement this behaviour. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: add tcf_proto_op to offload a ruleJohn Hurley2-3/+6
Create a new tcf_proto_op called 'reoffload' that generates a new offload message for each node in a tcf_proto. Pointers to the tcf_proto and whether the offload request is to add or delete the node are included. Also included is a callback function to send the offload message to and the option of priv data to go with the cb. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: sched: pass extack pointer to block binds and cb registrationJohn Hurley17-31/+43
Pass the extact struct from a tc qdisc add to the block bind function and, in turn, to the setup_tc ndo of binding device via the tc_block_offload struct. Pass this back to any block callback registrations to allow netlink logging of fails in the bind process. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge branch 'sh_eth-RPADIR-related-clean-ups'David S. Miller2-10/+2
Sergei Shtylyov says: ==================== sh_eth: RPADIR related clean-ups Here's a set of 2 patches against DaveM's 'net-next.git' repo. They are clean-ups related to RPADIR (DMA padding to NET_IP_ALIGN)... ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26sh_eth: remove sh_eth_cpu_data::rpadir_valueSergei Shtylyov2-8/+1
If RPADIR exists, the value written to it is always the same for all SoCs (and derived from NET_IP_ALIGN), so there has not been any need to store it in the *struct* sh_eth_cpu_data... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26sh_eth: fix *enum* RPADIR_BITSergei Shtylyov1-2/+1
The *enum* RPADIR_BIT was declared in the commit 86a74ff21a7a ("net: sh_eth: add support for Renesas SuperH Ethernet") adding SH771x support, however the SH771x manual doesn't have the RPADIR register described and, moreover, tells why the padding insertion must not be used. The newer SoC manuals do have RPADIR documented, though with somewhat different layout -- update the *enum* according to these manuals... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26r8169: reject unsupported WoL optionsHeiner Kallweit1-1/+4
So far unsupported WoL options are silently ignored. Change this and reject attempts to set unsupported options. This prevents situations where a user tries to set an unsupported WoL option and is under the impression it was successful because ethtool doesn't complain. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26selftests: net: Test headroom handling of ip6_gre devicesPetr Machata1-0/+65
Commit 5691484df961 ("net: ip6_gre: Fix headroom request in ip6erspan_tunnel_xmit()") and commit 01b8d064d58b ("net: ip6_gre: Request headroom in __gre6_xmit()") fix problems in reserving headroom in the packets tunneled through ip6gre/tap and ip6erspan netdevices. These two patches included snippets that reproduced the issues. This patch elevates the snippets to a full-fledged test case. Suggested-by: David Miller <davem@davemloft.net> Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge branch 'l2tp-trivial-cleanups'David S. Miller4-32/+5
Guillaume Nault says: ==================== l2tp: trivial cleanups Just a set of unrelated trivial cleanups (remove unused code, make local functions static, etc.). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: make l2tp_xmit_core() return voidGuillaume Nault1-4/+2
It always returns 0, and nobody reads the return value anyway. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: avoid duplicate l2tp_pernet() callsGuillaume Nault1-2/+1
Replace 'l2tp_pernet(tunnel->l2tp_net)' with 'pn', which has been set on the preceding line. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: don't export l2tp_tunnel_closeall()Guillaume Nault2-3/+1
This function is only used in l2tp_core.c. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: don't export l2tp_session_queue_purge()Guillaume Nault2-3/+1
This function is only used in l2tp_core.c. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: remove l2tp_tunnel_priv()Guillaume Nault1-7/+0
This function, and the associated .priv field, are unused. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: remove .show from struct l2tp_tunnelGuillaume Nault2-6/+0
This callback has never been implemented. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26l2tp: remove pppol2tp_session_close()Guillaume Nault1-7/+0
l2tp_core.c verifies that ->session_close() is defined before calling it. There's no need for a stub. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge branch 'DPAA-PTP-clock-and-timestamping'David S. Miller26-115/+361
Yangbo Lu says: ==================== Support DPAA PTP clock and timestamping This patchset is to support DPAA FMAN PTP clock and HW timestamping. It had been verified on both ARM platform and PPC platform. - The patch #1 to patch #5 are to support DPAA FMAN 1588 timer in ptp_qoriq driver. - The patch #6 to patch #10 are to add HW timestamping support in DPAA ethernet driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26dpaa_eth: add the get_ts_info interface for ethtoolYangbo Lu1-0/+39
Added the get_ts_info interface for ethtool to check the timestamping capability. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26dpaa_eth: add support for hardware timestampingYangbo Lu2-5/+86
This patch is to add hardware timestamping support for dpaa_eth. On Rx, timestamping is enabled for all frames. On Tx, we only instruct the hardware to timestamp the frames marked accordingly by the stack. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26fsl/fman: define frame description command UPDYangbo Lu1-0/+1
Defined frame description command FM_FD_CMD_UPD for prepended data updating. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26fsl/fman_port: support getting timestampYangbo Lu2-0/+14
This patch is to add fman_port_get_tstamp() interface to get timestamp. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26fsl/fman: add set_tstamp interfaceYangbo Lu8-0/+60
This patch is to add set_tstamp interface for memac, dtsec, and 10GEC controllers to configure HW timestamping. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26arm64: dts: fsl: move ptp timer out of fmanYangbo Lu1-6/+8
This patch is to move ptp timer node out of fman. Because ptp timer will be probed by ptp_qoriq driver, it should be an independent device in case of conflict memory mapping. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26powerpc/mpc85xx: move ptp timer out of fman in dtsYangbo Lu5-30/+40
This patch is to move ptp timer node out of fman. Because ptp timer will be probed by ptp_qoriq driver, it should be an independent device in case of conflict memory mapping. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26dt-binding: ptp_qoriq: add DPAA FMan supportYangbo Lu2-27/+13
This patch is to add bindings description for DPAA FMan 1588 timer, and also remove its description in fsl-fman dt-bindings document. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26ptp: support DPAA FMan 1588 timer in ptp_qoriqYangbo Lu3-46/+98
This patch is to support DPAA (Data Path Acceleration Architecture) 1588 timer by adding "fsl,fman-ptp-timer" compatible, sharing interrupt with FMan, adding FSL_DPAA_ETH dependency, and fixing up register offset. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26fsl/fman: share the event interruptYangbo Lu1-1/+2
This patch is to share fman event interrupt because the 1588 timer driver will also use this interrupt. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge branch 'mlxsw-Support-bridge-router-interfaces-with-non-default-VLAN'David S. Miller5-14/+323
Ido Schimmel says: ==================== mlxsw: Support bridge router interfaces with non-default VLAN Petr says: When traffic is inserted on a router interface associated with an 802.1q bridge, the VLAN that the traffic appears on is determined by PVID of the bridge device itself. However currently mlxsw always configures such traffic to be forwarded to VLAN 1, regardless of the bridge PVID. Fix the problem by modifying the FID-handling code to assign such traffic not to FID that corresponds to VLAN 1, but to a FID that corresponds to the configured PVID. Bail out if there is no PVID. This is implemented in patches #1 and #2. From that point on, also forbid any changes to bridge device PVID, because such changes would not be reflected. This is implemented in patches #3, #4 and #5. Finally in patch #6, introduce tests that use bridge as a routed interface, and test mlxsw in both the currently-supported scenario of using PVID 1, and the newly-supported one of using a custom PVID. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26selftests: forwarding: Test routed bridge interfacePetr Machata2-0/+245
Add test for cases where bridge itself acts as a router interface, with front panel port attached to the bridge in question. In the first test (router_bridge.sh), VLAN memberships are not configured in any way, and everything uses default PVID of 1. Thus traffic in $h1 and $h2 is untagged. This test ensures that the previous patches didn't break a currently working scenario. In the second test (router_bridge_vlan.sh), a VLAN 555 pvid untagged is added to the bridge CPU port, with that VLAN leaving the bridge tagged through its sole member port. The traffic is therefore expected to come out tagged at $h1. This tests the fix introduced in the previous patches. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26mlxsw: spectrum_switchdev: Ban PVID change if bridge has a RIFPetr Machata1-2/+45
When traffic passes through a router port, it needs to be assigned a FID for ASIC to forward correctly. For bridges, this FID used to be the one corresponding to VLAN 1. In a previous patch, this was changed to instead use the PVID at the time that the RIF is created. This patch guards PVID changes after the RIF was introduced. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26mlxsw: spectrum_router: Add mlxsw_sp_rif_fid()Petr Machata2-0/+6
In order to allow querying of the VID for which a RIF was created, add a new function that returns a FID for a given RIF. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26mlxsw: spectrum_router: Publish mlxsw_sp_rif_find_by_dev()Petr Machata2-5/+3
In order to guard against removal of a PVID for which a FID was allocated, spectrum_switchdev needs to first determine whether there is a RIF associated with a given bridge. To that end, publish a preexisting function mlxsw_sp_rif_find_by_dev(). Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26mlxsw: spectrum_router: Allocate FID according to PVIDPetr Machata1-1/+14
For bridge netdevices, instead of assuming that the router traffic is on VLAN 1, look at the bridge PVID. This patch assumes that the PVID doesn't change after the router interface is created (i.e. after the IP address is assigned). Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26mlxsw: spectrum_router: Propagate extack to .fid_get()Petr Machata1-6/+10
In the follow-up patch, mlxsw_sp_rif_vlan_fid_get() will be changed in a way that could fail. Give that function a possibility to explain the failure through extack. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26tcp: add SNMP counter for zero-window dropsYafang Shao3-2/+8
It will be helpful if we could display the drops due to zero window or no enough window space. So a new SNMP MIB entry is added to track this behavior. This entry is named LINUX_MIB_TCPZEROWINDOWDROP and published in /proc/net/netstat in TcpExt line as TCPZeroWindowDrop. Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge branch 'NAPI-gro-hash'David S. Miller24-150/+196
Convert GRO receive over to hash table. When many parallel flows are present and being received on the same RX queue, GRO processing can become expensive because each incoming frame must traverse the per-NAPI GRO list at each protocol layer of GRO receive (eth --> ipv{4,6} --> tcp). Use the already computed hash to chain these SKBs in a hash table instead of a simple list. The first patch makes the GRO list a true list_head. The second patch implements the hash table. This series patches basic testing and I added some diagnostics to make sure we really were aggregating GRO frames :-) Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: Convert NAPI gro list into a small hash table.David Miller2-27/+81
Improve the performance of GRO receive by splitting flows into multiple hash chains. Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26net: Convert GRO SKB handling to list_head.David Miller24-141/+133
Manage pending per-NAPI GRO packets via list_head. Return an SKB pointer from the GRO receive handlers. When GRO receive handlers return non-NULL, it means that this SKB needs to be completed at this time and removed from the NAPI queue. Several operations are greatly simplified by this transformation, especially timing out the oldest SKB in the list when gro_count exceeds MAX_GRO_SKBS, and napi_gro_flush() which walks the queue in reverse order. Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-26Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/netDavid S. Miller251-1069/+2947
2018-06-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds40-165/+190
Pull networking fixes from David Miller: 1) Fix netpoll OOPS in r8169, from Ville Syrjälä. 2) Fix bpf instruction alignment on powerpc et al., from Eric Dumazet. 3) Don't ignore IFLA_MTU attribute when creating new ipvlan links. From Xin Long. 4) Fix use after free in AF_PACKET, from Eric Dumazet. 5) Mis-matched RTNL unlock in xen-netfront, from Ross Lagerwall. 6) Fix VSOCK loopback on big-endian, from Claudio Imbrenda. 7) Missing RX buffer offset correction when computing DMA addresses in mvneta driver, from Antoine Tenart. 8) Fix crashes in DCCP's ccid3_hc_rx_send_feedback, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits) sfc: make function efx_rps_hash_bucket static strparser: Corrected typo in documentation. qmi_wwan: add support for the Dell Wireless 5821e module cxgb4: when disabling dcb set txq dcb priority to 0 net_sched: remove a bogus warning in hfsc net: dccp: switch rx_tstamp_last_feedback to monotonic clock net: dccp: avoid crash in ccid3_hc_rx_send_feedback() net: Remove depends on HAS_DMA in case of platform dependency MAINTAINERS: Add file patterns for dsa device tree bindings net: mscc: make sparse happy net: mvneta: fix the Rx desc DMA address in the Rx path Documentation: e1000: Fix docs build error Documentation: e100: Fix docs build error Documentation: e1000: Use correct heading adornment Documentation: e100: Use correct heading adornment ipv6: mcast: fix unsolicited report interval after receiving querys vhost_net: validate sock before trying to put its fd VSOCK: fix loopback on big-endian systems net: ethernet: ti: davinci_cpdma: make function cpdma_desc_pool_create static xen-netfront: Update features after registering netdev ...
2018-06-25Merge branch 'r8169-improve-PHY-initialization-and-WoL-handling'David S. Miller1-25/+15
Heiner Kallweit says: ==================== r8169: improve PHY initialization and WoL handling Series with smaller improvements regarding PHY initialization and WoL handling. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>