1. 08 Dec, 2022 35 commits
  2. 07 Dec, 2022 5 commits
    • Paolo Abeni's avatar
      Merge branch 'cn10kb-mac-block-support' · a2220b54
      Paolo Abeni authored
      Hariprasad Kelam says:
      
      ====================
      CN10KB MAC block support
      
      OcteonTx2's next gen platform the CN10KB has RPM_USX MAC which has a
      different serdes when compared to RPM MAC. Though the underlying
      HW is different, the CSR interface has been designed largely inline
      with RPM MAC, with few exceptions though. So we are using the same
      CGX driver for RPM_USX MAC as well and will have a different set of APIs
      for RPM_USX where ever necessary.
      
      The RPM and RPM_USX blocks support a different number of LMACS.
      RPM_USX support 8 LMACS per MAC block whereas legacy RPM supports only 4
      LMACS per MAC. with this RPM_USX support double the number of DMAC filters
      and fifo size.
      
      This patchset adds initial support for CN10KB's RPM_USX  MAC i.e
      registering the driver and defining MAC operations (mac_ops). With these
      changes PF and VF netdev packet path will work and PF and VF netdev drivers
      are able to configure MAC features like pause frames,PFC and loopback etc.
      
      Also implements FEC stats for CN10K Mac block RPM and CN10KB Mac block
      RPM_USX and extends ethtool support for PF and VF drivers by defining
      get_fec_stats API to display FEC stats.
      ====================
      
      Link: https://lore.kernel.org/r/20221205070521.21860-1-hkelam@marvell.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      a2220b54
    • Hariprasad Kelam's avatar
      octeontx2-af: Add FEC stats for RPM/RPM_USX block · 84ad3642
      Hariprasad Kelam authored
      CN10K silicon MAC block RPM and CN10KB silicon MAC block RPM_USX
      both support BASER and RSFEC modes.
      
      Also MAC (CGX) on OcteonTx2 silicon variants and MAC (RPM) on
      OcteonTx3 CN10K are different and FEC stats need to be read
      differently. CN10KB MAC block (RPM_USX) fec csr offsets are same
      as CN10K MAC block (RPM) mac_ops points to same fn(). Upper layer
      interface between  RVU AF and PF netdev is  kept same. Based on
      silicon variant appropriate fn() pointer is called to  read FEC stats
      Signed-off-by: default avatarHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      84ad3642
    • Hariprasad Kelam's avatar
      octeontx2-pf: ethtool: Implement get_fec_stats · b441c4ac
      Hariprasad Kelam authored
      This patch registers a callback for get_fec_stats such that
      FEC stats can be queried from the below command
      
      "ethtool -I --show-fec eth0"
      Signed-off-by: default avatarHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b441c4ac
    • Hariprasad Kelam's avatar
      octeontx2-af: cn10kb: Add RPM_USX MAC support · b9d0fedc
      Hariprasad Kelam authored
      OcteonTx2's next gen platform the CN10KB has RPM_USX MAC which has a
      different serdes when compared to RPM MAC. Though the underlying
      HW is different, the CSR interface has been designed largely inline
      with RPM MAC, with few exceptions though. So we are using the same
      CGX driver for RPM_USX MAC as well and will have a different set of APIs
      for RPM_USX where ever necessary.
      
      The RPM and RPM_USX blocks support a different number of LMACS.
      RPM_USX support 8 LMACS per MAC block whereas legacy RPM supports only 4
      LMACS per MAC. with this RPM_USX support double the number of DMAC filters
      and fifo size.
      
      This patch adds initial support for CN10KB's RPM_USX  MAC i.e registering
      the driver and defining MAC operations (mac_ops). Adds the logic to
      configure internal loopback and pause frames and assign FIFO length to
      LMACS.
      
      Kernel reads lmac features like lmac type, autoneg, etc from shared
      firmware data this structure only supports 4 lmacs per MAC, this patch
      extends this structure to accommodate 8 lmacs.
      Signed-off-by: default avatarHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b9d0fedc
    • Rakesh Babu Saladi's avatar
      octeontx2-af: Support variable number of lmacs · f2e664ad
      Rakesh Babu Saladi authored
      Most of the code in CGX/RPM driver assumes that max lmacs per
      given MAC as always, 4 and the number of MAC blocks also as 4.
      With this assumption, the max number of interfaces supported is
      hardcoded to 16. This creates a problem as next gen CN10KB silicon
      MAC supports 8 lmacs per MAC block.
      
      This patch solves the problem by using "max lmac per MAC block"
      value from constant csrs and uses cgx_cnt_max value which is
      populated based number of MAC blocks supported by silicon.
      Signed-off-by: default avatarRakesh Babu Saladi <rsaladi2@marvell.com>
      Signed-off-by: default avatarHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      f2e664ad