1. Sep 03, 2022
  2. Sep 02, 2022
    • Jakub Kicinski's avatar
      net: remove netif_tx_napi_add() · c3f760ef
      Jakub Kicinski authored
      
      
      All callers are now gone.
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3f760ef
    • Eric Dumazet's avatar
      net: bql: add more documentation · 977f1aa5
      Eric Dumazet authored
      
      
      Add some documentation for netdev_tx_sent_queue() and
      netdev_tx_completed_queue()
      
      Stating that netdev_tx_completed_queue() must be called once
      per TX completion round is apparently not obvious for everybody.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      977f1aa5
    • David S. Miller's avatar
      Merge branch 'net-ipa-transaction-state-IDs' · 25de4a0b
      David S. Miller authored
      
      
      Alex Elder says:
      
      ====================
      net: ipa: use IDs to track transaction state
      
      This series is the first of three groups of changes that simplify
      the way the IPA driver tracks the state of its transactions.
      
      Each GSI channel has a fixed number of transactions allocated at
      initialization time.  The number allocated matches the number of
      TREs in the transfer ring associated with the channel.  This is
      because the transfer ring limits the number of transfers that can
      ever be underway, and in the worst case, each transaction represents
      a single TRE.
      
      Transactions go through various states during their lifetime.
      Currently a set of lists keeps track of which transactions are in
      each state.  Initially, all transactions are free.  An allocated
      transaction is placed on the allocated list.  Once an allocated
      transaction is committed, it is moved from the allocated to the
      committed list.  When a committed transaction is sent to hardware
      (via a doorbell) it is moved to the pending list.  When hardware
      signals that some work has completed, transactions are moved to the
      completed list.  Finally, when a completed transaction is polled
      it's moved to the polled list before being removed when it becomes
      free.
      
      Changing a transaction's state thus normally involves manipulating
      two lists, and to prevent corruption a spinlock is held while the
      lists are updated.
      
      Transactions move through their states in a well-defined sequence
      though, and they do so strictly in order.  So transaction 0 is
      always allocated before transaction 1; transaction 0 is always
      committed before transaction 1; and so on, through completion,
      polling, and becoming free.  Because of this, it's sufficient to
      just keep track of which transaction is the first in each state.
      The rest of the transactions in a given state can be derived from
      the first transaction in an "adjacent" state.  As a result, we can
      track the state of all transactions with a set of indexes, and can
      update these without the need for a spinlock.
      
      This first group of patches just defines the set of indexes that
      will be used for this new way of tracking transaction state.  Two
      more groups of patches will follow.  I've broken the 17 patches into
      these three groups to facilitate review.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25de4a0b
    • Alex Elder's avatar
      net: ipa: track polled transactions with an ID · fd3bd039
      Alex Elder authored
      
      
      Add a transaction ID to track the first element in the transaction
      array that has been polled.  Advance the ID when we are releasing a
      transaction.
      
      Temporarily add warnings that verify that the first polled
      transaction tracked by the ID matches the first element on the
      polled list, both when polling and freeing.
      
      Remove the temporary warnings added by the previous commit.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd3bd039
    • Alex Elder's avatar
      net: ipa: track completed transactions with an ID · 949cd0b5
      Alex Elder authored
      
      
      Add a transaction ID field to track the first element in the
      transaction array that has completed but has not yet been polled.
      
      Advance the ID when we are processing a transaction in the NAPI
      polling loop (where completed transactions become polled).
      
      Temporarily add warnings that verify that the first completed
      transaction tracked by the ID matches the first element on the
      completed list, both when pending and completing.
      
      Remove the temporary warnings added by the previous commit.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      949cd0b5
    • Alex Elder's avatar
      net: ipa: track pending transactions with an ID · eeff7c14
      Alex Elder authored
      
      
      Add a transaction ID field to track the first element in the
      transaction array that is pending (sent to hardware) but not yet
      complete.  Advance the ID when a completion event for a channel
      indicates that transactions have completed.
      
      Temporarily add warnings that verify that the first pending
      transaction tracked by the ID matches the first element on the
      pending list, both when pending and completing, as well as when
      resetting the channel.
      
      Remove the temporary warnings added by the previous commit.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eeff7c14
    • Alex Elder's avatar
      net: ipa: track committed transactions with an ID · fc95d958
      Alex Elder authored
      
      
      Add a transaction ID field to track the first element in a channel's
      transaction array that has been committed, but not yet passed to the
      hardware.  Advance the ID when the hardware is notified via doorbell
      that TREs from a transaction are ready for consumption.
      
      Temporarily add warnings that verify that the first committed
      transaction tracked by the ID matches the first element on the
      committed list, both when committing and pending (at doorbell).
      
      Remove the temporary warnings added by the previous commit.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc95d958
    • Alex Elder's avatar
      net: ipa: track allocated transactions with an ID · 41e2a2c0
      Alex Elder authored
      
      
      Transactions for a channel are now managed in an array, with a free
      transaction ID indicating which is the next one free.
      
      Add another transaction ID field to track the first element in the
      array that has been allocated.  Advance it when a transaction is
      committed (because that is when that transaction leaves allocated
      state).
      
      Temporarily add warnings that verify that the first allocated
      transaction tracked by the ID matches the first element on the
      allocated list, both when allocating and committing a transaction.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      41e2a2c0
    • Alex Elder's avatar
      net: ipa: use an array for transactions · 12382d11
      Alex Elder authored
      
      
      Transactions are always allocated one at a time.  The maximum number
      of them we could ever need occurs if each TRE is assigned to a
      transaction.  So a channel requires no more transactions than the
      number of TREs in its transfer ring.  That number is known to be a
      power-of-2 less than 65536.
      
      The transaction pool abstraction is used for other things, but for
      transactions we can use a simple array of transaction structures,
      and use a free index to indicate which entry in the array is the
      next one free for allocation.
      
      By having the number of elements in the array be a power-of-2, we
      can use an ever-incrementing 16-bit free index, and use it modulo
      the array size.  Distinguish a "trans_id" (whose value can exceed
      the number of entries in the transaction array) from a "trans_index"
      (which is less than the number of entries).
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12382d11
    • David S. Miller's avatar
      Merge branch 'lan966x-make-reset-optional' · a01105f1
      David S. Miller authored
      Michael Walle says:
      
      ====================
      net: lan966x: make reset optional
      
      This is the remaining part of the reset rework on the LAN966x targetting
      the netdev tree.
      
      The former series can be found at:
      https://lore.kernel.org/lkml/20220826115607.1148489-1-michael@walle.cc/
      
      
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a01105f1
    • Michael Walle's avatar
      net: lan966x: make reset optional · f4c1f51c
      Michael Walle authored
      
      
      There is no dedicated reset for just the switch core. The reset which
      is used up until now, is more of a global reset, resetting almost the
      whole SoC and cause spurious errors by doing so. Make it possible to
      handle the reset elsewhere and make the reset optional.
      
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4c1f51c
    • Michael Walle's avatar
      dt-bindings: net: sparx5: don't require a reset line · baa6a9b5
      Michael Walle authored
      
      
      Make the reset line optional. It turns out, there is no dedicated reset
      for the switch. Instead, the reset which was used up until now, was kind
      of a global reset. This is now handled elsewhere, thus don't require a
      reset.
      
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      baa6a9b5
    • Eric Dumazet's avatar
      ipv6: tcp: send consistent autoflowlabel in SYN_RECV state · aa51b80e
      Eric Dumazet authored
      This is a followup of commit c67b8555
      
       ("ipv6: tcp: send consistent
      autoflowlabel in TIME_WAIT state"), but for SYN_RECV state.
      
      In some cases, TCP sends a challenge ACK on behalf of a SYN_RECV request.
      WHen this happens, we want to use the flow label that was used when
      the prior SYNACK packet was sent, instead of another one.
      
      After his patch, following packetdrill passes:
      
          0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
         +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
         +0 bind(3, ..., ...) = 0
         +0 listen(3, 1) = 0
      
        +.2 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
         +0 > (flowlabel 0x11) S. 0:0(0) ack 1 <...>
      // Test if a challenge ack is properly sent (same flowlabel than prior SYNACK)
         +.01 < . 4000000000:4000000000(0) ack 1 win 320
         +0  > (flowlabel 0x11) . 1:1(0) ack 1
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/20220831203729.458000-1-eric.dumazet@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      aa51b80e
    • Vladimir Oltean's avatar
      selftests: net: dsa: symlink the tc_actions.sh test · 1ab3d417
      Vladimir Oltean authored
      
      
      This has been validated on the Ocelot/Felix switch family (NXP LS1028A)
      and should be relevant to any switch driver that offloads the tc-flower
      and/or tc-matchall actions trap, drop, accept, mirred, for which DSA has
      operations.
      
      TEST: gact drop and ok (skip_hw)                                    [ OK ]
      TEST: mirred egress flower redirect (skip_hw)                       [ OK ]
      TEST: mirred egress flower mirror (skip_hw)                         [ OK ]
      TEST: mirred egress matchall mirror (skip_hw)                       [ OK ]
      TEST: mirred_egress_to_ingress (skip_hw)                            [ OK ]
      TEST: gact drop and ok (skip_sw)                                    [ OK ]
      TEST: mirred egress flower redirect (skip_sw)                       [ OK ]
      TEST: mirred egress flower mirror (skip_sw)                         [ OK ]
      TEST: mirred egress matchall mirror (skip_sw)                       [ OK ]
      TEST: trap (skip_sw)                                                [ OK ]
      TEST: mirred_egress_to_ingress (skip_sw)                            [ OK ]
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20220831170839.931184-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1ab3d417
    • Jinpeng Cui's avatar
      netdevsim: remove redundant variable ret · 5603072e
      Jinpeng Cui authored
      
      
      Return value directly from nsim_dev_reload_create()
      instead of getting value from redundant variable ret.
      
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarJinpeng Cui <cui.jinpeng2@zte.com.cn>
      Link: https://lore.kernel.org/r/20220831154329.305372-1-cui.jinpeng2@zte.com.cn
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5603072e
    • Juhee Kang's avatar
      net: rtnetlink: use netif_oper_up instead of open code · abbc7928
      Juhee Kang authored
      
      
      The open code is defined as a new helper function(netif_oper_up) on netdev.h,
      the code is dev->operstate == IF_OPER_UP || dev->operstate == IF_OPER_UNKNOWN.
      Thus, replace the open code to netif_oper_up. This patch doesn't change logic.
      
      Signed-off-by: default avatarJuhee Kang <claudiajkang@gmail.com>
      Link: https://lore.kernel.org/r/20220831125845.1333-1-claudiajkang@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      abbc7928
    • Zhengchao Shao's avatar
      net: sched: etf: remove true check in etf_enable_offload() · 75aad41a
      Zhengchao Shao authored
      
      
      etf_enable_offload() is only called when q->offload is false in
      etf_init(). So remove true check in etf_enable_offload().
      
      Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
      Acked-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Link: https://lore.kernel.org/r/20220831092919.146149-1-shaozhengchao@huawei.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      75aad41a
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 60ad1100
      Jakub Kicinski authored
      
      
      tools/testing/selftests/net/.gitignore
        sort the net-next version and use it
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      60ad1100
    • Linus Torvalds's avatar
      Merge tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 42e66b1c
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from bluetooth, bpf and wireless.
      
        Current release - regressions:
      
         - bpf:
            - fix wrong last sg check in sk_msg_recvmsg()
            - fix kernel BUG in purge_effective_progs()
      
         - mac80211:
            - fix possible leak in ieee80211_tx_control_port()
            - potential NULL dereference in ieee80211_tx_control_port()
      
        Current release - new code bugs:
      
         - nfp: fix the access to management firmware hanging
      
        Previous releases - regressions:
      
         - ip: fix triggering of 'icmp redirect'
      
         - sched: tbf: don't call qdisc_put() while holding tree lock
      
         - bpf: fix corrupted packets for XDP_SHARED_UMEM
      
         - bluetooth: hci_sync: fix suspend performance regression
      
         - micrel: fix probe failure
      
        Previous releases - always broken:
      
         - tcp: make global challenge ack rate limitation per net-ns and
           default disabled
      
         - tg3: fix potential hang-up on system reboot
      
         - mac802154: fix reception for no-daddr packets
      
        Misc:
      
         - r8152: add PID for the lenovo onelink+ dock"
      
      * tag 'net-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (56 commits)
        net/smc: Remove redundant refcount increase
        Revert "sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb"
        tcp: make global challenge ack rate limitation per net-ns and default disabled
        tcp: annotate data-race around challenge_timestamp
        net: dsa: hellcreek: Print warning only once
        ip: fix triggering of 'icmp redirect'
        sch_cake: Return __NET_XMIT_STOLEN when consuming enqueued skb
        selftests: net: sort .gitignore file
        Documentation: networking: correct possessive "its"
        kcm: fix strp_init() order and cleanup
        mlxbf_gige: compute MDIO period based on i1clk
        ethernet: rocker: fix sleep in atomic context bug in neigh_timer_handler
        net: lan966x: improve error handle in lan966x_fdma_rx_get_frame()
        nfp: fix the access to management firmware hanging
        net: phy: micrel: Make the GPIO to be non-exclusive
        net: virtio_net: fix notification coalescing comments
        net/sched: fix netdevice reference leaks in attach_default_qdiscs()
        net: sched: tbf: don't call qdisc_put() while holding tree lock
        net: Use u64_stats_fetch_begin_irq() for stats fetch.
        net: dsa: xrs700x: Use irqsave variant for u64 stats update
        ...
      42e66b1c
    • Linus Torvalds's avatar
      Merge tag 'slab-for-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab · d330076e
      Linus Torvalds authored
      Pull slab fix from Vlastimil Babka:
      
       - A fix from Waiman Long to avoid a theoretical deadlock reported by
         lockdep.
      
      * tag 'slab-for-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
        mm/slab_common: Deleting kobject in kmem_cache_destroy() without holding slab_mutex/cpu_hotplug_lock
      d330076e
    • Linus Torvalds's avatar
      Merge tag 'sound-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2880e1a1
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just handful changes at this time. The only major change is the
        regression fix about the x86 WC-page buffer allocation.
      
        The rest are trivial data-race fixes for ALSA sequencer core, the
        possible out-of-bounds access fixes in the new ALSA control hash code,
        and a few device-specific workarounds and fixes"
      
      * tag 'sound-6.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Add quirk for LH Labs Geek Out HD Audio 1V5
        ALSA: hda/realtek: Add speaker AMP init for Samsung laptops with ALC298
        ALSA: control: Re-order bounds checking in get_ctl_id_hash()
        ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
        ALSA: hda: intel-nhlt: Correct the handling of fmt_config flexible array
        ALSA: seq: Fix data-race at module auto-loading
        ALSA: seq: oss: Fix data-race for max_midi_devs access
        ALSA: memalloc: Revive x86-specific WC page allocations again
      2880e1a1
  3. Sep 01, 2022