Skip to content
Permalink
A-Cody-Schuffe…
Switch branches/tags

Commits on Mar 18, 2021

  1. virt_wifi: Return micros for BSS TSF values

    cfg80211_inform_bss expects to receive a TSF value, but is given the
    time since boot in nanoseconds. TSF values are expected to be at
    microsecond scale rather than nanosecond scale.
    
    Signed-off-by: A. Cody Schuffelen <schuffelen@google.com>
    Databean authored and intel-lab-lkp committed Mar 18, 2021

Commits on Mar 15, 2021

  1. rtw88: 8822c: support FW crash dump when FW crash

    Although FW crash logs are already supported for dumping in driver, the
    logs may not be sufficient to analyze field issues. To improve this part,
    we add a support to dump FW memory.
    
    When driver receives FW crash notifications, driver uses DDMA, which is a
    HW ability, to copy specified FW memory to FW fifo. Driver can then dump
    these information from FW fifo. With this support, not only FW crash log
    but also specified FW memory will be dumped while FW crash. Besides,
    specified registers are also dumped.
    
    This feature is implemeted on 8822C first due to difference of FW layouts
    between ICs. In addition, we add a debugfs to trigger FW crash. It can
    simulate the process of crash, dump and reset. Through it, we can also
    check if a reset is ongoing.
    
    Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210309060121.9099-1-pkshih@realtek.com
    Zong-Zhe Yang authored and Kalle Valo committed Mar 15, 2021
  2. wilc1000: use wilc handler as cookie in request_threaded_irq()

    Use same cookie for request_threaded_irq() & free_irq() to properly free
    IRQ during module unload. free_irq() already uses *wilc* handler so the
    changes are required for request_threaded_irq().
    
    Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210225042302.17048-1-ajay.kathat@microchip.com
    ajaykathat authored and Kalle Valo committed Mar 15, 2021
  3. wilc1000: write value to WILC_INTR2_ENABLE register

    Write the value instead of reading it twice.
    
    Fixes: c5c77ba ("staging: wilc1000: Add SDIO/SPI 802.11 driver")
    Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210224163706.519658-1-marcus.folkesson@gmail.com
    marcusfolkesson authored and Kalle Valo committed Mar 15, 2021
  4. wilc1000: Support chip sleep over SPI

    chip_allow_sleep() only supported wakeup via SDIO, which made the
    driver unusable over SPI.  This code is a straight forward port from
    the driver in the linux-at91 repository.
    
    Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
    Acked-by: Ajay Singh <ajay.kathat@microchip.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210224033317.1507603-1-davidm@egauge.net
    dmosberger authored and Kalle Valo committed Mar 15, 2021
  5. rtw88: remove unnecessary variable

    The variable ret is defined at the beginning and initialized
    to 0 until the function returns ret, and the variable ret is
    not reassigned.Therefore, we do not need to define the variable
    ret, just return 0 directly at the end of the function.
    
    Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210223075438.13676-1-samirweng1979@163.com
    wengjianfeng authored and Kalle Valo committed Mar 15, 2021
  6. rtw88: coex: add power off setting

    Clear WL/BT on/off bit in scoreboard register that is used to exchange
    WL/BT status. Since the status is preserved after warm reboot, we must
    clear it when WL is going to down.
    
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/20210219054140.7835-1-pkshih@realtek.com
    Ping-Ke Shih authored and Kalle Valo committed Mar 15, 2021
  7. Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kva…

    …lo/ath.git
    
    ath.git patches for v5.13. Major changes:
    
    ath11k
    
    * add initial support for QCN9074, but not enabled yet due to firmware problems
    
    * enable radar detection for 160MHz secondary segment
    
    * handle beacon misses in station mode
    Kalle Valo committed Mar 15, 2021

Commits on Mar 14, 2021

  1. Merge branch 'psample-Add-additional-metadata-attributes'

    Ido Schimmel says:
    
    ====================
    psample: Add additional metadata attributes
    
    This series extends the psample module to expose additional metadata to
    user space for packets sampled via act_sample. The new metadata (e.g.,
    transit delay) can then be consumed by applications such as hsflowd [1]
    for better network observability.
    
    netdevsim is extended with a dummy psample implementation that
    periodically reports "sampled" packets to the psample module. In
    addition to testing of the psample module, it enables the development
    and demonstration of user space applications (e.g., hsflowd) that are
    interested in the new metadata even without access to specialized
    hardware (e.g., Spectrum ASIC) that can provide it.
    
    mlxsw is also extended to provide the new metadata to psample.
    
    A Wireshark dissector for psample netlink packets [2] will be submitted
    upstream after the kernel patches are accepted. In addition, a libpcap
    capture module for psample is currently in the works. Eventually, users
    should be able to run:
    
     # tshark -i psample
    
    In order to consume sampled packets along with their metadata.
    
    Series overview:
    
    Patch #1 makes it easier to extend the metadata provided to psample
    
    Patch #2 adds the new metadata attributes to psample
    
    Patch #3 extends netdevsim to periodically report "sampled" packets to
    psample. Various debugfs knobs are added to control the reporting
    
    Patch #4 adds a selftest over netdevsim
    
    Patches #5-torvalds#10 gradually add support for the new metadata in mlxsw
    
    Patch torvalds#11 adds a selftest over mlxsw
    
    [1] https://sflow.org/draft4_sflow_transit.txt
    [2] https://gitlab.com/amitcohen1/wireshark/-/commit/3d711143024e032aef1b056dd23f0266c54fab56
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Mar 14, 2021
  2. selftests: mlxsw: Add tc sample tests

    Test that packets are sampled when tc-sample is used and that reported
    metadata is correct. Two sets of hosts (with and without LAG) are used,
    since metadata extraction in mlxsw is a bit different when LAG is
    involved.
    
     # ./tc_sample.sh
     TEST: tc sample rate (forward)                                      [ OK ]
     TEST: tc sample rate (local receive)                                [ OK ]
     TEST: tc sample maximum rate                                        [ OK ]
     TEST: tc sample group conflict test                                 [ OK ]
     TEST: tc sample iif                                                 [ OK ]
     TEST: tc sample lag iif                                             [ OK ]
     TEST: tc sample oif                                                 [ OK ]
     TEST: tc sample lag oif                                             [ OK ]
     TEST: tc sample out-tc                                              [ OK ]
     TEST: tc sample out-tc-occ                                          [ OK ]
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  3. mlxsw: spectrum: Report extra metadata to psample module

    Make use of the previously added metadata and report it to the psample
    module. The metadata is read from the skb's control block, which was
    initialized by the bus driver (i.e., 'mlxsw_pci') after decoding the
    packet's Completion Queue Element (CQE).
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  4. mlxsw: spectrum: Remove mlxsw_sp_sample_receive()

    The function resolves the psample sampling group from the Rx port
    because this is the only form of sampling the driver currently supports.
    Subsequent patches are going to add support for Tx-based and
    policy-based sampling, in which case the sampling group would not be
    resolved from the Rx port.
    
    Therefore, move this code to the Rx-specific sampling listener.
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  5. mlxsw: spectrum: Remove unnecessary RCU read-side critical section

    Since commit 7d8e8f3 ("mlxsw: core: Increase scope of RCU read-side
    critical section"), all Rx handlers are called from an RCU read-side
    critical section.
    
    Remove the unnecessary rcu_read_lock() / rcu_read_unlock().
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  6. mlxsw: pci: Set extra metadata in skb control block

    Packets that are mirrored / sampled to the CPU have extra metadata
    encoded in their corresponding Completion Queue Element (CQE). Retrieve
    this metadata from the CQE and set it in the skb control block so that
    it could be accessed by the switch driver (i.e., 'mlxsw_spectrum').
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  7. mlxsw: Create dedicated field for Rx metadata in skb control block

    Next patch will need to encode more Rx metadata in the skb control
    block, so create a dedicated field for it and move the cookie index
    there.
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  8. mlxsw: pci: Add more metadata fields to CQEv2

    The Completion Queue Element version 2 (CQEv2) includes various metadata
    fields for packets that are mirrored / sampled to the CPU.
    
    Add these fields so that they could be used by a later patch.
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  9. selftests: netdevsim: Test psample functionality

    Test various aspects of psample functionality over netdevsim and in
    particular test that the psample module correctly reports the provided
    metadata.
    
    Example:
    
     # ./psample.sh
     TEST: psample enable / disable                                      [ OK ]
     TEST: psample group number                                          [ OK ]
     TEST: psample metadata                                              [ OK ]
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  10. netdevsim: Add dummy psample implementation

    Allow netdevsim to report "sampled" packets to the psample module by
    periodically generating packets from a work queue. The behavior can be
    enabled / disabled (default) and the various meta data attributes can be
    controlled via debugfs knobs.
    
    This implementation enables both testing of the psample module with all
    the optional attributes as well as development of user space
    applications on top of psample such as hsflowd and a Wireshark dissector
    for psample generic netlink packets.
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  11. psample: Add additional metadata attributes

    Extend psample to report the following attributes when available:
    
    * Output traffic class as a 16-bit value
    * Output traffic class occupancy in bytes as a 64-bit value
    * End-to-end latency of the packet in nanoseconds resolution
    * Software timestamp in nanoseconds resolution (always available)
    * Packet's protocol. Needed for packet dissection in user space (always
      available)
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  12. psample: Encapsulate packet metadata in a struct

    Currently, callers of psample_sample_packet() pass three metadata
    attributes: Ingress port, egress port and truncated size. Subsequent
    patches are going to add more attributes (e.g., egress queue occupancy),
    which also need an indication whether they are valid or not.
    
    Encapsulate packet metadata in a struct in order to keep the number of
    arguments reasonable.
    
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Mar 14, 2021
  13. Merge branch 'skbuff-micro-optimize-flow-dissection'

    Alexander Lobakin says:
    
    ====================
    skbuff: micro-optimize flow dissection
    
    This little number makes all of the flow dissection functions take
    raw input data pointer as const (1-5) and shuffles the branches in
    __skb_header_pointer() according to their hit probability.
    
    The result is +20 Mbps per flow/core with one Flow Dissector pass
    per packet. This affects RPS (with software hashing), drivers that
    use eth_get_headlen() on their Rx path and so on.
    
    From v2 [1]:
     - reword some commit messages as a potential fix for NIPA;
     - no functional changes.
    
    From v1 [0]:
     - rebase on top of the latest net-next. This was super-weird, but
       I double-checked that the series applies with no conflicts, and
       then on Patchwork it didn't;
     - no other changes.
    
    [0] https://lore.kernel.org/netdev/20210312194538.337504-1-alobakin@pm.me
    [1] https://lore.kernel.org/netdev/20210313113645.5949-1-alobakin@pm.me
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Mar 14, 2021
  14. skbuff: micro-optimize {,__}skb_header_pointer()

    {,__}skb_header_pointer() helpers exist mainly for preventing
    accesses-beyond-end of the linear data.
    In the vast majorify of cases, they bail out on the first condition.
    All code going after is mostly a fallback.
    Mark the most common branch as 'likely' one to move it in-line.
    Also, skb_copy_bits() can return negative values only when the input
    arguments are invalid, e.g. offset is greater than skb->len. It can
    be safely marked as 'unlikely' branch, assuming that hotpath code
    provides sane input to not fail here.
    
    These two bump the throughput with a single Flow Dissector pass on
    every packet (e.g. with RPS or driver that uses eth_get_headlen())
    on 20 Mbps per flow/core.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  15. ethernet: constify eth_get_headlen()'s data argument

    It's used only for flow dissection, which now takes constant data
    pointers.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  16. linux/etherdevice.h: misc trailing whitespace cleanup

    Caught by the text editor. Fix it separately from the actual changes.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  17. flow_dissector: constify raw input data argument

    Flow Dissector code never modifies the input buffer, neither skb nor
    raw data.
    Make 'data' argument const for all of the Flow dissector's functions.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  18. skbuff: make __skb_header_pointer()'s data argument const

    The function never modifies the input buffer, so 'data' argument
    can be marked as const.
    This implies one harmless cast-away.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  19. flow_dissector: constify bpf_flow_dissector's data pointers

    BPF Flow dissection programs are read-only and don't touch input
    buffers.
    Mark 'data' and 'data_end' in struct bpf_flow_dissector as const
    in preparation for global input constifying.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  20. Merge branch 'gro-micro-optimize-dev_gro_receive'

    Alexander Lobakin says:
    
    ====================
    gro: micro-optimize dev_gro_receive()
    
    This random series addresses some of suboptimal constructions used
    in the main GRO entry point.
    The main body is gro_list_prepare() simplification and pointer usage
    optimization in dev_gro_receive() itself. Being mostly cosmetic, it
    gives like +10 Mbps on my setup to both TCP and UDP (both single- and
    multi-flow).
    
    Since v1 [0]:
     - drop the replacement of bucket index calculation with
       reciprocal_scale() since it makes absolutely no sense (Eric);
     - improve stack usage in dev_gro_receive() (Eric);
     - reverse the order of patches to avoid changes superseding.
    
    [0] https://lore.kernel.org/netdev/20210312162127.239795-1-alobakin@pm.me
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Mar 14, 2021
  21. gro: give 'hash' variable in dev_gro_receive() a less confusing name

    'hash' stores not the flow hash, but the index of the GRO bucket
    corresponding to it.
    Change its name to 'bucket' to avoid confusion while reading lines
    like '__set_bit(hash, &napi->gro_bitmask)'.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  22. gro: consistentify napi->gro_hash[x] access in dev_gro_receive()

    GRO bucket index doesn't change through the entire function.
    Store a pointer to the corresponding bucket instead of its member
    and use it consistently through the function.
    It is performance-safe since &gro_list->list == gro_list.
    
    Misc: remove superfluous braces around single-line branches.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  23. gro: simplify gro_list_prepare()

    gro_list_prepare() always returns &napi->gro_hash[bucket].list,
    without any variations. Moreover, it uses 'napi' argument only to
    have access to this list, and calculates the bucket index for the
    second time (firstly it happens at the beginning of
    dev_gro_receive()) to do that.
    Given that dev_gro_receive() already has an index to the needed
    list, just pass it as the first argument to eliminate redundant
    calculations, and make gro_list_prepare() return void.
    Also, both arguments of gro_list_prepare() can be constified since
    this function can only modify the skbs from the bucket list.
    
    Signed-off-by: Alexander Lobakin <alobakin@pm.me>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    solbjorn authored and davem330 committed Mar 14, 2021
  24. net: dsa: bcm_sf2: Fill in BCM4908 CFP entries

    The BCM4908 switch has 256 CFP entrie, update that setting so CFP can be
    used.
    
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    ffainelli authored and davem330 committed Mar 14, 2021
  25. hv_netvsc: Add a comment clarifying batching logic

    The batching logic in netvsc_send is non-trivial, due to
    a combination of the Linux API and the underlying hypervisor
    interface. Add a comment explaining why the code is written this
    way.
    
    Signed-off-by: Shachar Raindel <shacharr@microsoft.com>
    Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
    Reviewed-by: Dexuan Cui <decui@microsoft.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    shacharr-microsoft authored and davem330 committed Mar 14, 2021
  26. Merge branch 'pktgen-scripts-improvements'

    Igor Russkikh says:
    
    ====================
    pktgen: scripts improvements
    
    Please consider small improvements to pktgen scripts we use in our environment.
    
    Adding delay parameter through command line,
    Adding new -a (append) parameter to make flex runs
    
    v3: change us to ns in docs
    v2: Review comments from Jesper
    
    CC: Jesper Dangaard Brouer <brouer@redhat.com>
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Mar 14, 2021
  27. samples: pktgen: new append mode

    To configure various complex flows we for sure can create custom
    pktgen init scripts, but sometimes thats not that easy.
    
    New "-a" (append) option in all the existing sample scripts allows
    to append more "devices" into pktgen threads.
    
    The most straightforward usecases for that are:
    - using multiple devices. We have to generate full linerate on
    all physical functions (ports) of our multiport device.
    - pushing multiple flows (with different packet options)
    
    Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    cail authored and davem330 committed Mar 14, 2021
Older