- Jul 30, 2019
-
-
Vlad Buslov authored
In order to remove dependency on rtnl lock, access to tc flows hashtable must be explicitly protected from concurrent flows removal. Extend tc flow structure with rcu to allow concurrent parallel access. Use rcu read lock to safely lookup flow in tc flows hash table, and take reference to it. Use rcu free for flow deletion to accommodate concurrent stats requests. Add new DELETED flow flag. Imlement new flow_flag_test_and_set() helper that is used to set a flag and return its previous value. Use it to atomically set the flag in mlx5e_delete_flower() to guarantee that flow can only be deleted once, even when same flow is deleted concurrently by multiple tasks. Signed-off-by:
Vlad Buslov <vladbu@mellanox.com> Reviewed-by:
Jianbo Liu <jianbol@mellanox.com> Reviewed-by:
Roi Dayan <roid@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
Vlad Buslov authored
To remove dependency on rtnl lock and allow concurrent modification of 'flags' field of tc flow structure, change flow flag type to unsigned long and use atomic bit ops for reading and changing the flags. Implement auxiliary functions for setting, resetting and getting specific flag, and for checking most often used flag values. Always set flags with smp_mb__before_atomic() to ensure that all mlx5e_tc_flow are updated before concurrent readers can read new flags value. Rearrange all code paths to actually set flow->rule[] pointers before setting the OFFLOADED flag. On read side, use smp_mb__after_atomic() when accessing flags to ensure that offload-related flow fields are only read after the flags. Signed-off-by:
Vlad Buslov <vladbu@mellanox.com> Reviewed-by:
Jianbo Liu <jianbol@mellanox.com> Reviewed-by:
Roi Dayan <roid@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
Vlad Buslov authored
With new classifier type that doesn't require rtnl lock, following invariant holds: - Filter with specified cookie created only once. - Filter with specified cookie deleted only once. - Stats updates can be performed in parallel to each other. Extend tc flow with rcu and reference counter. To protect from concurrent delete, get reference to tc flow when: - Reading flow stats. - Accessing flow in neigh update handler. - Accessing flow in neigh update used value handler. Only free flow when reference counter reached zero. Modify flow cleanup to account for flows that could be not fully initialized by checking if flow is actually in the list of corresponding mod_hdr, hairpin and encap entries. Don't cleanup flow directly in case of error to allow concurrent neigh update (neigh update will be modified to always take reference to flow when using it). Signed-off-by:
Vlad Buslov <vladbu@mellanox.com> Reviewed-by:
Jianbo Liu <jianbol@mellanox.com> Reviewed-by:
Roi Dayan <roid@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
Eli Britstein authored
The helper function has "if" branches that do the same. Merge them to simplify the code. Signed-off-by:
Eli Britstein <elibr@mellanox.com> Reviewed-by:
Roi Dayan <roid@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
wenxu authored
When call flow_block_cb_is_busy. The indr_priv is guaranteed to NULL ptr. So there is no need to call flow_bock_cb_is_busy. Fixes: 0d4fd02e ("net: flow_offload: add flow_block_cb_is_busy() and use it") Signed-off-by:
wenxu <wenxu@ucloud.cn> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
Saeed Mahameed authored
Don't choose who implements the rxnfc "get/set" callbacks according to CONFIG_MLX5_EN_RXNFC, instead have the callbacks always available and delegate to a function of a different driver module when needed (en_fs_ethtool.c), have stubs in en/fs.h to fallback to when en_fs_ethtool.c is compiled out, to avoid complications and ifdefs in en_main.c. Reviewed-by:
Tariq Toukan <tariqt@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
Saeed Mahameed authored
When disabling CQE compression in favor of time-stamping, don't show a warning when CQE compression is already disabled. Reviewed-by:
Tariq Toukan <tariqt@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
Huy Nguyen authored
When user enables LRO via ethtool and if the RQ mode is legacy, mlx5e_fix_features drops the request without any explanation. Add netdev_warn to cover this case. Fixes: 6c3a823e ("net/mlx5e: RX, Remove HW LRO support in legacy RQ") Signed-off-by:
Huy Nguyen <huyn@mellanox.com> Signed-off-by:
Saeed Mahameed <saeedm@mellanox.com>
-
David S. Miller authored
Michael Chan says: ==================== bnxt_en: Add TPA (GRO_HW and LRO) on 57500 chips. This patchset adds TPA v2 support on the 57500 chips. TPA v2 is different from the legacy TPA scheme on older chips and requires major refactoring and restructuring of the existing TPA logic. The main difference is that the new TPA v2 has on-the-fly aggregation buffer completions before a TPA packet is completed. The larger aggregation ID space also requires a new ID mapping logic to make it more memory efficient. ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Define the 57508, 57504, and 57502 chip IDs that are all part of the BNXT_CHIP_P5 family of chips. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
With the new TPA feature in the 57500 chips, we need to discover the feature first before setting up the netdev features. Refactor the the firmware probe and init logic more cleanly into 2 functions and and make these calls before setting up the netdev features. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Support the new expanded TPA v2 counters on 57500 B0 chips for ethtool -S. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The new TPA implemantation has additional TPA counters that extend the per-ring statistics block. Allocate the proper size accordingly. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The current code assumes that the per ring statistics counters are fixed. In newer chips that support a newer version of TPA, the TPA counters are also changed. Refactor the code by defining these counter names in arrays so that it is easy to add a new array for a new set of counters supported by the newer chips. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Add a more optimized hardware GRO function to setup the SKB on 57500 chips. Some workaround code is no longer needed on 57500 chips and the pseudo checksum is also calculated in hardware, so no need to do the software pseudo checksum in the driver. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The new TPA feature on 57500 supports a larger number of concurrent TPAs (up to 1024) divided among the functions. We need to add some logic to map the hardware TPA ID to a software index that keeps track of each TPA in progress. A 1:1 direct mapping without translation would be too wasteful as we would have to allocate 1024 TPA structures for each RX ring on each PCI function. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
With all the previous refactoring, the TPA fast path can now be modified slightly to support TPA on the new chips. The main difference is that the agg completions are retrieved differently using the bnxt_get_tpa_agg_p5() function on the new chips. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
On 57500 chips, hardware GRO mode cannot be determined from the TPA end, so we need to check bp->flags to determine if we are in hardware GRO mode or not. Modify bnxt_set_features so that the TPA flags in bp->flags don't change until the device is closed. This will ensure that the fast path can safely rely on bp->flags to determine the TPA mode. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The 2 GRO functions to set up the hardware GRO SKB fields for 2 different hardware chips have practically identical logic for tunneled packets. Refactor the logic into a separate bnxt_gro_tunnel() function that can be used by both functions. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
On the new 57500 chips, these new RX_AGG completions are not coalesced at the TPA_END completion. Handle these by storing them in the array in the bnxt_tpa_info struct, as they are seen when processing the CMPL ring. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Add an aggregation array to bnxt_tpa_info struct to keep track of the aggregation completions. The aggregation completions are not completed at the TPA_END completion on 57500 chips so we need to keep track of them. The array is only allocated on the new chips when required. An agg_count field is also added to keep track of the number of these completions. The maximum concurrent TPA is now discovered from firmware instead of the hardcoded 64. Add a new bp->max_tpa to keep track of maximum configured TPA. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Refactor the TPA logic slightly, so that the code can be more easily extended to support TPA on the new 57500 chips. In particular, the logic to get the next aggregation completion is refactored into a new function bnxt_get_agg() so that this operation is made more generalized. This operation will be different on the new chip in TPA mode. The logic to recycle the aggregation buffers has a new start index parameter added for the same purpose. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
The new chips have a slightly modified TPA interface for LRO/GRO_HW. Modify the TPA structures so that the same structures can also be used on the new chips. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Chan authored
Among the changes are new CoS discard counters and new ctx_hw_stats_ext struct for the latest 5750X B0 chips. Signed-off-by:
Michael Chan <michael.chan@broadcom.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Oliver Hartkopp authored
Commit 60649d4e ("can: remove obsolete empty ioctl() handler") replaced the almost empty can_ioctl() function with sock_no_ioctl() which always returns -EOPNOTSUPP. Even though we don't have any ioctl() functions on socket/network layer we need to return -ENOIOCTLCMD to be able to forward ioctl commands like SIOCGIFINDEX to the network driver layer. This patch fixes the wrong return codes in the CAN network layer protocols. Reported-by:
kernel test robot <rong.a.chen@intel.com> Fixes: 60649d4e ("can: remove obsolete empty ioctl() handler") Signed-off-by:
Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Rasmus Villemoes authored
We have an ERPS (Ethernet Ring Protection Switching) setup involving mv88e6250 switches which we're in the process of switching to a BSP based on the mainline driver. Breaking any link in the ring works as expected, with the ring reconfiguring itself quickly and traffic continuing with almost no noticable drops. However, when plugging back the cable, we see 5+ second stalls. This has been tracked down to the userspace application in charge of the protocol missing a few CCM messages on the good link (the one that was not unplugged), causing it to broadcast a "signal fail". That message eventually reaches its link partner, which responds by blocking the port. Meanwhile, the first node has continued to block the port with the just plugged-in cable, breaking the network. And the reason for those missing CCM messages has in turn been tracked down to the VTU apparently being too busy servicing load/purge operations that the normal lookups are delayed. Initial state, the link between C and D is blocked in software. _____________________ / \ | | A ----- B ----- C *---- D Unplug the cable between C and D. _____________________ / \ | | A ----- B ----- C * * D Reestablish the link between C and D. _____________________ / \ | | A ----- B ----- C *---- D Somehow, enough VTU/ATU operations happen inside C that prevents the application from receving the CCM messages from B in a timely manner, so a Signal Fail message is sent by C. When B receives that, it responds by blocking its port. _____________________ / \ | | A ----- B *---* C *---- D Very shortly after this, the signal fail condition clears on the BC link (some CCM messages finally make it through), so C unblocks the port. However, a guard timer inside B prevents it from removing the blocking before 5 seconds have elapsed. It is not unlikely that our userspace ERPS implementation could be smarter and/or is simply buggy. However, this patch fixes the symptoms we see, and is a small optimization that should not break anything (knock wood). The idea is simply to avoid doing an VTU load of an entry identical to the one already present. To do that, we need to know whether mv88e6xxx_vtu_get() actually found an existing entry, or has just prepared a struct mv88e6xxx_vtu_entry for us to load. To that end, let vlan->valid be an output parameter. The other two callers of mv88e6xxx_vtu_get() are not affected by this patch since they pass new=false. Signed-off-by:
Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Heiner Kallweit authored
There was a previous attempt to use xmit_more, but the change had to be reverted because under load sometimes a transmit timeout occurred [0]. Maybe this was caused by a missing memory barrier, the new attempt keeps the memory barrier before the call to netif_stop_queue like it is used by the driver as of today. The new attempt also changes the order of some calls as suggested by Eric. [0] https://lkml.org/lkml/2019/2/10/39 Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Matthew Wilcox (Oracle) authored
Add compile test support by moving all includes of files under asm/octeon into octeon-ethernet.h, and if we're not on MIPS, stub out all the calls into the octeon support code in octeon-stubs.h Signed-off-by:
Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Ding Xiang authored
use resource_size to calcuate ioremap size and make the code simpler. Signed-off-by:
Ding Xiang <dingxiang@cmss.chinamobile.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 29, 2019
-
-
David S. Miller authored
Andy Shevchenko says: ==================== NFC: nxp-nci: clean up and new device support Few people reported that some laptops are coming with new ACPI ID for the devices should be supported by nxp-nci driver. This series adds new ID (patch 2), cleans up the driver from legacy platform data and unifies GPIO request for Device Tree and ACPI (patches 3-6), removes dead or unneeded code (patches 7, 9, 11), constifies ID table (patch 8), removes comma in terminator line for better maintenance (patch 10) and rectifies Kconfig entry (patches 12-14). It also contains a fix for NFC subsystem as suggested by Sedat. Series has been tested by Sedat. Changelog v4: - rebased on top of latest linux-next - appended cover letter - elaborated removal of pr_fmt() in the patch 11 (David) ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sedat Dilek authored
This is a simple cleanup to the Kconfig help text as discussed in [1]. [1] https://marc.info/?t=155774435600001&r=1&w=2 Suggested-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Suggested-by:
Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> Signed-off-by:
Sedat Dilek <sedat.dilek@credativ.de> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sedat Dilek authored
This patch clarifies on the supported NXP NCI chips and families and lists PN547 and PN548 separately which are known as NPC100 respectively NPC300. This helps to find informations and identify drivers on vendor's support websites. For details see the discussion in [1] and [2]. [1] https://marc.info/?t=155774435600001&r=1&w=2 [2] https://patchwork.kernel.org/project/linux-wireless/list/?submitter=33142 Suggested-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Suggested-by:
Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> Signed-off-by:
Sedat Dilek <sedat.dilek@credativ.de> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
It seems contributors follow the style of Kconfig entries where explicit 'default n' is present. The default 'default' is 'n' already, thus, drop these lines from Kconfig to make it more clear. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
The macro had never been used. The driver uses mostly the nfc_err(), which, with other macros in the family, is backed by corresponding dev_err(). pr_fmt() is not used for dev_err() macro. Moreover, there is no need to print the module name which is part of the device instance name anyway. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
There is no need to have a comma after terminator entry in the arrays of IDs. This may prevent the misguided addition behind the terminator without compiler notice. Drop the comma in terminator lines for good. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
There is no need to guard OF device ID table with of_match_ptr(). Otherwise we would get a defined but not used data. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
The content of acpi_device_id is not supposed to change at runtime. All functions working with acpi_device_id provided by <linux/acpi.h> work with const acpi_device_id. So mark the non-const structs as const. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
Return directly in ->probe() since there no special cleaning is needed. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Andy Shevchenko authored
Since OF and ACPI case almost the same get rid of code duplication by moving gpiod_get() calls directly to ->probe(). Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-