Skip to content
Permalink
Jakub-Kicinski…
Switch branches/tags

Commits on Oct 13, 2021

  1. ethernet: replace netdev->dev_addr 16bit writes

    Commit 406f42f ("net-next: When a bond have a massive amount
    of VLANs...") introduced a rbtree for faster Ethernet address look
    up. To maintain netdev->dev_addr in this tree we need to make all
    the writes to it got through appropriate helpers.
    
    This patch takes care of drivers which cast netdev->dev_addr to
    a 16bit type, often with an explicit byte order.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  2. ethernet: replace netdev->dev_addr assignment loops

    A handful of drivers contains loops assigning the mac
    addr byte by byte. Convert those to eth_hw_addr_set().
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  3. ethernet: ibm/emac: use of_get_ethdev_address() to load dev_addr

    A straggler I somehow missed in the automated conversion in
    commit 9ca01b2 ("ethernet: use of_get_ethdev_address()").
    Use the new helper instead of using netdev->dev_addr directly.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  4. ethernet: manually convert memcpy(dev_addr,..., sizeof(addr))

    A handful of drivers use sizeof(addr) for the size of
    the address, after manually confirming the size is
    indeed 6 convert them to eth_hw_addr_set().
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  5. ethernet: make use of eth_hw_addr_random() where appropriate

    Number of drivers use eth_random_addr(netdev->dev_addr)
    thus writing to netdev->dev_addr directly, and not setting
    the address type. Switch them to eth_hw_addr_random().
    
      @@
      expression netdev;
      @@
      - eth_random_addr(netdev->dev_addr);
      + eth_hw_addr_random(netdev);
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  6. ethernet: make eth_hw_addr_random() use dev_addr_set()

    Commit 406f42f ("net-next: When a bond have a massive amount
    of VLANs...") introduced a rbtree for faster Ethernet address look
    up. To maintain netdev->dev_addr in this tree we need to make all
    the writes to it got through appropriate helpers.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  7. ethernet: constify references to netdev->dev_addr in drivers

    This big patch sprinkles const on local variables and
    function arguments which may refer to netdev->dev_addr.
    
    Commit 406f42f ("net-next: When a bond have a massive amount
    of VLANs...") introduced a rbtree for faster Ethernet address look
    up. To maintain netdev->dev_addr in this tree we need to make all
    the writes to it got through appropriate helpers.
    
    Some of the changes here are not strictly required - const
    is sometimes cast off but pointer is not used for writing.
    It seems like it's still better to add the const in case
    the code changes later or relevant -W flags get enabled
    for the build.
    
    No functional changes.
    
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski authored and intel-lab-lkp committed Oct 13, 2021
  8. Merge branch 'add-functional-support-for-gigabit-ethernet-driver'

    Biju Das says:
    
    ====================
    Add functional support for Gigabit Ethernet driver
    
    The DMAC and EMAC blocks of Gigabit Ethernet IP found on RZ/G2L SoC are
    similar to the R-Car Ethernet AVB IP.
    
    The Gigabit Ethernet IP consists of Ethernet controller (E-MAC), Internal
    TCP/IP Offload Engine (TOE)  and Dedicated Direct memory access controller
    (DMAC).
    
    With a few changes in the driver we can support both IPs.
    
    This patch series is aims to add functional support for Gigabit Ethernet
    driver by filling all the stubs except set_features.
    
    set_feature patch will send as separate RFC patch along with rx_checksum
    patch, as it needs further discussion related to HW checksum.
    
    With this series, we can do boot kernel with rootFS mounted on NFS on
    RZ/G2L platforms.
    ====================
    
    Link: https://lore.kernel.org/r/20211012163613.30030-1-biju.das.jz@bp.renesas.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Oct 13, 2021
  9. ravb: Fix typo AVB->DMAC

    Fix the typo AVB->DMAC in comment, as the code following the comment
    is for DMAC on Gigabit Ethernet IP.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  10. ravb: Update ravb_emac_init_gbeth()

    This patch enables Receive/Transmit port of TOE and removes
    the setting of promiscuous bit from EMAC configuration mode register.
    
    This patch also update EMAC configuration mode comment from
    "PAUSE prohibition" to "EMAC Mode: PAUSE prohibition; Duplex; TX;
    RX; CRC Pass Through".
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  11. ravb: Document PFRI register bit

    Document PFRI register bit, as it is documented on R-Car Gen3 and
    RZ/G2L hardware manuals.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  12. ravb: Rename "nc_queue" feature bit

    Rename the feature bit "nc_queue" with "nc_queues" as AVB DMAC has
    RX and TX NC queues.
    
    There is no functional change.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  13. ravb: Optimize ravb_emac_init_gbeth function

    Optimize CXR31 register initialization on ravb_emac_init_gbeth
    function.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  14. ravb: Rename "tsrq" variable

    Rename the variable "tsrq" with "tccr_mask" as we are passing
    TCCR mask to the ravb_wait() function.
    
    There is no functional change.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  15. ravb: Add support to retrieve stats for GbEthernet

    Add support for retrieving stats information for GbEthernet.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  16. ravb: Add carrier_counters to struct ravb_hw_info

    RZ/G2L E-MAC supports carrier counters.
    Add a carrier_counter hw feature bit to struct ravb_hw_info
    to add this feature only for RZ/G2L.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  17. ravb: Fillup ravb_rx_gbeth() stub

    Fillup ravb_rx_gbeth() function to support RZ/G2L.
    
    This patch also renames ravb_rcar_rx to ravb_rx_rcar to be
    consistent with the naming convention used in sh_eth driver.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  18. ravb: Fillup ravb_rx_ring_format_gbeth() stub

    Fillup ravb_rx_ring_format_gbeth() function to support RZ/G2L.
    
    This patch also renames ravb_rx_ring_format to ravb_rx_ring_format_rcar
    to be consistent with the naming convention used in sh_eth driver.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  19. ravb: Fillup ravb_rx_ring_free_gbeth() stub

    Fillup ravb_rx_ring_free_gbeth() function to support RZ/G2L.
    
    This patch also renames ravb_rx_ring_free to ravb_rx_ring_free_rcar
    to be consistent with the naming convention used in sh_eth driver.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  20. ravb: Fillup ravb_alloc_rx_desc_gbeth() stub

    Fillup ravb_alloc_rx_desc_gbeth() function to support RZ/G2L.
    
    This patch also renames ravb_alloc_rx_desc to ravb_alloc_rx_desc_rcar
    to be consistent with the naming convention used in sh_eth driver.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  21. ravb: Add rx_max_buf_size to struct ravb_hw_info

    R-Car AVB-DMAC has maximum 2K size on RX buffer, whereas on RZ/G2L
    it is 8K. We need to allow for changing the MTU within the limit
    of the maximum size of a descriptor.
    
    Add a rx_max_buf_size variable to struct ravb_hw_info to handle
    this difference.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  22. ravb: Use ALIGN macro for max_rx_len

    Use ALIGN macro for calculating the value for max_rx_len.
    
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Suggested-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Biju Das authored and Jakub Kicinski committed Oct 13, 2021
  23. net: qed_debug: fix check of false (grc_param < 0) expression

    The type of enum dbg_grc_params has the enumerator list starting from 0.
    When grc_param is declared by enum dbg_grc_params, (grc_param < 0) is
    always false.  We should remove the check of this expression.
    
    Signed-off-by: Jean Sacren <sakiwit@gmail.com>
    Acked-by: Shai Malin <smalin@marvell.com>
    Link: https://lore.kernel.org/r/20211012074645.12864-1-sakiwit@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    sacren authored and Jakub Kicinski committed Oct 13, 2021
  24. net: enetc: include ip6_checksum.h for csum_ipv6_magic

    For those architectures which do not define_HAVE_ARCH_IPV6_CSUM, we need
    to include ip6_checksum.h which provides the csum_ipv6_magic() function.
    
    Fixes: fb8629e ("net: enetc: add support for software TSO")
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Link: https://lore.kernel.org/r/20211012121358.16641-1-ioana.ciornei@nxp.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    IoanaCiornei authored and Jakub Kicinski committed Oct 13, 2021
  25. ionic: no devlink_unregister if not registered

    Don't try to unregister the devlink if it hasn't been registered
    yet.  This bit of error cleanup code got missed in the recent
    devlink registration changes.
    
    Fixes: 7911c8b ("ionic: Move devlink registration to be last devlink command")
    Signed-off-by: Shannon Nelson <snelson@pensando.io>
    Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
    Link: https://lore.kernel.org/r/20211012231520.72582-1-snelson@pensando.io
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    emusln authored and Jakub Kicinski committed Oct 13, 2021

Commits on Oct 12, 2021

  1. Merge branch 'devlink-reload-simplification'

    Leon Romanovsky says:
    
    ====================
    devlink reload simplification
    
    Simplify devlink reload APIs.
    ====================
    
    Link: https://lore.kernel.org/r/cover.1634044267.git.leonro@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Oct 12, 2021
  2. devlink: Delete reload enable/disable interface

    Commit a0c7634 ("devlink: disallow reload operation during device
    cleanup") added devlink_reload_{enable,disable}() APIs to prevent reload
    operation from racing with device probe/dismantle.
    
    After recent changes to move devlink_register() to the end of device
    probe and devlink_unregister() to the beginning of device dismantle,
    these races can no longer happen. Reload operations will be denied if
    the devlink instance is unregistered and devlink_unregister() will block
    until all in-flight operations are done.
    
    Therefore, remove these devlink_reload_{enable,disable}() APIs.
    
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Leon Romanovsky authored and Jakub Kicinski committed Oct 12, 2021
  3. net/mlx5: Set devlink reload feature bit for supported devices only

    Mulitport slave device doesn't support devlink reload, so instead of
    complicating initialization flow with devlink_reload_enable() which
    will be removed in next patch, don't set DEVLINK_F_RELOAD feature bit
    for such devices.
    
    This fixes an error when reload counters exposed (and equal zero) for
    the mode that is not supported at all.
    
    Fixes: d89ddaa ("net/mlx5: Disable devlink reload for multi port slave device")
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Leon Romanovsky authored and Jakub Kicinski committed Oct 12, 2021
  4. devlink: Allow control devlink ops behavior through feature mask

    Introduce new devlink call to set feature mask to control devlink
    behavior during device initialization phase after devlink_alloc()
    is already called.
    
    This allows us to set reload ops based on device property which
    is not known at the beginning of driver initialization.
    
    For the sake of simplicity, this API lacks any type of locking and
    needs to be called before devlink_register() to make sure that no
    parallel access to the ops is possible at this stage.
    
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Leon Romanovsky authored and Jakub Kicinski committed Oct 12, 2021
  5. devlink: Annotate devlink API calls

    Initial annotation patch to separate calls that needs to be executed
    before or after devlink_register().
    
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Leon Romanovsky authored and Jakub Kicinski committed Oct 12, 2021
  6. devlink: Move netdev_to_devlink helpers to devlink.c

    Both netdev_to_devlink and netdev_to_devlink_port are used in devlink.c
    only, so move them in order to reduce their scope.
    
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Leon Romanovsky authored and Jakub Kicinski committed Oct 12, 2021
  7. devlink: Reduce struct devlink exposure

    The declaration of struct devlink in general header provokes the
    situation where internal fields can be accidentally used by the driver
    authors. In order to reduce such possible situations, let's reduce the
    namespace exposure of struct devlink.
    
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Leon Romanovsky authored and Jakub Kicinski committed Oct 12, 2021
  8. ethernet: tulip: avoid duplicate variable name on sparc

    I recently added a variable called addr to tulip_init_one()
    but for sparc there's already a variable called that half
    way thru the function. Rename it to fix build.
    
    Fixes: ca87931 ("ethernet: tulip: remove direct netdev->dev_addr writes")
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 12, 2021
  9. net: hns3: debugfs add support dumping page pool info

    Add a file node "page_pool_info" for debugfs, then cat this
    file node to dump page pool info as below:
    
    QUEUE_ID  ALLOCATE_CNT  FREE_CNT      POOL_SIZE(PAGE_NUM)  ORDER  NUMA_ID  MAX_LEN
    0         512           0             512                  0      2        4K
    1         512           0             512                  0      2        4K
    2         512           0             512                  0      2        4K
    3         512           0             512                  0      2        4K
    4         512           0             512                  0      2        4K
    
    Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
    Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Hao Chen authored and davem330 committed Oct 12, 2021
  10. tulip: fix setting device address from rom

    I missed removing i from the array index when converting
    from a loop to a direct copy.
    
    Fixes: ca87931 ("ethernet: tulip: remove direct netdev->dev_addr writes")
    Reported-by: Joe Perches <joe@perches.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jakub Kicinski authored and davem330 committed Oct 12, 2021
Older