summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* liquidio: optimize DMA in NUMA systemsVSR Burru2017-03-135-22/+9Star
| | | | | | | | | | | | | Optimize DMA in NUMA systems by allocating memory from NUMA node that NIC is plugged in to; DMA will no longer cross NUMA nodes. If NIC IRQs are pinned to a local CPU, that CPU's access to the DMA'd data is also optimized. Signed-off-by: VSR Burru <veerasenareddy.burru@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'netvsc-fix-module-removal-hangs'David S. Miller2017-03-131-16/+4Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | Stephen Hemminger says: ==================== netvsc: fix module removal hangs A couple of patches are necessary to make netvsc driver module removable again. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * netvsc: fix hang on netvsc module removalstephen hemminger2017-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | The code in netvsc_device_remove was incorrectly calling napi_disable repeatedly on the same element. This would cause attempts to remove netvsc module to hang. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * netvsc: need napi scheduled during removalstephen hemminger2017-03-131-14/+2Star
|/ | | | | | | | | | Since rndis_halt_device waits until all outstanding sends and receives are completed. Netvsc device needs to still schedule NAPI to see those completions. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'dpaa_eth-next' of git://git.freescale.com/ppc/upstream/linuxDavid S. Miller2017-03-135-47/+248
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Madalin Bucur says: ==================== QorIQ DPAA 1 updates This patch set introduces a series of fixes and features to the DPAA 1 drivers. Besides activating hardware Rx checksum offloading, four traffic classes are added for Tx traffic prioritisation. changes from v1: added patch to enable context-A stashing ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * dpaa_eth: enable context-A stashingMadalin Bucur2017-03-091-1/+2
| | | | | | | | Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * dpaa_eth: enable multiple Tx traffic classesCamelia Groza2017-03-091-0/+36
| | | | | | | | | | | | | | | | | | Implement the setup_tc ndo to configure prioritised Tx traffic classes. Priorities range from 0 (lowest) to 3 (highest). The driver assigns NR_CPUS queues to each traffic class. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * dpaa_eth: add four prioritised Tx traffic classesCamelia Groza2017-03-092-9/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Each traffic class corresponds to a WQ priority level. The number of Tx netdev queues and frame queues is increased to NR_CPUS queues for each traffic class. In addition, the priority of the Rx, Error and Conf queues is lowered but their order is maintained. By default, only one traffic class is enabled, only the low priority Tx queues are used and only the corresponding netdev queues are advertised. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * dpaa_eth: do not ignore port api return valueMadalin Bucur2017-03-091-22/+43
| | | | | | | | | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * dpaa_eth: enable Rx checksum offloadMadalin Bucur2017-03-091-2/+27
| | | | | | | | | | | | Use the FMan HW parser L4CV flag to offload Rx checksumming. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * dpaa_eth: remove redundant initializationMadalin Bucur2017-03-091-1/+1
| | | | | | | | Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * fsl/fman: enlarge FIFO to allow for the 5th portMadalin Bucur2017-03-091-1/+1
| | | | | | | | Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * fsl/fman: remove wrong freeMadalin Bucur2017-03-091-3/+1Star
| | | | | | | | | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * fsl/fman: set HW parser as BMI next engineMadalin Bucur2017-03-092-3/+90
| | | | | | | | | | | | Enable the HW parser for all DPAA interfaces. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
| * fsl/fman: parse result data is big endianMadalin Bucur2017-03-091-5/+5
| | | | | | | | Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
* | net: ipv6: Add early demux handler for UDP unicastsubashab@codeaurora.org2017-03-131-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While running a single stream UDPv6 test, we observed that amount of CPU spent in NET_RX softirq was much greater than UDPv4 for an equivalent receive rate. The test here was run on an ARM64 based Android system. On further analysis with perf, we found that UDPv6 was spending significant time in the statistics netfilter targets which did socket lookup per packet. These statistics rules perform a lookup when there is no socket associated with the skb. Since there are multiple instances of these rules based on UID, there will be equal number of lookups per skb. By introducing early demux for UDPv6, we avoid the redundant lookups. This also helped to improve the performance (800Mbps -> 870Mbps) on a CPU limited system in a single stream UDPv6 receive test with 1450 byte sized datagrams using iperf. v1->v2: Use IPv6 cookie to validate dst instead of 0 as suggested by Eric Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: sched: make default fifo qdiscs appear in the dumpJiri Kosina2017-03-1318-17/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original reason [1] for having hidden qdiscs (potential scalability issues in qdisc_match_from_root() with single linked list in case of large amount of qdiscs) has been invalidated by 59cc1f61f0 ("net: sched: convert qdisc linked list to hashtable"). This allows us for bringing more clarity and determinism into the dump by making default pfifo qdiscs visible. We're not turning this on by default though, at it was deemed [2] too intrusive / unnecessary change of default behavior towards userspace. Instead, TCA_DUMP_INVISIBLE netlink attribute is introduced, which allows applications to request complete qdisc hierarchy dump, including the ones that have always been implicit/invisible. Singleton noop_qdisc stays invisible, as teaching the whole infrastructure about singletons would require quite some surgery with very little gain (seeing no qdisc or seeing noop qdisc in the dump is probably setting the same user expectation). [1] http://lkml.kernel.org/r/1460732328.10638.74.camel@edumazet-glaptop3.roam.corp.google.com [2] http://lkml.kernel.org/r/20161021.105935.1907696543877061916.davem@davemloft.net Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: hyperv: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-03-131-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Tested-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: fjes: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-03-131-10/+9Star
| | | | | | | | | | | | | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: via: via-velocity: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-03-131-27/+35
| | | | | | | | | | | | | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: via: via-rhine: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-03-131-6/+8
| | | | | | | | | | | | | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: intel: ixgbe: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-03-131-77/+91
| | | | | | | | | | | | | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: tundra: tsi108: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes2017-03-131-6/+8
| | | | | | | | | | | | | | | | | | | | | | The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'fib-notifications-cleanup'David S. Miller2017-03-105-103/+113
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jiri Pirko says: ==================== ipv4: fib: FIB notifications cleanup Ido says: The first patch moves the core FIB notification code to a separate file, so that code related to FIB rules is placed in fib_rules.c and not fib_trie.c. The reason for the change will become even more apparent in follow-up patchset where we extend the FIB rules notifications. Second patch removes a redundant argument. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ipv4: fib: Remove redundant argumentIdo Schimmel2017-03-104-20/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always pass the same event type to fib_notify() and fib_rules_notify(), so we can safely drop this argument. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ipv4: fib: Move FIB notification code to a separate fileIdo Schimmel2017-03-105-96/+113
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the code concerned with the FIB notification chain currently resides in fib_trie.c, but this isn't really appropriate, as the FIB notification chain is also used for FIB rules. Therefore, it makes sense to move the common FIB notification code to a separate file and have it export the relevant functions, which can be invoked by its different users (e.g., fib_trie.c, fib_rules.c). Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'mlxsw-vrf-offload-prep'David S. Miller2017-03-104-849/+948
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jiri Pirko says: ==================== mlxsw: Preparations for VRF offload Ido says: This patchset aims to prepare the mlxsw driver for VRF offload. The follow-up patchsets that introduce VRF support can be found here: https://github.com/idosch/linux/tree/idosch-next The first four patches are mainly concerned with the netdevice notification block. There are no functional changes, but merely restructuring to more easily integrate VRF enslavement. Patches 5-10 remove various assumptions throughout the code about a single virtual router (VR) and also restructure the internal data structures to more accurately represent the device's operation. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum_router: Make abort mechanism VR-awareIdo Schimmel2017-03-101-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the abort mechanism is invoked it binds the first virtual router (VR) to an LPM tree and inserts a default route to direct packets to the CPU. With VRFs, we can have router interfaces (RIFs) bound to multiple VRs, so we need to make sure packets are trapped from all VRs and not just the first one. Upon abort invocation, bind all active VRs to the same LPM tree and insert a default route in each. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum_router: Explicitly Associate RIFs with VRsIdo Schimmel2017-03-103-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now we implicitly associated all the router interfaces (RIFs) with the first virtual router (VR). This must be changed in order to enable VRF offload. Otherwise, a packet received via a VRF slave would do a FIB lookup in the same table used by other VRFs. Instead, bind the RIF to a VR according to the table where FIB lookup should be performed for packets received via the RIF. Currently, we only care about the MAIN and LOCAL tables (which we squash together). Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum_router: Refactor virtual router handlingIdo Schimmel2017-03-102-151/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A virtual router (VR) is an entity within the device to which routing tables and interfaces can be bound to. It can be used to implement VRFs. In the initial implementation we associated the VR with a specific protocol (e.g., IPv4) and an LPM tree. However, this isn't really accurate, as the same VR can be used for both IPv4 and IPv6 traffic, by binding a different LPM tree to a {VR, Proto} pair. This patch aims to restructure the VR code according to the above logic, so that VRs are more accurately represented by the driver's data structures. The main motivation behind this change is to prepare the driver for VRF offload. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum_router: Simplify LPM tree allocationIdo Schimmel2017-03-101-13/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When looking for a new LPM tree we should always consider all the unused trees. It doesn't matter if the new tree is required due to changes in currently used prefixes inside an existing routing table or because a route was inserted into an empty table. Both cases are functionally identical and therefore should be treated the same. When looking for a new LPM tree, consider all unused trees and don't reserve trees for specific cases. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum_router: Place RIF related code with router codeIdo Schimmel2017-03-103-642/+644
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The inetaddr notification block is currently implemented in the main driver file, but this isn't really appropriate, as it mainly creates and destroys router interfaces (RIFs) which belong with the rest of the router code. This will become even more apparent later on when we'll need to bind these RIFs to virtual routers according to the VRF's table. Structure the driver better and prevent unnecessary function exports by moving the RIF related code with the rest of the router code. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum_router: Allow more route types to be programmedIdo Schimmel2017-03-101-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow 'unreachable', 'blackhole' and 'prohibit' route types to be programmed into the device by sending any packet hitting them to the CPU. This is needed so that users will be able to program a default route into the VRF's table, thereby preventing lookup from leaking to other tables. Audit the code paths to make sure we don't rely on the presence of a nexthop netdev, as it doesn't exist for above mentioned route types. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum: Destroy RIFs based on last removed addressIdo Schimmel2017-03-102-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | We only use the RIF reference count to determine when the last IP address was removed, but instead we can just test 'in_dev->ifa_list'. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum: Associate PVID vPort with appropriate netdevIdo Schimmel2017-03-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a VLAN device is configured on top of a LAG device (f.e., bond0.10), a vPort is created on top of each of the LAG's slaves and its 'dev' pointer is set to the VLAN device. This is in contrast to the implicit PVID vPort (representing 'bond0'), whose 'dev' pointer keeps pointing to the port netdev itself (f.e., 'sw1p1'). Make both cases consistent by setting their 'dev' pointer to the actual netdev they represent. Either the LAG device itself (in the case of the PVID vPort) or the VLAN device on top of it. This will later allow us to more easily understand for which netdev we should create the router interface (RIF) upon enslavement to a VRF master. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum: Don't assume upper device's typeIdo Schimmel2017-03-101-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an upper device is configured on top of a vPort we make sure it's a bridge master during PRECHANGEUPPER and fail otherwise. Therefore, when CHANGEUPPER is later received we don't bother checking the upper's type. Make the code more extendable in preparation for VRF uppers, by checking the upper's type. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum: Sanitize bridge's upper devicesIdo Schimmel2017-03-101-12/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | We're going to allow bridges stacked on top of port netdevs to be enslaved to a VRF, but for now, only VLAN uppers of the VLAN-aware bridge are supported. Sanitize any other bridge upper. This is consistent with the way we sanitize port netdevs' uppers. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'mlxsw-VLAN-offload-cls_flower'David S. Miller2017-03-109-2/+168
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jiri Pirko says: ==================== mlxsw: spectrum: Add support for VLAN offload for cls_flower This patchset adds support to offload VLAN modify TC action and adds support to offload cls_flower rules that include VID and PCP matching. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum: Add support for flower matches on VLAN ID, PCPPetr Machata2017-03-104-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce MLXSW_AFK_ELEMENT_VID, PCP and declare them in afk_element infos that contain them. Use the elements when VLAD ID or priority are used in the flow. Also add MLXSW_AFK_ELEMENT_VID, PCP to mlxsw_sp_acl_tcam_pattern_ipv4. Both items are included in mlxsw_sp_afk_element_info_l2_dmac, resp. _smac, and both MLXSW_AFK_ELEMENT_SMAC and _DMAC are already in the pattern. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | mlxsw: spectrum: Add support for vlan modify TC actionPetr Machata2017-03-106-0/+132
|/ / | | | | | | | | | | | | | | | | | | Add VLAN action offloading. Invoke it from Spectrum flower handler for "vlan modify" actions. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tcp: rename *_sequence_number() to *_seq_and_tsoff()Alexey Kodanev2017-03-106-35/+34Star
| | | | | | | | | | | | | | | | | | | | | | The functions that are returning tcp sequence number also setup TS offset value, so rename them to better describe their purpose. No functional changes in this patch. Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: ks8851: Added support for half-duplex SPISergey Shcherbakov2017-03-101-30/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | In original driver was implemented support for half- and full-duplex modes, but it was not enabled. Instead of it ks8851_rx_1msg method always returns "true" that means "full-duplex" mode. This patch replaces hard-coded functionality with flexible solution that supports both SPI modes. Signed-off-by: Sergey Shcherbakov <shchers@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'bonding-winter-cleanup'David S. Miller2017-03-102-27/+37
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mahesh Bandewar says: ==================== bonding: winter cleanup Few cleanup patches that I have accumulated over some time now. (a) First two patches are basically to move the work-queue initialization from every ndo_open / bond_open operation to once at the beginning while port creation. Work-queue initialization is an unnecessary operation for every 'ifup' operation. However we have some mode-specific work-queues and mode can change anytime after port creation. So the second patch is to ensure the correct work-handler is called based on the mode. (b) Third patch is simple and straightforward that removes hard-coded value that was added into the initial commit and replaces it with the default value configured. (c) The final patch in the series removes the unimplemented "port-moved" state from the LACP state machine. This state is defined but never set so removing from the state machine logic makes code little cleaner. (d) Reduce scope of some global variables to local. Note: None of these patches are making any functional changes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bonding: reduce scope of some global variablesMahesh Bandewar2017-03-101-6/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the bond param variables are declared global while it's not really necessary for these variables to be global. So moving them to the location these are used. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bonding: remove "port-moved" state that was never implementedMahesh Bandewar2017-03-101-8/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LACP state-machine defines "port-moved" state when the same ActorSystemID and Port are seen in a LACPDU received on different port. The state is never set since it's not implemented. However the state-machine attempts to clear that state occasionally. LACP state machine is already complicated and since this state is not implemented, removing it's checks makes the state-machine little simpler. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bonding: remove hardcoded valueMahesh Bandewar2017-03-101-1/+13
| | | | | | | | | | | | | | | | | | | | | Eliminate hard-coded value and use the default that is set. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bonding: initialize work-queues during creation of bondMahesh Bandewar2017-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Initializing work-queues every time ifup operation performed is unnecessary and can be performed only once when the port is created. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bonding: restructure arp-monitorMahesh Bandewar2017-03-101-10/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to move the work-queue initialization to port creation from current port_open phase. Work-queue initialization does not make sense every time we do 'ifup/ifdown'. So moving to port creation phase. Arp monitoring work depends on the bonding mode and that is not tied to the port creation and can change anytime during the life after port creation. So this restructuring allows us to move the initialization at creation without losing the ability to arm the correct work for the mode user has selected. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'nfp-crc32-rss-hash-port-name-reporting-and-misc-fastpath-cleanups'David S. Miller2017-03-1011-87/+216
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jakub Kicinski says: ==================== nfp: CRC32 RSS hash, port name reporting and misc fastpath cleanups This series adds support for CRC32 RSS hash function to kernel API of which NFP driver immediately makes use. There is also a .ndo_get_phys_port_name() implementation conforming to switchdev name format. Small patch takes advantage of napi_complete_done()'s return code. Simon provides a fix for potentially trusting values returned from FW too much. A handful of unassuming fast path adjustments is also thrown in to make the upcoming xdp_adjust_head() series easier to review. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | nfp: prevent theoretical buffer overrun in nfp_eth_read_portsSimon Horman2017-03-101-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent theoretical buffer overrun by returning an error if the number of entries returned by the firmware does not match those present. Also use a common handling error path. Found by inspection. Signed-off-by: Simon Horman <simon.horman@netronome.com> Tested-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>