1. 14 Sep, 2024 36 commits
  2. 13 Sep, 2024 4 commits
    • Mina Almasry's avatar
      memory-provider: disable building dmabuf mp on !CONFIG_PAGE_POOL · 26d74602
      Mina Almasry authored
      When CONFIG_TRACEPOINTS=y but CONFIG_PAGE_POOL=n, we end up with this
      build failure that is reported by the 0-day bot:
      
      ld: vmlinux.o: in function `mp_dmabuf_devmem_alloc_netmems':
      >> (.text+0xc37286): undefined reference to `__tracepoint_page_pool_state_hold'
      >> ld: (.text+0xc3729a): undefined reference to `__SCT__tp_func_page_pool_state_hold'
      >> ld: vmlinux.o:(__jump_table+0x10c48): undefined reference to `__tracepoint_page_pool_state_hold'
      >> ld: vmlinux.o:(.static_call_sites+0xb824): undefined reference to `__SCK__tp_func_page_pool_state_hold'
      
      The root cause is that in this configuration, traces are enabled but the
      page_pool specific trace_page_pool_state_hold is not registered.
      
      There is no reason to build the dmabuf memory provider when
      CONFIG_PAGE_POOL is not present, as it's really a provider to the
      page_pool.
      
      In fact the whole NET_DEVMEM is RX path-only at the moment, so we can
      make the entire config dependent on the PAGE_POOL.
      
      Note that this may need to be revisited after/while devmem TX is
      added,  as devmem TX likely does not need CONFIG_PAGE_POOL. For now this
      build fix is sufficient.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202409131239.ysHQh4Tv-lkp@intel.com/Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Tested-by: Simon Horman <horms@kernel.org> # build-tested
      Link: https://patch.msgid.link/20240913060746.2574191-1-almasrymina@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      26d74602
    • David S. Miller's avatar
      Merge branch 'am65-cpsw-rx-mq' · bdf2ba15
      David S. Miller authored
      Roger Quadros says:
      
      ====================
      net: ethernet: ti: am65-cpsw: Add multi queue RX support
      
      am65-cpsw can support up to 8 queues at Rx. So far we have
      been using only one queue (i.e. default flow) for all RX traffic.
      
      This series adds multi-queue support. The driver starts with
      1 RX queue by default. User can increase the RX queues via ethtool,
      e.g. 'ethtool -L ethx rx <N>'
      
      The series also adds regmap and regfield support to some of the
      ALE registers. It adds Policer/Classifier registers and fields.
      
      Converting the existing ALE control APIs to regfields can be a separate
      exercise.
      
      Some helper functions are added to read/write to the Policer/Classifier
      registers and a default Classifier setup function is added that
      routes packets based on their PCP/DSCP priority to different RX queues.
      Signed-off-by: default avatarRoger Quadros <rogerq@kernel.org>
      ---
      Changes in v4:
      - Use single macro AM65_CPSW_MAX_QUEUES for both TX and RX queues
        to simplify code
      - reuse am65_cpsw_get/set_per_queue_coalesce for am65_cpsw_get/set_coalesce.
      - return -EINVAL if unsupported tx/rx_coalesce_usecs in
        am65_cpsw_set_coalesce.
      - reverse Xmas tree declaration order fixes in cpsw_ale
      - Link to v3: https://lore.kernel.org/r/20240703-am65-cpsw-multi-rx-v3-0-f11cd860fd72@kernel.org
      
      Changes in v3:
      - code style fixes
      - squashed patches 5 and 6
      - added comment about priority to thread mapping table.
      - Added Reviewed-by Simon Horman.
      - Link to v2: https://lore.kernel.org/r/20240628-am65-cpsw-multi-rx-v2-0-c399cb77db56@kernel.org
      
      Changes in v2:
      - rebase to net/next
      - fixed RX stall issue during iperf
      - Link to v1: https://lore.kernel.org/r/20240606-am65-cpsw-multi-rx-v1-0-0704b0cb6fdc@kernel.org
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bdf2ba15
    • Roger Quadros's avatar
      net: ethernet: ti: am65-cpsw: setup priority to flow mapping · b7468c0f
      Roger Quadros authored
      Now that we support multiple RX queues, enable default priority
      to flow mapping so that higher priority packets come on higher
      channels (flows).
      
      The Classifier checks for PCP/DSCP priority in the packet and
      routes them to the appropriate flow.
      Signed-off-by: default avatarRoger Quadros <rogerq@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b7468c0f
    • Roger Quadros's avatar
      net: ethernet: ti: cpsw_ale: add policer/classifier helpers and setup defaults · 961d4187
      Roger Quadros authored
      The Policer registers in the ALE register space are just shadow registers
      and use an index field in the policer table control register to read/write
      to the actual Polier registers.
      Add helper functions to Read and Write to Policer registers.
      
      Also add a helper function to set the thread value to classifier/policer
      mapping. Any packet that first matches the classifier will be sent to the
      thread (flow) that is set in the classifier to thread mapping table.
      If not set then it goes to the default flow.
      
      Default behaviour is to have 8 classifiers to map 8 DSCP/PCP
      priorities to N receive threads (flows). N depends on number of
      RX channels enabled for the port.
      As per the standard [1] User prioritie 1 (Background) and 2 (Spare) have
      lower priority than the user priority 0 (default). User priority 1 being
      of the lowest priority.
      
      [1] IEEE802.1D-2004, IEEE Standard for Local and metropolitan area networks
      Table G-2 - Traffic type acronyms
      Table G-3 - Defining traffic types
      Signed-off-by: default avatarRoger Quadros <rogerq@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      961d4187