1. 12 6月, 2021 1 次提交
    • N
      octeontx2-af: add support for multicast/promisc packet replication feature · 967db352
      Naveen Mamindlapalli 提交于
      Currently, multicast packet filtering is accomplished by installing
      MCAM rule that matches all-multicast MAC address and has its
      NPC_RX_ACTION set to unicast to PF. Similarly promisc feature is
      achieved by installing MCAM rule that matches all the traffic received
      by the channel and unicast the packets to PF. This approach only applies
      to PF and is not scalable across VFs.
      
      This patch adds support for PF/VF multicast and promisc feature by
      reserving NIX_RX_MCE_S entries from the global MCE list allocated
      during NIX block initialization. The NIX_RX_MCE_S entries create a
      linked list with a flag indicating the end of the list, and each entry
      points to a PF_FUNC (either PF or VF). When a packet NPC_RX_ACTION is
      set to MCAST, the corresponding NIX_RX_MCE_S list is traversed and the
      packet is queued to each PF_FUNC available on the list.
      
      The PF or VF driver adds the multicast/promisc packet match entry and
      updates the MCE list with correspondng PF_FUNC. When a PF or VF interface
      is disabled, the corresponding NIX_RX_MCE_S entry is removed from the
      MCE list and the MCAM entry will be disabled if the list is empty.
      Signed-off-by: NNaveen Mamindlapalli <naveenm@marvell.com>
      Signed-off-by: NSunil Kovvuri Goutham <Sunil.Goutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      967db352
  2. 30 5月, 2021 2 次提交
  3. 19 3月, 2021 1 次提交
  4. 18 3月, 2021 2 次提交
  5. 12 2月, 2021 4 次提交
    • H
      octeontx2-af: cn10K: Add MTU configuration · 6e54e1c5
      Hariprasad Kelam 提交于
      OcteonTx3 CN10K silicon supports bigger MTU when compared
      to 9216 MTU supported by OcteonTx2 silicon variants. Lookback
      interface supports upto 64K and RPM LMAC interfaces support
      upto 16K.
      
      This patch does the necessary configuration and adds support
      for PF/VF drivers to retrieve max packet size supported via mbox
      
      This patch also configures tx link credit by considering supported
      fifo size and max packet length for Octeontx3 silicon.
      
      This patch also removes platform specific name from the driver name.
      Signed-off-by: NHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e54e1c5
    • S
      octeontx2-af: cn10k: Add support for programmable channels · 242da439
      Subbaraya Sundeep 提交于
      NIX uses unique channel numbers to identify the packet sources/sinks
      like CGX,LBK and SDP. The channel numbers assigned to each block are
      hardwired in CN9xxx silicon.
      The fixed channel numbers in CN9xxx are:
      
      0x0 | a << 8 | b            - LBK(0..3)_CH(0..63)
      0x0 | a << 8                - Reserved
      0x700 | a                   - SDP_CH(0..255)
      0x800 | a << 8 | b << 4 | c - CGX(0..7)_LMAC(0..3)_CH(0..15)
      
      All the channels in the above fixed enumerator(with maximum
      number of blocks) are not required since some chips
      have less number of blocks.
      For CN10K silicon the channel numbers need to be programmed by
      software in each block with the base channel number and range of
      channels. This patch calculates and assigns the channel numbers
      to efficiently distribute the channel number range(0-4095) among
      all the blocks. The assignment is made based on the actual number of
      blocks present and also contiguously leaving no holes.
      The channel numbers remaining after the math are used as new CPT
      replay channels present in CN10K. Also since channel numbers are
      not fixed the transmit channel link number needed by AF consumers
      is calculated by AF and sent along with nix_lf_alloc mailbox response.
      Signed-off-by: NSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      242da439
    • H
      octeontx2-af: cn10k: Add RPM MAC support · 91c6945e
      Hariprasad Kelam 提交于
      OcteonTx2's next gen platform the CN10K has RPM MAC which has a
      different serdes when compared to CGX MAC. Though the underlying
      HW is different, the CSR interface has been designed largely inline
      with CGX MAC, with few exceptions though. So we are using the same
      CGX driver for RPM MAC as well and will have a different set of APIs
      for RPM where ever necessary.
      
      This patch adds initial support for CN10K's RPM MAC i.e. the driver
      registration, communication with firmware etc. For communication with
      firmware, RPM provides a different IRQ when compared to CGX.
      The CGX and RPM blocks support different features. Currently few
      features like ptp, flowcontrol and higig are not supported by RPM. This
      patch adds new mailbox message "CGX_FEATURES_GET" to get the list of
      features supported by underlying MAC.
      
      RPM has different implementations for RX/TX stats. Unlike CGX,
      bar offset of stat registers are different. This patch adds
      support to access the same and dump the values in debugfs.
      Signed-off-by: NHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: NSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91c6945e
    • S
      octeontx2-af: cn10k: Add mbox support for CN10K platform · 98c56111
      Subbaraya Sundeep 提交于
      Firmware allocates memory regions for PFs and VFs in DRAM.
      The PFs memory region is used for AF-PF and PF-VF mailbox.
      This mbox facilitates communication between AF-PF and PF-VF.
      
      On CN10K platform:
      The DRAM region allocated to PF is enumerated as PF BAR4 memory.
      PF BAR4 contains AF-PF mbox region followed by its VFs mbox region.
      AF-PF mbox region base address is configured at RVU_AF_PFX_BAR4_ADDR
      PF-VF mailbox base address is configured at
      RVU_PF(x)_VF_MBOX_ADDR = RVU_AF_PF()_BAR4_ADDR+64KB. PF access its
      mbox region via BAR4, whereas VF accesses PF-VF DRAM mailboxes via
      BAR2 indirect access.
      
      On CN9XX platform:
      Mailbox region in DRAM is divided into two parts AF-PF mbox region and
      PF-VF mbox region i.e all PFs mbox region is contiguous similarly all
      VFs.
      The base address of the AF-PF mbox region is configured at
      RVU_AF_PF_BAR4_ADDR.
      AF-PF1 mbox address can be calculated as RVU_AF_PF_BAR4_ADDR * mbox
      size.
      The base address of PF-VF mbox region for each PF is configure at
      RVU_AF_PF(0..15)_VF_BAR4_ADDR.PF access its mbox region via BAR4 and its
      VF mbox regions from RVU_PF_VF_BAR4_ADDR register, whereas VF access its
      mbox region via BAR4.
      
      This patch changes mbox initialization to support both CN9XX and CN10K
      platform.
      
      This patch also adds CN10K PTP subsystem and device IDs to ptp
      driver id table.
      Signed-off-by: NSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98c56111
  6. 11 2月, 2021 1 次提交
  7. 04 2月, 2021 2 次提交
  8. 15 12月, 2020 1 次提交
  9. 21 11月, 2020 1 次提交
    • S
      octeontx2-af: add debugfs entries for CPT block · 76638a2e
      Srujana Challa 提交于
      Add entries to debugfs at /sys/kernel/debug/octeontx2/cpt.
      
      cpt_pc: dump cpt performance HW registers.
      Usage:
      cat /sys/kernel/debug/octeontx2/cpt/cpt_pc
      
      cpt_ae_sts: show cpt asymmetric engines current state
      Usage:
      cat /sys/kernel/debug/octeontx2/cpt/cpt_ae_sts
      
      cpt_se_sts: show cpt symmetric engines current state
      Usage:
      cat /sys/kernel/debug/octeontx2/cpt/cpt_se_sts
      
      cpt_engines_info: dump cpt engine control registers.
      Usage:
      cat /sys/kernel/debug/octeontx2/cpt/cpt_engines_info
      
      cpt_lfs_info: dump cpt lfs control registers.
      Usage:
      cat /sys/kernel/debug/octeontx2/cpt/cpt_lfs_info
      
      cpt_err_info: dump cpt error registers.
      Usage:
      cat /sys/kernel/debug/octeontx2/cpt/cpt_err_info
      Signed-off-by: NSuheil Chandran <schandran@marvell.com>
      Signed-off-by: NSrujana Challa <schalla@marvell.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      76638a2e
  10. 18 11月, 2020 7 次提交
  11. 01 11月, 2020 4 次提交
  12. 01 10月, 2020 1 次提交
  13. 30 9月, 2020 1 次提交
    • S
      octeontx2-af: cleanup KPU config data · 42006910
      Stanislaw Kardach 提交于
      Refactor KPU related NPC code gathering all configuration data in a
      structured format and putting it in one place (npc_profile.h).
      This increases readability and makes it easier to extend the profile
      configuration (as opposed to jumping between multiple header and source
      files).
      
      To do this:
      * Gather all KPU profile related data into a single adapter struct.
      * Convert the built-in MKEX definition to a structured one to streamline
        the MKEX loading.
      * Convert LT default register configuration into a structure, keeping
        default protocol settings in same file where identifiers for those
        protocols are defined.
      * Add a single point for KPU profile loading, so that its source may
        change in the future once proper interfaces for loading such config
        are in place.
      Signed-off-by: NStanislaw Kardach <skardach@marvell.com>
      Acked-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42006910
  14. 25 8月, 2020 2 次提交
  15. 03 3月, 2020 1 次提交
    • L
      octeontx2-af: Optimize data retrieval from firmware · 4f4eebf2
      Linu Cherian 提交于
      For retrieving info like interface MAC addresses, packet
      parser key extraction config etc currently a command
      is sent to firmware and firmware which periodically polls
      for commands, processes these and returns the info.
      
      This is resulting in interface initialization taking lot
      of time. To optimize this a memory region is shared between
      firmware and this driver, firmware while booting puts
      static info like these into that region for driver to
      read directly without using commands.
      
      With this
      - Logic for retrieving packet parser extraction config
        via commands is removed and repalced with using the
        shared 'fwdata' structure.
      - Now RVU MSIX vector address is also retrieved from this fwdata struct
        instead of from CSR. Otherwise when kexec/kdump crash kernel loads
        CSR will have a IOVA setup by primary kernel which impacts
        RVU PF/VF's interrupts.
      - Also added a mbox handler for PF/VF interfaces to retrieve their MAC
        addresses from AF.
      Signed-off-by: NLinu Cherian <lcherian@marvell.com>
      Signed-off-by: NChristina Jacob <cjacob@marvell.com>
      Signed-off-by: NRakesh Babu <rsaladi2@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f4eebf2
  16. 20 2月, 2020 1 次提交
  17. 17 11月, 2019 1 次提交
  18. 15 11月, 2019 7 次提交