- Oct 02, 2021
-
-
Shannon Nelson authored
Move creation and deletion of lif mutex a level out to lif creation and delete, rather than in init and deinit. This assures that nothing will get hung if anything is waiting on the mutex while the driver is clearing the lif while handling the fw_down/fw_up cycle. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 03, 2021
-
-
Shannon Nelson authored
Deadlock seen in an instance where the hwstamp configuration is changed while the driver is running: [ 3988.736671] schedule_preempt_disabled+0xe/0x10 [ 3988.736676] __mutex_lock.isra.5+0x276/0x4e0 [ 3988.736683] __mutex_lock_slowpath+0x13/0x20 [ 3988.736687] ? __mutex_lock_slowpath+0x13/0x20 [ 3988.736692] mutex_lock+0x2f/0x40 [ 3988.736711] ionic_stop_queues_reconfig+0x16/0x40 [ionic] [ 3988.736726] ionic_reconfigure_queues+0x43e/0xc90 [ionic] [ 3988.736738] ionic_lif_config_hwstamp_rxq_all+0x85/0x90 [ionic] [ 3988.736751] ionic_lif_hwstamp_set_ts_config+0x29c/0x360 [ionic] [ 3988.736763] ionic_lif_hwstamp_set+0x76/0xf0 [ionic] [ 3988.736776] ionic_eth_ioctl+0x33/0x40 [ionic] [ 3988.736781] dev_ifsioc+0x12c/0x420 [ 3988.736785] dev_ioctl+0x316/0x720 This can be demonstrated with "ptp4l -m -i <intf>" To fix this, we pull the use of the queue_lock further up above the callers of ionic_reconfigure_queues() and ionic_stop_queues_reconfig(). Fixes: 7ee99fc5 ("ionic: pull hwstamp queue_lock up a level") Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 28, 2021
-
-
Shannon Nelson authored
The queues can be freed in ionic_close(). They need to be recreated after ionic_open(). It doesn't need to replay the whole config. It only needs to create the timestamping queues again. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Move the hwstamp configuration use of queue_lock up a level to simplify use and error handling. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Add the queue configuration lock to ionic_open() and ionic_stop() so that they don't collide with other in parallel queue configuration actions such as MTU changes as can be demonstrated with a tight loop of ifup/change-mtu/ifdown. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Make sure the ctx struct has the new mac address before any save operations happen. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
In some cases of fw_down it was called because there was a fw_generation change, and the firmware is already back up. In order to keep the down time to a minimum, don't wait for the next watchdog polling cycle, fire another watchdog off as soon as we can - an out-of-cycle check won't hurt, and may well speed up the recovery. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Aug 26, 2021
-
-
Shannon Nelson authored
Make sure we go into PROMISC mode when we have too many filters by specifically counting the filters that successfully get saved to the firmware. The device advertises max_ucast_filters and max_mcast_filters, but really only has max_ucast_filters slots available for uc and mc filters combined. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
The filter counting in ionic_lif_addr() really isn't useful, and potentially misleading, especially when we're checking in ionic_lif_rx_mode() to see if we need to go into PROMISC mode. We can safely refactor this and remove a calling layer. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
In order to separate the atomic needs of __dev_uc_sync() and __dev_mc_sync() from the safe rx_mode handling, we need to have the ndo handler manipulate the driver's filter list, and later have the driver sync the filters to the firmware, outside of the atomic context. Here we put __dev_mc_sync() and __dev_uc_sync() back into the ndo callback to give them their netif_addr_lock context and have them update the driver's filter list, flagging changes that should be made to the device filter list. Later, in the rx_mode handler, we read those hints and sync up the device's list as needed. It is possible for multiple add/delete requests to come from the stack before the rx_mode task processes the list, but the handling of the sync status flag should keep everything sorted correctly. For example, if a delete of an existing filter is followed by another add before the rx_mode task is run, as can happen when going in and out of a bond, the add will cancel the delete and no actual changes will be sent to the device. We also add a check in the watchdog to see if there are any stray unsync'd filters, possibly left over from a filter overflow and waiting to get sync'd after some other filter gets removed to make room. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Since only two functions call through ionic_set_rx_mode(), one that can sleep and one that can't, we can split the function and put the bits of code into the callers. This removes an unnecessary calling layer. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
With the move of mac filter handling to outside of the ndo_rx_mode context using the IONIC_DW_TYPE_RX_MODE, we no longer are using IONIC_DW_TYPE_RX_ADDR_ADD and IONIC_DW_TYPE_RX_ADDR_DEL and they can be removed. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 27, 2021
-
-
Shannon Nelson authored
If there's only one queue, there is no need to enable the rxhashing. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Initialize err to 0 instead of ENOMEM, and specifically set err to ENOMEM in the devm_kcalloc() failure cases. Also, add an error message to the end of reconfig. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
When running in a small kdump kernel, we can play nice and minimize our resource use to help make sure that kdump is successful in its mission. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Arnd Bergmann authored
Most users of ndo_do_ioctl are ethernet drivers that implement the MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardware timestamping with SIOCSHWTSTAMP/SIOCGHWTSTAMP. Separate these from the few drivers that use ndo_do_ioctl to implement SIOCBOND, SIOCBR and SIOCWANDEV commands. This is a purely cosmetic change intended to help readers find their way through the implementation. Cc: Doug Ledford <dledford@redhat.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vivien Didelot <vivien.didelot@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Vladimir Oltean <olteanv@gmail.com> Cc: Leon Romanovsky <leon@kernel.org> Cc: linux-rdma@vger.kernel.org Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Jason Gunthorpe <jgg@nvidia.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Jul 23, 2021
-
-
Shannon Nelson authored
Move the interrupt coalesce value update out of the napi thread and into the dim_work thread and set it only when it has actually changed. Fixes: 04a83459 ("ionic: dynamic interrupt moderation") Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Move the bulk of the code from ionic_set_rx_mode(), which can be called from atomic context, into ionic_lif_rx_mode() which is a safe context. A call from the stack will get pushed off into a work thread, but it is also possible to simultaneously have a call driven by a queue reconfig request from an ethtool command or fw recovery event. We add a mutex around the rx_mode work to be sure they don't collide. Fixes: 81dbc241 ("ionic: change set_rx_mode from_ndo to can_sleep") Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 08, 2021
-
-
Shannon Nelson authored
Split the call into ionic_lif_hwstamp_set() to have two separate interfaces, one from the ioctl() for changing the configuration and one for replaying the current configuration after a FW RESET. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
When starting the queues in the link-check, don't go into the BROKEN state if the return was EBUSY. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
When returning after a firmware reset, re-start the PTP after we've restarted the general queues. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Clean up variable declarations. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Apr 02, 2021
-
-
Shannon Nelson authored
Let the network stack know we've got support for timestamping the packets. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
The Tx and Rx timestamped packets are handled through separate queues. Here we set them up, service them, and tear them down along with the normal Tx and Rx queues. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
We do hardware timestamping through a separate Tx queue, and optionally through a separate Rx queue. These queues are allocated, freed, and tracked separately from the basic queue arrays. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
These are changes to compile and link the new code, but no new feature support is available or advertised yet. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
In preparating for hardware timestamping, we need to support large Tx and Rx completion descriptors. Here we add the new queue feature ids and handling for the completion descriptor sizes. We only are adding support for the Rx 2x sized completion descriptors in the general Rx queues for now as we will be using it for PTP Rx support, and we don't have an immediate use for the large descriptors in the general Tx queues yet; it will be used in a special Tx queues added in one of the next few patches. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Add queue feature extensions to prepare for features that can be queue specific, in addition to the general queue features already defined. While we're here, change the existing feature ids from #defines to enum. Signed-off-by:
Allen Hubbe <allenbh@pensando.io> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 31, 2021
-
-
Shannon Nelson authored
Use the actual pointer that we care about as the subject of the sizeof, rather than a struct name. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 19, 2021
-
-
Shannon Nelson authored
Don't destroy the adminq while there is an outstanding request. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Up to now we've been ignoring any error return from the queue starting in the link status check, so we fix that here. If the driver had to reset and couldn't get things running properly again, for example after a Tx Timeout and the FW is not responding to commands, don't let the link watchdog try to restart the queues. At this point the user can try to DOWN and UP the device to clear the errors. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Block some actions while the FW is in a reset activity and the queues are not configured. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
We can get to the counter without going through the pointer that the robot complained about. Reported-by:
kernel test robot <lkp@intel.com> Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
The qcq->intr.index was set when the queue was allocated, there is no need to reach around to find it. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Catch a couple of missing macro name uses, fix a couple of misspellings, etc. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Mar 10, 2021
-
-
Shannon Nelson authored
With a reconfigure of each queue is needed a rebuild of the matching debugfs information. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Shannon Nelson authored
Clean up a couple of struct uses to make for better fast path access. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Dec 02, 2020
-
-
Shannon Nelson authored
Order of operations is slightly more correct in the driver to change the netdev->mtu after the queues have been stopped rather than before. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
Shannon Nelson authored
Remove memory allocation fail messages where the OOM stack trace will make it obvious which allocation request failed. Signed-off-by:
Shannon Nelson <snelson@pensando.io> Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-
- Nov 24, 2020
-
-
Jakub Kicinski authored
linux/netdevice.h is included in very many places, touching any of its dependecies causes large incremental builds. Drop the linux/ethtool.h include, linux/netdevice.h just needs a forward declaration of struct ethtool_ops. Fix all the places which made use of this implicit include. Acked-by:
Johannes Berg <johannes@sipsolutions.net> Acked-by:
Shannon Nelson <snelson@pensando.io> Reviewed-by:
Jesse Brandeburg <jesse.brandeburg@intel.com> Link: https://lore.kernel.org/r/20201120225052.1427503-1-kuba@kernel.org Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
-