summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netlink: pass extended ACK struct to parsing functionsJohannes Berg2017-04-13129-391/+477
| | | | | | | | | Pass the new extended ACK reporting struct to all of the generic netlink parsing functions. For now, pass NULL in almost all callers (except for some in the core.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: allow sending extended ACK with cookie on successJohannes Berg2017-04-133-11/+33
| | | | | | | | | | | | | | | | | | | | Now that we have extended error reporting and a new message format for netlink ACK messages, also extend this to be able to return arbitrary cookie data on success. This will allow, for example, nl80211 to not send an extra message for cookies identifying newly created objects, but return those directly in the ACK message. The cookie data size is currently limited to 20 bytes (since Jamal talked about using SHA1 for identifiers.) Thanks to Jamal Hadi Salim for bringing up this idea during the discussions. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* genetlink: pass extended ACK report downJohannes Berg2017-04-132-2/+16
| | | | | | | | | | | | Pass the extended ACK reporting struct down from generic netlink to the families, using the existing struct genl_info for simplicity. Also add support to set the extended ACK information from generic netlink users. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netlink: extended ACK reportingJohannes Berg2017-04-1317-34/+153
| | | | | | | | | | | | | | Add the base infrastructure and UAPI for netlink extended ACK reporting. All "manual" calls to netlink_ack() pass NULL for now and thus don't get extended ACK reporting. Big thanks goes to Pablo Neira Ayuso for not only bringing up the whole topic at netconf (again) but also coming up with the nlattr passing trick and various other ideas. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: handle link transition from FAIL to UP correctlyMahesh Bandewar2017-04-131-1/+2
| | | | | | | | | | | | | | | | When link transitions from LINK_FAIL to LINK_UP, the commit phase is not called. This leads to an erroneous state causing slave-link state to get stuck in "going down" state while its speed and duplex are perfectly fine. This issue is a side-effect of splitting link-set into propose and commit phases introduced by de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") This patch fixes these issues by calling commit phase whenever link state change is proposed. Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring") Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: dwc-xlgmac: add the initial ethtool supportJie Deng2017-04-136-4/+312
| | | | | | | | It is necessary to provide ethtool support for displaying and modifying parameters of dwc-xlgmac. Signed-off-by: Jie Deng <jiedeng@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ipv4: Refine the ipv4_default_advmssGao Feng2017-04-132-8/+6
| | | | | | | | | | | | | | | | | 1. Don't get the metric RTAX_ADVMSS of dst. There are two reasons. 1) Its caller dst_metric_advmss has already invoke dst_metric_advmss before invoke default_advmss. 2) The ipv4_default_advmss is used to get the default mss, it should not try to get the metric like ip6_default_advmss. 2. Use sizeof(tcphdr)+sizeof(iphdr) instead of literal 40. 3. Define one new macro IPV4_MAX_PMTU instead of 65535 according to RFC 2675, section 5.1. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'rtnetlink-cleanup-user-notifications'David S. Miller2017-04-131-9/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | David Ahern says: ==================== rtnetlink: Cleanup user notifications for netdev events Vlad's recent patch to add the event type to rtnetlink notifications points out a number of redundant or unnecessary notifications sent to userspace for events that are essentially internal to the kernel. Trim the list to put a dent in the notification storm. v2 - rebased to top of net-next with IFLA_EVENT patch reverted - dropped removal NETDEV_CHANGEINFODATA since it is intentionally only to send a message to userspace - dropped NOTIFY_PEERS since Vlad's says it is needed for macvlans - add patches to remove NETDEV_CHANGEUPPER and NETDEV_CHANGE_TX_QUEUE_LEN from the event list ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for NETDEV_CHANGE_TX_QUEUE_LEN eventDavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing tx queue length generates identical messages: [LINK]22: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:04:f4:b7:5c:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 [LINK]22: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:04:f4:b7:5c:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 dummy numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 Remove NETDEV_CHANGE_TX_QUEUE_LEN from the list of notifiers that generate notifications. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for NETDEV_CHANGEUPPER eventDavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | NETDEV_CHANGEUPPER is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for CHANGELOWERSTATE eventDavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | CHANGELOWERSTATE is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for PRECHANGEUPPER eventDavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | PRECHANGEUPPER is an internal event; do not generate userspace notifications. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for POST_TYPE_CHANGE eventDavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the master device for a link generates many messages; the one generated for POST_TYPE_CHANGE is redundant: [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue master br1 state UNKNOWN group default link/ether 02:02:02:02:02:03 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue master br1 state UNKNOWN group default link/ether 02:02:02:02:02:03 brd ff:ff:ff:ff:ff:ff Remove POST_TYPE_CHANGE from the list of notifiers that generate notifications. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for CHANGEADDR eventDavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing hardware address generates redundant messages: [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff Do not send a notification for the CHANGEADDR notifier. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notification for UDP_TUNNEL_PUSH_INFODavid Ahern2017-04-131-1/+0
| | | | | | | | | | | | | | | | NETDEV_UDP_TUNNEL_PUSH_INFO is an internal notifier; nothing userspace can do so don't generate a netlink notification. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rtnetlink: Do not generate notifications for MTU eventsDavid Ahern2017-04-131-2/+0
|/ | | | | | | | | | | | | | | | | | Changing MTU on a link currently causes 3 messages to be sent to userspace: [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1490 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff [LINK]11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default link/ether f2:52:5c:6d:21:f3 brd ff:ff:ff:ff:ff:ff Remove the messages sent for PRE_CHANGE_MTU and CHANGE_MTU netdev events. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tools: bpf_jit_disasm: Add option to dump JIT image to a file.David Daney2017-04-131-4/+36
| | | | | | | | | | | | | | | | | | When debugging the JIT on an embedded platform or cross build environment, libbfd may not be available, making it impossible to run bpf_jit_disasm natively. Add an option to emit a binary image of the JIT code to a file. This file can then be disassembled off line. Typical usage in this case might be (pasting mips64 dmesg output to cat command): $ cat > jit.raw $ bpf_jit_disasm -f jit.raw -O jit.bin $ mips64-linux-gnu-objdump -D -b binary -m mips:isa64r2 -EB jit.bin Signed-off-by: David Daney <david.daney@cavium.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: set total length of the packet to be transmitted in TDES3Niklas Cassel2017-04-137-12/+17
| | | | | | | | | | | | | | | | | | | | Field FL/TPL in register TDES3 is not correctly set on GMAC4. TX appears to be functional on GMAC 4.10a even if this field is not set, however, to avoid relying on undefined behavior, set the length in TDES3. The field has a different meaning depending on if the TSE bit in TDES3 is set or not (TSO). However, regardless of the TSE bit, the field is not optional. The field is already set correctly when the TSE bit is set. Since there is no limit for the number of descriptors that can be used for a single packet, the field should be set to the sum of the buffers contained in: [<desc with First Descriptor bit set> ... <desc n> ... <desc with Last Descriptor bit set>], which should be equal to skb->len. Signed-off-by: Niklas Cassel <niklas.cassel@axis.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: save tid while creating server filterGanesh Goudar2017-04-131-0/+4
| | | | | | | | | Save the filter tid while creating the server filter, which is used later to retrieve the corresponding filter instance while handling the filter reply. Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mvmdio-updates'David S. Miller2017-04-132-13/+50
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Russell King says: ==================== mvmdio updates This series of patches update mvmdio for Armada 8k CP110. A number of issues were found: 1. The driver fails to disable an interrupt when something goes wrong in the probe function. 2. The interrupt is specified in DT to be optional, but the driver unconditionally writes to the interrupt mask register, which may not exist. 3. The DT binding specifies "reg: address and length of the SMI register" however, when supporting the interrupt, the size must cover the interrupt register as well. Update the binding documentation with this information that was previously omitted. 4. If the register size is too small, have the driver print an error and disable use of the interrupt. 5. Armada 8k needs three clocks for the MDIO interface, otherwise the SoC hangs (since it is part of one of the ethernet interfaces.) GOP clock, MG core clock and MG clock are needed on 8k. Augment the binding and driver to allow three clocks to be specified. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mvmdio: allow up to three clocks to be specified for orion-mdioRussell King2017-04-131-9/+24
| | | | | | | | | | | | | | | | | | | | Allow up to three clocks to be specified and enabled for the orion-mdio interface, which are required for this interface to be accessible on Armada 8k platforms. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * dt-bindings: allow up to three clocks for orion-mdioRussell King2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | Armada 8040 needs three clocks to be enabled for MDIO accesses to work. Update the binding to allow the extra clocks to be specified. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mvmdio: disable interrupt if resource size is too smallRussell King2017-04-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | Disable the MDIO interrupt, falling back to polled mode, if the resource size does not allow us to access the interrupt registers. All current DT bindings use a size of 0x84, which allows access, but verifying it is good practice. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * dt-bindings: correct marvell orion MDIO binding documentRussell King2017-04-131-2/+15
| | | | | | | | | | | | | | | | | | Correct the Marvell Orion MDIO binding document to properly reflect the cases where an interrupt is present. Augment the examples to show this. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mvmdio: fix interrupt disable in remove pathRussell King2017-04-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pre-existing write to disable interrupts on the remove path happens whether we have an interrupt or not. While this may seem to be a good idea, this driver is re-used in many different implementations, some where the binding only specifies four bytes of register space. This access causes us to access registers outside of the binding. Make it conditional on the interrupt being present, which is the same condition used when enabling the interrupt in the first place. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mvmdio: disable interrupts in driver failure pathRussell King2017-04-131-0/+2
|/ | | | | | | | | | When the mvmdio driver has an interrupt, it enables the "done" interrupt after requesting its interrupt handler. However, probe failure results in the interrupt being left enabled. Disable it on the failure path. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: make struct net_device::min_header_len 8-bitAlexey Dobriyan2017-04-121-1/+1
| | | | | | | | | | | | | | | This field is never big enough to warrant 16-bitness. 8-bit accesses enjoy shorted encoding on i386/x86_64 than 16-bit accesses: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10 (-10) function old new delta loopback_setup 169 164 -5 ether_setup 148 143 -5 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: neigh: make ->hh_len 32-bitAlexey Dobriyan2017-04-122-4/+3
| | | | | | | | | | | | | | | | | Using 16-bit ->hh_len doesn't save any memory, save some .text instead: add/remove: 0/0 grow/shrink: 1/6 up/down: 2/-19 (-17) function old new delta neigh_update 2312 2314 +2 fwnet_header_cache 199 197 -2 eth_header_cache 101 99 -2 ip6_finish_output2 2371 2368 -3 vrf_finish_output6 1522 1518 -4 vrf_finish_output 1413 1409 -4 ip_finish_output2 1627 1623 -4 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* gso: Support frag_list splitting with head_fragIlan Tayari2017-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A driver may use build_skb() for received packets. These SKBs then have a head_frag. Since commit d7e8883cfcf4 ("net: make GRO aware of skb->head_frag"), GRO may build frag_list SKBs out of head_frag received SKBs. In such a case, the chained SKBs end up with a head_frag. Commit 07b26c9454a2 ("gso: Support partial splitting at the frag_list pointer") adds partial segmentation of frag_list SKB chains into individual SKBs. However, this is not done if the chained SKBs have any linear part, because the device may not be able to DMA the private linear buffer. A chained frag_list SKB with head_frag is wrongfully detected in this case as having a private linear part and thus falls back to software GSO, while in fact the linear part is backed by a DMA page just like any other frag. This causes low performance when forwarding those packets that were built with build_skb() Allow partial segmentation at the frag_list pointer for chained SKBs with head_frag. Note that such SKBs can only be created by GRO, when applied to received packets with head_frag. Also note that this change only affects the data path that performs the partial segmentation at frag_list pointer, and not any of the other more common data paths. Signed-off-by: Ilan Tayari <ilant@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'l2tp-const'David S. Miller2017-04-122-9/+11
|\ | | | | | | | | | | | | | | | | | | | | | | Guillaume Nault says: ==================== l2tp: constify l2tp_session_get*() and l2tp_tunnel_find*() Declare parameters of these functions as "const" where possible. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: define parameters of l2tp_tunnel_find*() as "const"Guillaume Nault2017-04-122-4/+4
| | | | | | | | | | | | | | l2tp_tunnel_find() and l2tp_tunnel_find_nth() don't modify "net". Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
| * l2tp: define parameters of l2tp_session_get*() as "const"Guillaume Nault2017-04-122-5/+7
|/ | | | | | | | | Make l2tp_pernet()'s parameter constant, so that l2tp_session_get*() can declare their "net" variable as "const". Also constify "ifname" in l2tp_session_get_by_ifname(). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ftgmac100-rework-batch4-misc'David S. Miller2017-04-123-123/+247
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benjamin Herrenschmidt says: ==================== ftgmac100: Rework batch 4 - Misc This is v2 of the fourth batch of updates to the ftgmac100 driver. This is a bunch of misc cleanups and fixes, such as properly disabling HW checksum generation on AST2400 where it's known to be broken and some chip init updates. This also adds the ability to turn HW checksum on/off and configure the ring sizes via ethtool. v2 Fixes patch 1/10 (NETIF_F_HW_CSUM conversion) The next (and last) batch will add a few more "features" such as netpoll, multicast/promist, vlan offload... ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Set default ring sizes to 128 entriesBenjamin Herrenschmidt2017-04-121-2/+2
| | | | | | | | | | | | | | | | I haven't seen any improvement above that size on the machines I've tested with. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Make ring sizes configurable via ethtoolBenjamin Herrenschmidt2017-04-121-56/+148
| | | | | | | | | | | | | | | | | | | | We set an arbitrary max at 1024 since we pre-allocate the actual descriptor arrays and skb arrays to the full size to keep the code a bit simpler and avoid allocation failures in the reset task. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Add more register inits in ftgmac100_init_hw()Benjamin Herrenschmidt2017-04-121-0/+36
| | | | | | | | | | | | | | | | Clear stale interrupts on entry, configure FIFO sizes, set FIFO thresholds, configure interrupt mitigation. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Open code remaining register writesBenjamin Herrenschmidt2017-04-121-33/+20
| | | | | | | | | | | | | | | | The helpers just take space but don't provide much value. Simple one line comments are more explanatory. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Rename ftgmac100_setup_mac to ftgmac100_initial_macBenjamin Herrenschmidt2017-04-121-2/+2
| | | | | | | | | | | | | | | | To remove more confusion. This function is about obtaining the initial MAC address at driver probe time. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Rename ftgmac100_set_mac to ftgmac100_write_mac_addrBenjamin Herrenschmidt2017-04-121-3/+3
| | | | | | | | | | | | | | | | To avoid confusion with the ndo callback and generally be clearer about the purpose of that function Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Set netdev->hw_featuresBenjamin Herrenschmidt2017-04-121-3/+4
| | | | | | | | | | | | | | So features can be turned on/off via ethtool Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Disable HW checksum generation on AST2400, enable on othersBenjamin Herrenschmidt2017-04-123-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We found out that HW checksum generation only works from AST2500 onward. This disables it on AST2400 and removes the "no-hw-checksum" properties in the device-trees. The problem we had wasn't related to NC-SI. Also rework the logic testing for that property so it can be used to disable HW checksum generation and checking regardless of whether NC-SI is used or not in case other variants out there need this. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Use device "compatible" property, not machine.Benjamin Herrenschmidt2017-04-123-11/+13
| | | | | | | | | | | | | | | | | | | | | | We test for aspeed chips to handle a couple of special cases, but we do that by checking the machine type which isn't right. Instead check the actual device compatible property. This also updates the dtsi files for the aspeed SoC to match. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ftgmac100: Upgrade to NETIF_F_HW_CSUMBenjamin Herrenschmidt2017-04-121-15/+25
|/ | | | | | | | | The documentation describes NETIF_F_IP_CSUM as deprecated so let's switch to NETIF_F_HW_CSUM and use the helper to handle unhandled protocols. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'net-smc-next'David S. Miller2017-04-1112-50/+87
|\ | | | | | | | | | | | | | | | | | | | | | | | | Ursula Braun says: ==================== net/smc: patches for net-next here are some patches for net/smc. Most important are improvements for socket closing. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: do not use IB_SEND_INLINE together with mapped dataUrsula Braun2017-04-112-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | smc specifies IB_SEND_INLINE for IB_WR_SEND ib_post_send calls, but provides a mapped buffer to be sent. This is inconsistent, since IB_SEND_INLINE works without mapped buffer. Problem has not been detected in the past, because tests had been limited to Connect X3 cards from Mellanox, whose mlx4 driver just ignored the IB_SEND_INLINE flag. For now, the IB_SEND_INLINE flag is removed. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: destruct non-accepted socketsUrsula Braun2017-04-112-6/+9
| | | | | | | | | | | | | | | | Make sure sockets never accepted are removed cleanly. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: remove duplicate unhashUrsula Braun2017-04-111-1/+0
| | | | | | | | | | | | | | | | unhash is already called in sock_put_work. Remove the second call. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: guarantee ConnClosed send after shutdown SHUT_WRUrsula Braun2017-04-111-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | State SMC_CLOSED should be reached only, if ConnClosed has been sent to the peer. If ConnClosed is received from the peer, a socket with shutdown SHUT_WR done, switches errorneously to state SMC_CLOSED, which means the peer socket is dangling. The local SMC socket is supposed to switch to state APPFINCLOSEWAIT to make sure smc_close_final() is called during socket close. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: no socket state changes in tasklet contextUrsula Braun2017-04-116-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several state changes occur during SMC socket closing. Currently state changes triggered locally occur in process context with lock_sock() taken while state changes triggered by peer occur in tasklet context with bh_lock_sock() taken. bh_lock_sock() does not wait till a lock_sock(() task in process context is finished. This may lead to races in socket state transitions resulting in dangling SMC-sockets, or it may lead to duplicate SMC socket freeing. This patch introduces a closing worker to run all state changes under lock_sock(). Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Reported-by: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/smc: always call the POLL_IN part of sk_wake_asyncUrsula Braun2017-04-111-2/+1
| | | | | | | | | | | | | | | | | | Wake up reading file descriptors for a closing socket as well, otherwise some socket applications may stall. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>