1. 02 7月, 2021 1 次提交
    • H
      octeontx2-af: cn10k: Setting up lmtst map table · 873a1e3d
      Harman Kalra 提交于
      Introducing a new mailbox to support updating lmt entries
      and common lmt base address scheme i.e. multiple pcifuncs
      can share lmt region to reduce L1 cache pressure for application.
      Parameters passed to mailbox includes the primary pcifunc
      value whose lmt regions will be shared by other secondary
      pcifuncs. Here secondary pcifunc will be the one who is
      calling the mailbox.
      For example:
      By default each pcifunc has its own LMT base address:
              PCIFUNC1    LMT_BASE_ADDR A
              PCIFUNC2    LMT_BASE_ADDR B
              PCIFUNC3    LMT_BASE_ADDR C
              PCIFUNC4    LMT_BASE_ADDR D
      Application will choose PCIFUNC1 as base/primary pcifunc
      and as and when other pcifunc(secondary pcifuncs) gets
      probed, this mailbox will be called and LMTST table will
      be updated as:
              PCIFUNC1    LMT_BASE_ADDR A
              PCIFUNC2    LMT_BASE_ADDR A
              PCIFUNC3    LMT_BASE_ADDR A
              PCIFUNC4    LMT_BASE_ADDR A
      
      On FLR lmtst map table gets resetted to the default lmt
      base addresses for all secondary pcifuncs.
      Signed-off-by: NHarman Kalra <hkalra@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>
      873a1e3d
  2. 23 6月, 2021 1 次提交
    • K
      octeontx2-af: Avoid field-overflowing memcpy() · ee8e7622
      Kees Cook 提交于
      In preparation for FORTIFY_SOURCE performing compile-time and run-time
      field bounds checking for memcpy(), memmove(), and memset(), avoid
      intentionally writing across neighboring fields.
      
      To avoid having memcpy() think a u64 "prof" is being written beyond,
      adjust the prof member type by adding struct nix_bandprof_s to the union
      to match the other structs. This silences the following future warning:
      
      In file included from ./include/linux/string.h:253,
                       from ./include/linux/bitmap.h:10,
                       from ./include/linux/cpumask.h:12,
                       from ./arch/x86/include/asm/cpumask.h:5,
                       from ./arch/x86/include/asm/msr.h:11,
                       from ./arch/x86/include/asm/processor.h:22,
                       from ./arch/x86/include/asm/timex.h:5,
                       from ./include/linux/timex.h:65,
                       from ./include/linux/time32.h:13,
                       from ./include/linux/time.h:60,
                       from ./include/linux/stat.h:19,
                       from ./include/linux/module.h:13,
                       from drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:11:
      In function '__fortify_memcpy_chk',
          inlined from '__fortify_memcpy' at ./include/linux/fortify-string.h:310:2,
          inlined from 'rvu_nix_blk_aq_enq_inst' at drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:910:5:
      ./include/linux/fortify-string.h:268:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); please use struct_group() [-Wattribute-warning]
        268 |    __write_overflow_field();
            |    ^~~~~~~~~~~~~~~~~~~~~~~~
      
      drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:
      ...
                              else if (req->ctype == NIX_AQ_CTYPE_BANDPROF)
                                      memcpy(&rsp->prof, ctx,
                                             sizeof(struct nix_bandprof_s));
      ...
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Tested-by: Subbaraya Sundeep<sbhatta@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee8e7622
  3. 19 6月, 2021 1 次提交
  4. 16 6月, 2021 6 次提交
  5. 15 6月, 2021 1 次提交
    • S
      octeontx2-pf: Cleanup flow rule management · 9917060f
      Sunil Goutham 提交于
      Current MCAM allocation scheme allocates a single lot of
      MCAM entries for ntuple filters, unicast filters and VF VLAN
      rules. This patch attempts to cleanup this logic by segregating
      MCAM rule allocation and management for Ntuple rules and unicast,
      VF VLAN rules. This segregation will result in reusing most of
      the logic for supporting ntuple filters for VF devices.
      
      Also added debug messages for MCAM entry allocation failures.
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9917060f
  6. 12 6月, 2021 4 次提交
  7. 02 6月, 2021 1 次提交
  8. 31 5月, 2021 1 次提交
  9. 30 5月, 2021 5 次提交
  10. 13 5月, 2021 1 次提交
  11. 22 4月, 2021 3 次提交
  12. 25 3月, 2021 3 次提交
  13. 20 3月, 2021 2 次提交
  14. 19 3月, 2021 10 次提交