summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
Commit message (Collapse)AuthorAgeFilesLines
* mvneta: Driver and hardware supports IPv6 offload, so enable itAndrew Pilloud2017-09-011-1/+1
| | | | | | | | | | | | The mvneta driver and hardware supports IPv6 offload, however it isn't enabled. Set the NETIF_F_IPV6_CSUM feature to inform the network layer that this driver can offload IPV6 TCP and UDP checksums. This change has been tested on an Armada 370 and the feature support confirmed with several device datasheets including the Armada XP and Armada 3700. Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: remove redundant zero check on retries counterColin Ian King2017-09-011-7/+3
| | | | | | | | | | | | | At the end of the do while loop the integer counter retries will always be zero and so the subsequent check to see if it is zero is always true and therefore redundant. Remove the redundant check and always return -EIO on this return path. Also unbreak the literal string in dev_err message to clean up a checkpatch warning. Detected by CoverityScan, CID#744279 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: use the GoP interrupt for link status changesAntoine Tenart2017-09-011-5/+172
| | | | | | | | | | | | This patch adds the GoP link interrupt support for when a port isn't connected to a PHY. Because of this the phylib callback is never called and the link status management isn't done. This patch use the GoP link interrupt in such cases to still have a minimal link management. Without this patch ports not connected to a PHY cannot work. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Tested-by: Marcin Wojtas <mw@semihalf.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: make the phy optionalAntoine Tenart2017-09-011-8/+11
| | | | | | | | | | | | | | | | | | There is not necessarily a PHY between the GoP and the physical port. However, the driver currently makes the "phy" property mandatory, contrary to what is stated in the device tree bindings. This patch makes the PHY optional, and aligns the PPv2 driver on its device tree documentation. However if a PHY is provided, the GoP link interrupt won't be used. With this patch switches directly connected to the serdes lanes and SFP ports on the Armada 8040-db and Armada 7040-db can be used if the link interrupt is described in the device tree. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Tested-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: take advantage of the is_rgmii helperAntoine Tenart2017-09-011-12/+3
| | | | | | | | | Convert all RGMII checks to use the phy_interface_mode_is_rgmii() helper. This is a cosmetic patch. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_router: Set abort trap in all virtual routersIdo Schimmel2017-09-011-3/+0
| | | | | | | | | | | | | | | | | When the abort mechanism is invoked a default route directing packets to the CPU is programmed in all the virtual routers currently in use. This can result in packet loss in case a new VRF is configured. Upon abort, program the default route in all virtual routers, whether they are in use or not. The patch is directed at net-next since post-abort fixes aren't critical and packet loss due to a missing default route will be insignificant compared to packet loss caused by the CPU port policer. 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: Trap packets hitting anycast routesIdo Schimmel2017-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I relied on the fact that anycast routes use the loopback device as their nexthop device to trap packets hitting them to the CPU. After commit 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address") this is no longer the case and such routes are programmed with a forward action (note the 'offload' flag): anycast cafe:: dev enp3s0np7 proto kernel metric 0 offload pref medium This will prevent the router from locally receiving packets destined to the Subnet-Router anycast address. Fix this by specifically programming anycast routes with action trap, which results in the following output: anycast cafe:: dev enp3s0np7 proto kernel metric 0 pref medium Fixes: 4832c30d5458 ("net: ipv6: put host and anycast routes on device with address") 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_dpipe: Add support for controlling IPv6 neighbor countersArkadi Sharshevsky2017-08-311-1/+17
| | | | | | | | Add support for controlling IPv6 neighbor counters via dpipe. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_router: Add support for setting counters on IPv6 neighborsArkadi Sharshevsky2017-08-311-5/+17
| | | | | | | | | Add support for setting counters on IPv6 neighbors based on dpipe's host6 table counter status. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_dpipe: Add support for IPv6 host table dumpArkadi Sharshevsky2017-08-311-5/+70
| | | | | | | | Add support for IPv6 host table dump. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_dpipe: Make host entry fill handler more genericArkadi Sharshevsky2017-08-311-8/+5
| | | | | | | | | Change the host entry filler helper to be applicable for both IPv4/6 addresses. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_router: Add IPv6 neighbor access helperArkadi Sharshevsky2017-08-312-0/+11
| | | | | | | | Add helper for accessing destination IP in case of IPv6 neighbor. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_dpipe: Add IPv6 host table initial supportArkadi Sharshevsky2017-08-312-6/+71
| | | | | | | | | | Add IPv6 host table initial support. The action behavior for both IPv4/6 tables is the same, thus the same action dump op is used. Neighbors with link local address are ignored. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_router: Export IPv6 link local address check helperArkadi Sharshevsky2017-08-312-2/+5
| | | | | | | | | | | Neighbors with link local addresses are not offloaded to the host table, yet, the are maintained in the driver for adjacency table usage. When dumping the IPv6 host neighbors this link local neighbors should be ignored. This patch exports this helper for dpipe usage. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'mlx5-GRE-Offload' of ↵David S. Miller2017-08-305-39/+383
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2017-08-31 (GRE Offloads support) This series provides the support for MPLS RSS and GRE TX offloads and RSS support. The first patch from Gal and Ariel provides the mlx5 driver support for ConnectX capability to perform IP version identification and matching in order to distinguish between IPv4 and IPv6 without the need to specify the encapsulation type, thus perform RSS in MPLS automatically without specifying MPLS ethertyoe. This patch will also serve for inner GRE IPv4/6 classification for inner GRE RSS. 2nd patch from Gal, Adds the TX offloads support for GRE tunneled packets, by reporting the needed netdev features. 3rd patch from Gal, Adds GRE inner RSS support by creating the needed device resources (Steering Tables/rules and traffic classifiers) to Match GRE traffic and perform RSS hashing on the inner headers. Improvement: Testing 8 TCP streams bandwidth over GRE: System: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] Before: 21.3 Gbps (Single RQ) Now : 90.5 Gbps (RSS spread on 8 RQs) ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx5e: Support RSS for GRE tunneled packetsGal Pressman2017-08-315-17/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new flow table and indirect TIRs which are used to hash the inner packet headers of GRE tunneled packets. When a GRE tunneled packet is received, the TTC flow table will match the new IPv4/6->GRE rules which will forward it to the inner TTC table. The inner TTC is similar to its counterpart outer TTC table, but matching the inner packet headers instead of the outer ones (and does not include the new IPv4/6->GRE rules). The new rules will not add steering hops since they are added to an already existing flow group which will be matched regardless of this patch. Non GRE traffic will not be affected. The inner flow table will forward the packet to inner indirect TIRs which hash the inner packet and thus result in RSS for the tunneled packets. Testing 8 TCP streams bandwidth over GRE: System: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex] Before: 21.3 Gbps (Single RQ) Now : 90.5 Gbps (RSS spread on 8 RQs) Signed-off-by: Gal Pressman <galp@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Support TSO and TX checksum offloads for GRE tunnelsGal Pressman2017-08-311-18/+33
| | | | | | | | | | | | | | | | | | Add TX offloads support for GRE tunneled packets by reporting the needed netdev features. Signed-off-by: Gal Pressman <galp@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| * net/mlx5e: Use IP version matching to classify IP trafficGal Pressman2017-08-311-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the ability for flow steering to classify IPv4/6 packets with MPLS tag (Ethertype 0x8847 and 0x8848) as standard IP packets and hit IPv4/6 classification steering rules. Since IP packets with MPLS tag header have MPLS ethertype, they missed the IPv4/6 ethertype rule and ended up hitting the default filter forwarding all the packets to the same single RQ (No RSS). Since our device is able to look past the MPLS tag and identify the next protocol we introduce this solution which replaces ethertype matching by the device's capability to perform IP version identification and matching in order to distinguish between IPv4 and IPv6. Therefore, when driver is performing flow steering configuration on the device it will use IP version matching in IP classified rules instead of ethertype matching which will cause relevant MPLS tagged packets to hit this rule as well. If the device doesn't support IP version matching the driver will fall back to use legacy ethertype matching in the steering as before. Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Ariel Levkovich <lariel@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
* | liquidio: fix crash in presence of zeroed-out base address regsRick Farrington2017-08-301-0/+20
|/ | | | | | | | | | | | | | | | Fix crash in linux PF driver when BARs have been cleared/de-programmed; fail early init (prior to mapping BARs) if the BAR0 or BAR1 registers are zero. This situation can arise when the PF is added to a VM (PCI pass-through), then a PF FLR is issued (in the VM). After this occurs, the BAR registers will be zero. If we attempt to load the PF driver in the host (after VM has been shutdown), the host can reset. Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qed: fix spelling mistake: "calescing" -> "coalescing"Colin Ian King2017-08-301-1/+1
| | | | | | | Trivial fix to spelling mistake in DP_NOTICE message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: hns3: Fixes the wrong IS_ERR check on the returned phydev valueSalil Mehta2017-08-301-1/+1
| | | | | | | | | | | | This patch removes the wrong check being done for the phy device being returned by the mdiobus_get_phy() function. This function never returns the error pointers. Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet Driver for hip08 SoC") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: bcm63xx_enet: make bcm_enetsw_ethtool_ops constBhumika Goyal2017-08-301-1/+1
| | | | | | | Make this const as it is never modified. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: dynamic reconfiguration of the comphy/GoP/MACAntoine Tenart2017-08-301-1/+20
| | | | | | | | | | | This patch adds logic to reconfigure the comphy/GoP/MAC when the link state is updated at runtime. This is very useful on boards where many link speed are supported: depending on what is negotiated the PPv2 driver will automatically reconfigures the link between the PHY and the MAC. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: do not set GMAC autoneg when using XLG MACAntoine Tenart2017-08-301-22/+42
| | | | | | | | | When using the XLG MAC, it does not make sense to force the GMAC autoneg parameters. This patch adds checks to only set the GMAC autoneg parameters when needed (i.e. when not using the XLG MAC). Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: improve the link management functionAntoine Tenart2017-08-301-0/+11
| | | | | | | | | | | | When the link status changes, the phylib calls the link_event function in the mvpp2 driver. Before this patch only the egress/ingress transmit was enabled/disabled. This patch adds more functionality to the link status management code by enabling/disabling the port per-cpu interrupts, and the port itself. The queues are now stopped as well, and the netif carrier helpers are called. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: simplify the link_event functionAntoine Tenart2017-08-301-9/+4
| | | | | | | | The link_event function is somewhat complicated. This cosmetic patch simplifies it. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mvpp2: initialize the comphyAntoine Tenart2017-08-301-1/+43
| | | | | | | | | | | On some platforms, the comphy is between the MAC GoP and the PHYs. The mvpp2 driver currently relies on the firmware/bootloader to configure the comphy. As a comphy driver was added to the generic PHY framework, this patch uses it in the mvpp2 driver to configure the comphy at boot time to avoid relying on the bootloader. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers: net: ethernet: qualcomm: rmnet: Initial implementationSubash Abhinov Kasiviswanathan2017-08-3014-0/+1342
| | | | | | | | | | | RmNet driver provides a transport agnostic MAP (multiplexing and aggregation protocol) support in embedded module. Module provides virtual network devices which can be attached to any IP-mode physical device. This will be used to provide all MAP functionality on future hardware in a single consistent location. Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: bcmgenet: Do not return from void functionFlorian Fainelli2017-08-291-1/+1
| | | | | | | | | | A stray return was added in the macro bcmgenet_##name##_writel where it should not, drop it. Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 69d2ea9c7989 ("net: bcmgenet: Use correct I/O accessors") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: bcmgenet: Use correct I/O accessorsFlorian Fainelli2017-08-292-30/+58
| | | | | | | | | | | The GENET driver currently uses __raw_{read,write}l which means native I/O endian. This works correctly for an ARM LE kernel (default) but fails miserably on an ARM BE (BE8) kernel where registers are kept little endian, so replace uses with {read,write}l_relaxed here which is what we want because this is all performance sensitive code. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* liquidio: show NIC's U-Boot version in a dev_info() messageWeilin Chang2017-08-291-0/+78
| | | | | | Signed-off-by: Weilin Chang <weilin.chang@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* amd-xgbe: Interrupt summary bits are h/w version dependentTom Lendacky2017-08-292-5/+16
| | | | | | | | | | | | | | | | | | There is a difference in the bit position of the normal interrupt summary enable (NIE) and abnormal interrupt summary enable (AIE) between revisions of the hardware. For older revisions the NIE and AIE bits are positions 16 and 15 respectively. For newer revisions the NIE and AIE bits are positions 15 and 14. The effect in changing the bit position is that newer hardware won't receive AIE interrupts in the current version of the driver. Specifically, the driver uses this interrupt to collect statistics on when a receive buffer unavailable event occurs and to restart the driver/device when a fatal bus error occurs. Update the driver to set the interrupt enable bit based on the reported version of the hardware. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4: Add user mac FW update supportMoshe Shemesh2017-08-295-2/+56
| | | | | | | | | | | | | | Adding support for updating the FW on new port mac, when port mac change is requested by the user. This info is required by the FW as OEM management tools require this info directly from the NIC FW. Check device capability bit to verify the FW supports user mac. If the FW does support it, use set_port command to notify the FW on the new mac. The feature is relevant only to PF port mac. Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4_core: Fix misplaced brackets of sizeofTariq Toukan2017-08-291-1/+1
| | | | | | | | | | When changing the sizeof style usage in the patch cited below, one brackets misplacement was introduced. Here we fix it. Fixes: 31975e27a4b5 ("mlx4: sizeof style usage") Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4_core: Make explicit conversion to 64bit valueLeon Romanovsky2017-08-291-1/+1
| | | | | | | | | | | | | | | | The "lg" variable is declared as int so in all places where this variable is used as a shift operand, the output will be int too. This produces the following smatch warning: drivers/net/ethernet/mellanox/mlx4/fw.c:1532 mlx4_map_cmd() warn: should '1 << lg' be a 64 bit type? Simple declaration of "1" to be "1ULL" will fix the issue. Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4_core: Dynamically allocate structs at mlx4_slave_capEran Ben Elisha2017-08-294-140/+137
| | | | | | | | | | | In order to avoid temporary large structs on the stack, allocate them dynamically. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Tal Alon <talal@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: systemport: Set correct RSB endian bits based on hostFlorian Fainelli2017-08-291-2/+6
| | | | | | | | | | | | | | RSB_SWAP0 needs to match the host CPU endian, and it needs to be set for LE and clear for BE. RSB_SWAP1 must always be cleared for SYSTEMPORT Lite. With these settings, we have the Receive Status Block always match the host endian and we do not need to perform any conversion. Since there is not necessarily a CONFIG_CPU_LITTLE_ENDIAN option defined, we test for !CONFIG_CPU_BIG_ENDIAN which is guaranteed to be set. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: systemport: Use correct I/O accessorsFlorian Fainelli2017-08-291-6/+6
| | | | | | | | | | | The SYSTEMPORT driver currently uses __raw_{read,write}l which means native I/O endian. This works correctly for an ARM LE kernel (default) but fails miserably on an ARM BE (BE8) kernel where registers are kept little endian, so replace uses with {read,write}l_relaxed here which is what we want because this is all performance sensitive code. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: stmmac: constify clk_div_tableArvind Yadav2017-08-291-1/+1
| | | | | | | | | clk_div_table are not supposed to change at runtime. meson8b_dwmac structure is working with const clk_div_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: add a dummy definition for bnxt_vf_rep_get_fid()Sathya Perla2017-08-291-0/+5
| | | | | | | | | | | When bnxt VF-reps are not compiled in (CONFIG_BNXT_SRIOV is off) bnxt_tc.c needs a dummy definition of the routine bnxt_vf_rep_get_fid(). Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 2ae7408fedfe ("bnxt_en: bnxt: add TC flower filter offload support") Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hinic: don't build the module by defaultVitaly Kuznetsov2017-08-281-1/+0
| | | | | | | | | We probably don't want to enable code supporting particular hardware by default e.g. when someone does 'make defconfig'. Other ethernet modules don't do it. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: add code to query TC flower offload statsSathya Perla2017-08-281-0/+95
| | | | | | | | | This patch adds code to implement TC_CLSFLOWER_STATS TC-cmd and the required FW code to query the stats from the HW. Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: add TC flower offload flow_alloc/free FW cmdsSathya Perla2017-08-281-2/+139
| | | | | | | | | This patch adds the hwrm_cfa_flow_alloc/free() routines that are needed to issue the FW cmds needed for TC flower offload. Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: bnxt: add TC flower filter offload supportSathya Perla2017-08-288-9/+850
| | | | | | | | | | | | | | | | | | This patch adds support for offloading TC based flow rules and actions for the 'flower' classifier in the bnxt_en driver. It includes logic to parse flow rules and actions received from the TC subsystem, store them and issue the corresponding hwrm_cfa_flow_alloc/free FW cmds. L2/IPv4/IPv6 flows and drop, redir, vlan push/pop actions are supported in this patch. In this patch the hwrm_cfa_flow_xxx routines are just stubs. The code for these routines is introduced in the next patch for easier review. Also, the code to query the TC/flower action stats will be introduced in a subsequent patch. Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: fix clearing devlink ptr from bnxt structSathya Perla2017-08-282-7/+11
| | | | | | | | | | | | | The routine bnxt_link_bp_to_dl() is used to set the devlink ptr in bnxt struct (bp) and also to set the bnxt back ptr in the devlink struct. If devlink_register() fails, bp->dl must be cleared which is not happening currently. This patch fixes bnxt_link_bp_to_dl() to clear bp->dl by passing a NULL dl ptr. Fixes: 4ab0c6a8ffd7 ("bnxt_en: add support to enable VF-representors") Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Reduce default rings on multi-port cards.Michael Chan2017-08-282-4/+10
| | | | | | | | Reduce default rings from 8 to 4 on multi-port cards to reduce memory usage. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Improve -ENOMEM logic in NAPI poll loop.Michael Chan2017-08-281-0/+7
| | | | | | | | | | | | | | If we cannot allocate RX buffers in the NAPI poll loop when processing an RX event, the current code does not count that event towards the NAPI budget. This can cause us to potentially loop forever in NAPI if we consistently cannot allocate new buffers. Improve it by counting -ENOMEM event as 1 towards the NAPI budget. Cc: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Reported-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt: initialize board_info values with proper enumsScott Branden2017-08-281-32/+32
| | | | | | | | | | initialize board_info values with proper enums for defensive programming purposes. This will avoid any errors of the enums being declared not lining up with the board_info array. Signed-off-by: Scott Branden <scott.branden@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt: Add PCIe device IDs for bcm58802/bcm58808Ray Jui2017-08-282-1/+15
| | | | | | | | | Add PCIe device ID for bcm58802 and bcm58808. Also add chip number update to declare bcm588xx as chip class phase 4 and later Signed-off-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: assign CPU affinity hints to bnxt_en IRQsVasundhara Volam2017-08-282-2/+27
| | | | | | | | | | | This patch provides hints to irqbalance to map bnxt_en device IRQs to specific CPU cores. cpumask_local_spread() is used, which first maps IRQs to near NUMA cores; when those cores are exhausted, IRQs are mapped to far NUMA cores. Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud