05 Oct, 2020

13 commits

  • 1. Keep the code for the normal (non-error) flow at the lowest
    indentation level. And use "goto drop" for all error handling.

    2. Replace code that pads short Ethernet frames with a "__skb_pad" call.

    3. Change "dev_kfree_skb" to "kfree_skb" in error handling code.
    "kfree_skb" is the correct function to call when dropping an skb due to
    an error. "dev_kfree_skb", which is an alias of "consume_skb", is for
    dropping skbs normally (not due to an error).

    Cc: Krzysztof Halasa
    Cc: Stephen Hemminger
    Signed-off-by: Xie He
    Signed-off-by: David S. Miller

    Xie He
     
  • Currently, the driver will schedule RX ring reset when we get a buffer
    error in the RX completion record. These RX buffer errors can be due
    to normal out-of-buffer conditions or a permanent error in the RX
    ring. Because the driver cannot distinguish between these 2
    conditions, we assume all these buffer errors require reset.

    This is very disruptive when it is just a normal out-of-buffer
    condition. Newer firmware will now monitor the rings for the permanent
    failure and will send a notification to the driver when it happens.
    This allows the driver to reset only when such a notification is
    received. In environments where we have predominently out-of-buffer
    conditions, we now can avoid these unnecessary resets.

    Reviewed-by: Edwin Peer
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • There is logic in the RX path to detect unexpected handles in the
    RX completion. We'll print a warning and schedule a reset. The
    next expected handle is then set to 0xffff which is guaranteed to
    not match any valid handle. This will force all remaining packets in
    the ring to be discarded before the reset. There can be hundreds of
    these packets remaining in the ring and there is no need to print the
    warnings for these forced errors.

    Reviewed-by: Pavan Chebbi
    Reviewed-by: Edwin Peer
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Add a per ring rx_resets counter to count these RX resets.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • On some older chips, it is necessary to do a reset when we get buffer
    errors associated with an RX ring. These buffer errors may become
    frequent if the RX ring underruns under heavy traffic. The current
    code does a global reset of all reasources when this happens. This
    works but creates a big disruption of all rings when one RX ring is
    having problem. This patch implements a localized RX ring reset of
    just the RX ring having the issue. All other rings including all
    TX rings will not be affected by this single RX ring reset.

    Only the older chips prior to the P5 class supports this reset.
    Because it is not a global reset, packets may still be arriving
    while we are calling firmware to reset that ring. We need to be
    sure that we don't post any buffers during this time while the
    ring is undergoing reset. After firmware completes successfully,
    the ring will be in the reset state with no buffers and we can start
    filling it with new buffers and posting them.

    Reviewed-by: Pavan Chebbi
    Signed-off-by: Edwin Peer
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • bnxt_init_one_rx_ring() includes logic to initialize the BDs for one RX
    ring and to allocate the buffers. Separate the allocation logic into a
    new bnxt_alloc_one_rx_ring() function. The allocation function will be
    used later to allocate new buffers for one specified RX ring when we
    reset that RX ring.

    Reviewed-by: Pavan Chebbi
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • bnxt_free_rx_skbs() frees all the allocated buffers and SKBs for
    every RX ring. Refactor this function by calling a new function
    bnxt_free_one_rx_ring_skbs() to free these buffers on one specified
    RX ring at a time. This is preparation work for resetting one RX
    ring during run-time.

    Reviewed-by: Pavan Chebbi
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • If firmware does not come out of reset, log FW health status info
    to provide more information on firmware status.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • The NS3 SoC platforms require assistance from the OP-TEE to recover
    firmware if a crash occurs while no driver is bound. The
    CRASHED_NO_MASTER condition is recorded in the firmware status register
    during the crash to indicate when driver intervension is needed to
    coordinate a firmware reload. This condition is detected during early
    driver initialization in order to effect a firmware fastboot on
    supported platforms when necessary.

    Reviewed-by: Vasundhara Volam
    Signed-off-by: Edwin Peer
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Edwin Peer
     
  • Firmware now supports device independent discovery of the status
    register location. This status register can provide more detailed
    information about firmware errors, especially if problems occur
    before the HWRM interface is functioning. Attempt to map this
    register if it is present and report the firmware status on firmware
    init failures.

    Signed-off-by: Edwin Peer
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Edwin Peer
     
  • The allocator for the firmware health structure conflates allocation
    and capability checks, limiting the reusability of the code. This patch
    separates out the capability check and disablement and improves the
    warning message to better describe the consequences of an allocation
    failure.

    Signed-off-by: Edwin Peer
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Edwin Peer
     
  • Main changes is to extend hwrm_nvm_get_dev_info_output() for stored
    firmware versions and a new flag is added to fw_status_reg.

    Reviewed-by: Edwin Peer
    Signed-off-by: Vasundhara Volam
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Vasundhara Volam
     
  • Add a devlink region to return the per port registers.

    Signed-off-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Reviewed-by: Vladimir Oltean
    Signed-off-by: David S. Miller

    Andrew Lunn
     

04 Oct, 2020

6 commits


03 Oct, 2020

21 commits

  • Bulk of the genetlink users can use smaller ops, move them.

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Johannes Berg
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • We want to add maxattr and policy back to genl_ops, to enable
    dumping per command policy to user space. This, however, would
    cause bloat for all the families with global policies. Introduce
    smaller version of ops (half the size of genl_ops). Translate
    these smaller ops into a full blown struct before use in the
    core.

    v1:
    - use struct assignment
    - put a full copy of the op in struct genl_dumpit_info
    - s/light/small/

    Signed-off-by: Jakub Kicinski
    Reviewed-by: Johannes Berg
    Signed-off-by: David S. Miller

    Jakub Kicinski
     
  • Add support for the new group of devlink traps - PARSER_ERROR_DROPS.
    This consists of registering the array of parser error drops supported,
    controlling their action through the .trap_group_action_set() callback
    and reporting an erroneous skb received on the error queue
    appropriately.
    DPAA2 devices do not support controlling the action of independent
    parser error traps, thus the .trap_action_set() callback just returns an
    EOPNOTSUPP while .trap_group_action_set() actually notifies the hardware
    what it should do with a frame marked as having a header error.

    Signed-off-by: Ioana Ciornei
    Signed-off-by: David S. Miller

    Ioana Ciornei
     
  • Add basic support in dpaa2-eth for devlink. For the moment, just
    register the device with devlink, add the corresponding devlink port and
    implement the .info_get() callback.

    Signed-off-by: Ioana Ciornei
    Signed-off-by: David S. Miller

    Ioana Ciornei
     
  • If the new firmware image downladed for update is corrupted
    or is a bad format, the download process will report a status
    code specifically for that.

    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • Use the lif's ident information for the uc and mc filter
    counts rather than the ionic's version, to be sure
    we're getting the info that is specific to this lif.

    While we're thinking about it, add some missing error
    checking where we get the lif's identity information.

    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • After we do a fw upgrade and refill the ionic->ident.dev, we
    also need to update the other identity info. Since the lif
    identity needs to be updated each time the ionic identity is
    refreshed, we can pull it into ionic_identify().

    The debugfs entry is moved so that it doesn't cause an
    error message when the data is refreshed after the fw upgrade.

    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • Some time ago we short-circuited the queue disables on a timeout
    error in order to not have to wait on every queue when we already
    know it will time out. However, this meant that we're not
    properly stopping all the interrupts and napi contexts. This
    changes queue disable to always call ionic_qcq_disable() and to
    give it an argument to know when to not do the adminq request.

    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • There are a couple of error recovery paths that can come through
    ionic_qcq_disable() without having set up the qcq, so we need
    to make sure we have a valid qcq pointer before using it.

    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • Clear our link check requested flag on an allocation error.
    We end up dropping this link check request, but that should
    be fine as our watchdog will come back a few seconds later
    and request it again.

    Reported-by: Sebastian Andrzej Siewior
    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • Check through our work list for additional items. This normally
    will only have one item, but occasionally may have another
    job waiting. There really is no need reschedule ourself here.

    Reported-by: Sebastian Andrzej Siewior
    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • The event notification queue is set up a little differently in the
    NIC and so the notifyq q and cq descriptor structures need to be
    contiguous, which got missed in an earlier patch that separated
    out the q and cq descriptor allocations. That patch was aimed at
    making the big tx and rx descriptor queue allocations easier to
    manage - the notifyq is much smaller and doesn't need to be split.
    This patch simply adds an if/else and slightly different code for
    the notifyq descriptor allocation.

    Fixes: ea5a8b09dc3a ("ionic: reduce contiguous memory allocation requirement")
    Signed-off-by: Shannon Nelson
    Signed-off-by: David S. Miller

    Shannon Nelson
     
  • drivers/s390/net/ctcm_fsms.h: fsm_action_nop - only declaration left
    after commit 04885948b101 ("ctc: removal of the old ctc driver")

    drivers/s390/net/ctcm_mpc.h: ctcmpc_open - only declaration left after
    commit 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver")

    Reviewed-by: Julian Wiedmann
    Signed-off-by: Vasily Gorbik
    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Vasily Gorbik
     
  • - Add/delete some blanks, white spaces and braces.
    - Fix misindentations.
    - Adjust a deprecated header include, and htons() conversion.
    - Remove extra 'return' statements.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • Replace our custom version of netdev_name().

    Once we started to allocate the netdev at probe time with
    commit d3d1b205e89f ("s390/qeth: allocate netdevice early"), this
    stopped working as intended anyway.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • The discipline struct is a fixed group of function pointers.
    So declare the L2 and L3 disciplines as constant.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • For OSA devices that are _not_ configured in prio-queue mode, give users
    the option of selecting the number of active TX queues.
    This requires setting up the HW queues with a reasonable default QoS
    value in the QIB's PQUE parm area.

    As with the other device types, we bring up the device with a minimal
    number of TX queues for compatibility reasons.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • Use a proper struct, and only program the QIB extensions for devices
    where they are supported.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • When re-initializing a device, we can hit a situation where
    qeth_osa_set_output_queues() detects that it supports more or less
    HW TX queues than before. Right now we adjust dev->real_num_tx_queues
    from right there, but
    1. it's getting more & more complicated to cover all cases, and
    2. we can't re-enable the actually expected number of TX queues later
    because we lost the needed information.

    So keep track of the wanted TX queues (on initial setup, and whenever
    its changed via .set_channels), and later use that information when
    re-enabling the netdevice.

    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller

    Julian Wiedmann
     
  • …ux/kernel/git/kvalo/wireless-drivers-next

    Kalle Valo says:

    ====================
    wireless-drivers-next patches for v5.10

    Third set of patches for v5.10. Lots of iwlwifi patches this time, but
    also few patches ath11k and of course smaller changes to other
    drivers.

    Major changes:

    rtw88

    * properly recover from firmware crashes on 8822c

    * dump firmware crash log

    iwlwifi

    * protected Target Wake Time (TWT) implementation

    * support disabling 5.8GHz channels via ACPI

    * support VHT extended NSS capability

    * enable Target Wake Time (TWT) by default

    ath11k

    * improvements to QCA6390 PCI support to make it more usable
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • Via the OCELOT_MASK_MODE_REDIRECT flag put in the IS2 action vector, it
    is possible to replace previous forwarding decisions with the port mask
    installed in this rule.

    I have studied Table 54 "MASK_MODE and PORT_MASK Combinations" from the
    VSC7514 documentation and it appears to behave sanely when this rule is
    installed in either lookup 0 or 1. Namely, a redirect in lookup 1 will
    overwrite the forwarding decision taken by any entry in lookup 0.

    Signed-off-by: Vladimir Oltean
    Signed-off-by: David S. Miller

    Vladimir Oltean