aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-09-12net: ethernet: Add helper to remove a supported link modeAndrew Lunn6-13/+18
Some MAC hardware cannot support a subset of link modes. e.g. often 1Gbps Full duplex is supported, but Half duplex is not. Add a helper to remove such a link mode. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-12net: ethernet: Fix up drivers masking pause supportAndrew Lunn5-7/+7
PHY drivers don't indicate they support pause. They expect MAC drivers to enable its support if the MAC has the needed hardware. Thus MAC drivers should not mask Pause support, but enable it. Change a few ANDs to ORs. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-12net: bcmgenet: Fix speed selection for reverse MIIAndrew Lunn1-4/+3
The phy supported speed is being used to determine if the MAC should be configured to 100 or 1G. The masking logic is broken. Instead, look at 1G supported speeds to enable 1G MAC support. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-12net: ethernet: Use phy_set_max_speed() to limit advertised speedAndrew Lunn27-109/+46
Many Ethernet MAC drivers want to limit the PHY to only advertise a maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use of the helper function phy_set_max_speed(). Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-12nfp: report FW vNIC stats in interface statsJakub Kicinski1-0/+9
Report in standard netdev stats drops and errors as well as RX multicast from the FW vNIC counters. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: bump driver versionIgor Russkikh1-1/+1
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: renaming for better visibilityNikita Danilov8-64/+52
Removed extra characters from the names of structures to unify prefixes used through the driver code (we normally use hw_atl for hw specifics). HW_ATL_B0_ and HW_ATL_A0_ are the same and useless copies. Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: whitespace changesNikita Danilov8-49/+49
Removed extra spaces, corrected alignment. Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: implement EEE supportYana Esina7-0/+189
Support of Energy-Efficient Ethernet to aQuantia NIC's via ethtool (according to the IEEE 802.3az specifications) Signed-off-by: Yana Esina <yana.esina@aquantia.com> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Tested-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: implement WOL supportYana Esina8-17/+220
Add WOL support. Currently only magic packet (ethtool -s <ethX> wol g) feature is implemented. Remove hw_set_power and move that to FW_OPS set_power: because WOL configuration behaves differently on 1x and 2x firmwares Signed-off-by: Yana Esina <yana.esina@aquantia.com> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Tested-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: definitions for WOLYana Esina3-5/+124
Added definitions and structures needed to support WOL. Signed-off-by: Yana Esina <yana.esina@aquantia.com> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Tested-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11net: aquantia: fix hw_atl_utils_fw_upload_dwordsYana Esina6-11/+59
This patch fixes the upload function, which worked incorrectly with some chips. Signed-off-by: Yana Esina <yana.esina@aquantia.com> Signed-off-by: Nikita Danilov <nikita.danilov@aquantia.com> Tested-by: Nikita Danilov <nikita.danilov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11liquidio: Removed droq lockIntiyaz Basha3-37/+3
With the changes in patch 1 and 2, droq lock is not required. So removing droq lock. Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11liquidio: Per queue oom work queueIntiyaz Basha6-73/+110
Removed oom task unconditional rescheduling every 250ms and created per queue oom work queue for refilling buffers. The oom task refills only if the available descriptors is fallen to 64. There will be no packets coming in after hitting this level. So NAPI will not run until oom task refills the buffers. Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-11liquidio: Disabling tasklet when NAPI is activeIntiyaz Basha2-1/+29
Control packets are processed in tasklet when interface is down and in NAPI when interface is up. So tasklet can be disabled when interface up and re-enabled when interface is down. Signed-off-by: Intiyaz Basha <intiyaz.basha@cavium.com> Acked-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-10cxgb4: remove redundant assignment to vlan_cmd.dropnovlan_fmColin Ian King1-1/+0
A recent commit updated vlan_cmd.dropnovlan_fm but failed to remove the older assignment. Fix this by removing the former redundant assignment. Detected by CoverityScan, CID#1473290 ("Unused value") Fixes: a89cdd8e7c74 ("cxgb4: impose mandatory VLAN usage when non-zero TAG ID") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-08net: stmmac: Enable TC Ops for GMAC >= 4Jose Abreu1-3/+3
GMAC >= 4 also supports CBS. Lets enable the TC Ops for these versions. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: David S. Miller <davem@davemloft.net> Cc: Joao Pinto <jpinto@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-08i40e(vf): remove i40e_ethtool_stats.h header fileJacob Keller4-444/+436
Essentially reverts commit 8fd75c58a09a ("i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h", 2018-08-30), and additionally moves the similar code in i40evf into i40evf_ethtool.c. The code was intially moved from i40e_ethtool.c into i40e_ethtool_stats.h as a way of better logically organizing the code. This has two problems. First, we can't have an inline function with variadic arguments on all platforms. Second, it gave the appearance that we had plans to share code between the i40e and i40evf drivers, due to having a near copy of the contents in the i40evf/i40e_ethtool_stats.h file. Patches which actually attempt to combine or share code between the i40e and i40evf drivers have not materialized, and are likely a ways off. Rather than fixing the one function which causes build issues, just move this code back into the i40e_ethtool.c and i40evf_ethtool.c files. Note that we also change these functions back from static inlines to just statics, since they're no longer in a header file. We can revisit this if/when work is done to actually attempt to share code between drivers. Alternatively, this stats code could be made more generic so that it can be shared across drivers as part of ethtool kernel work. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-07cxgb4: impose mandatory VLAN usage when non-zero TAG IDCasey Leedom2-0/+4
When a non-zero VLAN Tag ID is passed to t4_set_vlan_acl() then impose mandatory VLAN Usage with that VLAN ID. I.e any other VLAN ID should result in packets getting dropped. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-07liquidio: lio_fetch_vf_stats() can be statickbuild test robot1-1/+1
Fixes: 488752220b4a ("liquidio: Add spoof checking on a VF MAC address") Signed-off-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-07nfp: replace spin_lock_bh with spin_lock in tasklet callbackjun qian1-2/+2
As you are already in a tasklet, it is unnecessary to call spin_lock_bh. Signed-off-by: jun qian <hangdianqj@163.com> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-07freescale: ethernet: remove unnecessary unlikely()Igor Stoppa1-5/+3
Both WARN_ON() and WARN_ONCE() already contain an unlikely(), so it's not necessary to wrap it into another. Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com> Cc: Madalin Bucur <madalin.bucur@nxp.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-06bnxt_en: remove set but not used variable 'addr_type'YueHaibing1-15/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function 'bnxt_tc_parse_flow': drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:186:6: warning: variable 'addr_type' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-06liquidio CN23XX: Remove set but not used variable 'ring_flag'YueHaibing1-3/+1
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c: In function 'cn23xx_setup_octeon_vf_device': drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:619:20: warning: variable 'ring_flag' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-06liquidio: Add spoof checking on a VF MAC addressWeilin Chang8-12/+187
1. Provide the API to set/unset the spoof checking feature. 2. Add a function to periodically provide the count of found packets with spoof VF MAC address. 3. Prevent VF MAC address changing while the spoofchk of the VF is on unless the changing MAC address is issued from PF. 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>
2018-09-06Merge tag 'mlx5e-updates-2018-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linuxDavid S. Miller12-148/+229
Saeed Mahameed says: ==================== mlx5e-updates-2018-09-05 This series provides updates to mlx5 ethernet driver. 1) Starting with a four patches series to optimize flow counters updates, From Vlad Buslov: ============================================== By default mlx5 driver updates cached counters each second. Update function consumes noticeable amount of CPU resources. The goal of this patch series is to optimize update function. Investigation revealed following bottlenecks in fs counters implementation: 1) Update code(scheduled each second) iterates over all counters twice. (first for finding and deleting counters that are marked for deletion, second iteration is for actually updating the counters) 2) Counters are stored in rb tree. Linear iteration over all rb tree elements(rb_next in profiling data) consumed ~65% of time spent in update function. Following optimizations were implemented: 1) Instead of just marking counters for deletion, store them in standalone list. This removes first iteration over whole counters tree. 2) Store counters in sorted list to optimize traversing them and remove calls to rb_next. First implementation of these changes caused degradation of performance, instead of improving it. Investigation revealed that there first cache line of struct mlx5_fc is full and adding anything to it causes amount of cache misses to double. To mitigate that, following refactorings were implemented: - Change 'addlist' list type from double linked to single linked. This allowes to get free space for one additional pointer that is used to store deletion list(optimization 1) - Substitute rb tree with idr. Idr is non-intrusive data structure and doesn't require adding any new members to struct mlx5_fc. Use free space that became available for double linked sorted list that is used for traversing all counters. (optimization 2) Described changes reduced CPU time spent in mlx5_fc_stats_work from 70% to 44%. (global perf profile mode) ============================================ The rest of the series are misc updates: 2) From Kamal, Move mlx5e_priv_flags into en_ethtool.c, to avoid a compilation warning. 3) From Roi Dayan, Move Q counters allocation and drop RQ to init_rx profile function to avoid allocating Q counters when not required. 4) From Shay Agroskin, Replace PTP clock lock from RW lock to seq lock. Almost double the packet rate when timestamping is active on multiple TX queues. 5) From: Natali Shechtman, set ECN for received packets using CQE indication. 6) From: Alaa Hleihel, don't set CHECKSUM_COMPLETE on SCTP packets. CHECKSUM_COMPLETE is not applicable to SCTP protocol. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-06qed*: Utilize FW 8.37.7.0Denis Bolotin4-196/+361
This patch adds a new qed firmware with fixes and support for new features. Fixes: - Fix a rare case of device crash with iWARP, iSCSI or FCoE offload. - Fix GRE tunneled traffic when iWARP offload is enabled. - Fix RoCE failure in ib_send_bw when using inline data. - Fix latency optimization flow for inline WQEs. - BigBear 100G fix RDMA: - Reduce task context size. - Application page sizes above 2GB support. - Performance improvements. ETH: - Tenant DCB support. - Replace RSS indirection table update interface. Misc: - Debug Tools changes. Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com> Signed-off-by: Ariel Elior <ariel.elior@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-05nfp: separate VXLAN and GRE feature handlingJakub Kicinski1-7/+10
VXLAN and GRE FW features have to currently be both advertised for the driver to enable them. Separate the handling. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-05nfp: validate rtsym accesses fall within the symbolJakub Kicinski1-3/+45
With the accesses to rtsyms now all going via special helpers we can easily make sure the driver is not reading past the end of the symbol. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Francois H. Theron <francois.theron@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-05nfp: prefix rtsym error messages with symbol nameJakub Kicinski1-10/+11
For ease of debug preface all error messages with the name of the symbol which caused them. Use the same message format for existing messages while at it. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Francois H. Theron <francois.theron@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-05nfp: fix readq on absolute RTsymsJakub Kicinski1-2/+4
Return the error and report value through the output param. Fixes: 640917dd81b6 ("nfp: support access to absolute RTsyms") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Francois H. Theron <francois.theron@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-05net/mlx5e: don't set CHECKSUM_COMPLETE on SCTP packetsAlaa Hleihel1-0/+12
CHECKSUM_COMPLETE is not applicable to SCTP protocol. Setting it for SCTP packets leads to CRC32c validation failure. Fixes: bbceefce9adf ("net/mlx5e: Support RX CHECKSUM_COMPLETE") Signed-off-by: Alaa Hleihel <alaa@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5e: Set ECN for received packets using CQE indicationNatali Shechtman3-5/+35
In multi-host (MH) NIC scheme, a single HW port serves multiple hosts or sockets on the same host. The HW uses a mechanism in the PCIe buffer which monitors the amount of consumed PCIe buffers per host. On a certain configuration, under congestion, the HW emulates a switch doing ECN marking on packets using ECN indication on the completion descriptor (CQE). The driver needs to set the ECN bits on the packet SKB, such that the network stack can react on that, this commit does that. Signed-off-by: Natali Shechtman <natali@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5e: Replace PTP clock lock from RW lock to seq lockShay Agroskin2-20/+22
Changed "priv.clock.lock" lock from 'rw_lock' to 'seq_lock' in order to improve packet rate performance. Tested on Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz. Sent 64b packets between two peers connected by ConnectX-5, and measured packet rate for the receiver in three modes: no time-stamping (base rate) time-stamping using rw_lock (old lock) for critical region time-stamping using seq_lock (new lock) for critical region Only the receiver time stamped its packets. The measured packet rate improvements are: Single flow (multiple TX rings to single RX ring): without timestamping: 4.26 (M packets)/sec with rw-lock (old lock): 4.1 (M packets)/sec with seq-lock (new lock): 4.16 (M packets)/sec 1.46% improvement Multiple flows (multiple TX rings to six RX rings): without timestamping: 22 (M packets)/sec with rw-lock (old lock): 11.7 (M packets)/sec with seq-lock (new lock): 21.3 (M packets)/sec 82.05% improvement The packet rate improvement is due to the lack of atomic operations for the 'readers' by the seq-lock. Since there are much more 'readers' than 'writers' contention on this lock, almost all atomic operations are saved. this results in a dramatic decrease in overall cache misses. Signed-off-by: Shay Agroskin <shayag@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5e: Move Q counters allocation and drop RQ to init_rxRoi Dayan4-25/+55
Not all profiles query the HW Q counters in update_stats() callback. HW Q couners are limited per device and in case of representors all their Q counters are allocated on the parent PF device. Avoid reundant allocation of HW Q counters by moving the allocation to init_rx profile callback. Signed-off-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5e: Move mlx5e_priv_flags into en_ethtool.cKamal Heib2-7/+7
Move the definition of mlx5e_priv_flags into en_ethtool.c because it's only used there. Fixes: 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure") Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5: Add flow counters idrVlad Buslov1-4/+33
Previous patch in series changed flow counter storage structure from rb_tree to linked list in order to improve flow counter traversal performance. The drawback of such solution is that flow counter lookup by id becomes linear in complexity. Store pointers to flow counters in idr in order to improve lookup performance to logarithmic again. Idr is non-intrusive data structure and doesn't require extending flow counter struct with new elements. This means that idr can be used for lookup, while linked list from previous patch is used for traversal, and struct mlx5_fc size is <= 2 cache lines. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Amir Vadai <amir@vadai.me> Reviewed-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5: Store flow counters in a listVlad Buslov2-49/+41
In order to improve performance of flow counter stats query loop that traverses all configured flow counters, replace rb_tree with double-linked list. This change improves performance of traversing flow counters by removing the tree traversal. (profiling data showed that call to rb_next was most top CPU consumer) However, lookup of flow flow counter in list becomes linear, instead of logarithmic. This problem is fixed by next patch in series, which adds idr for fast lookup. Idr is to be used because it is not an intrusive data structure and doesn't require adding any new members to struct mlx5_fc, which allows its control data part to stay <= 1 cache line in size. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Amir Vadai <amir@vadai.me> Reviewed-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5: Add new list to store deleted flow countersVlad Buslov2-23/+13
In order to prevent flow counters stats work function from traversing whole flow counters tree while searching for deleted flow counters, new list to store deleted flow counters is added to struct mlx5_fc_stats. Lockless NULL-terminated single linked list data type is used due to following reasons: - This use case only needs to add single element to list and remove/iterate whole list. Lockless list doesn't require any additional synchronization for these operations. - First cache line of flow counter data structure only has space to store single additional pointer, which precludes usage of double linked list. Remove flow counter 'deleted' flag that is no longer needed. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Amir Vadai <amir@vadai.me> Reviewed-by: Paul Blakey <paulb@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net/mlx5: Change flow counters addlist type to single linked listVlad Buslov2-26/+22
In order to prevent flow counters stats work function from traversing whole flow counters tree while searching for deleted flow counters, new list to store deleted flow counters will be added to struct mlx5_fc_stats. However, the flow counter structure itself has no space left to store any more data in first cache line. To free space that is needed to store additional list node, convert current addlist double linked list (two pointers per node) to atomic single linked list (one pointer per node). Lockless NULL-terminated single linked list data type doesn't require any additional external synchronization for operations used by flow counters module (add single new element, remove all elements from list and traverse them). Remove addlist_lock that is no longer needed. Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Acked-by: Amir Vadai <amir@vadai.me> Reviewed-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2018-09-05net: lan743x_ptp: make function lan743x_ptp_set_sync_ts_insert() staticYueHaibing1-2/+2
Fixes the following sparse warning: drivers/net/ethernet/microchip/lan743x_ptp.c:980:6: warning: symbol 'lan743x_ptp_set_sync_ts_insert' was not declared. Should it be static? Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-05net/mlx5e: Make function mlx5i_grp_sw_update_stats() staticWei Yongjun1-1/+1
Fixes the following sparse warning: drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:119:6: warning: symbol 'mlx5i_grp_sw_update_stats' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller33-74/+387
2018-09-04net/mlx5: Fix SQ offset in QPs with small RQTariq Toukan1-2/+3
Correct the formula for calculating the RQ page remainder, which should be in byte granularity. The result will be non-zero only for RQs smaller than PAGE_SIZE, as an RQ size is a power of 2. Divide this by the SQ stride (MLX5_SEND_WQE_BB) to get the SQ offset in strides granularity. Fixes: d7037ad73daa ("net/mlx5: Fix QP fragmented buffer allocation") Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-03cxgb4: collect hardware queue descriptorsRahul Lakkireddy6-1/+399
Collect descriptors of all ULD and LLD hardware queues managed by LLD. Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-03cxgb4: when max_tx_rate is 0 disable tx rate limitingGanesh Goudar1-2/+23
in ndo_set_vf_rate() when max_tx_rate is 0 disable tx rate limiting for that vf. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-03net: hns3: Refine hns3_get_link_ksettings()Jian Shen1-28/+40
In the previous implement, the query operation for fibre port and copper port are mixed. This patch refines it by seperating them based on the port type. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-03net: hns3: Remove redundant codes of query advertised flow control abilitiyJian Shen2-27/+0
If the advertised flow control ability has been fetched using phy_ethtool_ksettings_get() or hclge_get_link_mode() then it is unnecessary to fetch them again later using hclge_get_flowctrl_adv(). This patch removes it. Signed-off-by: Jian Shen <shenjian15@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-03net: hns3: Change the dst mac addr of loopback packetYunsheng Lin1-0/+1
Currently, the dst mac addr of loopback packet is the same as the host' mac addr, the SSU component may loop back the packet to host before the packet reaches mac or serdes, which will defect the purpose of mac or serdes selftest. This patch changes it by adding 0x1f to the last byte of dst mac addr. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-03net: hns3: Only update mac configuation when necessaryYunsheng Lin1-17/+31
Currently only fiber port checks if it is necessay to set the mac through firmware when link is changed, this patch unify the checking to allow the copper port do the checking too. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Salil Mehta <salil.mehta@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>