1. 16 7月, 2018 2 次提交
    • M
      net: mvpp2: add a debugfs interface for the Header Parser · 21da57a2
      Maxime Chevallier 提交于
      Marvell PPv2 Packer Header Parser has a TCAM based filter, that is not
      trivial to configure and debug. Being able to dump TCAM entries from
      userspace can be really helpful to help development of new features
      and debug existing ones.
      
      This commit adds a basic debugfs interface for the PPv2 driver, focusing
      on TCAM related features.
      
      <mnt>/mvpp2/ --- f2000000.ethernet
                    \- f4000000.ethernet --- parser --- 000 ...
                                          |          \- 001
                                          |          \- ...
                                          |          \- 255 --- ai
                                          |                  \- header_data
                                          |                  \- lookup_id
                                          |                  \- sram
                                          |                  \- valid
                                          \- eth1 ...
                                          \- eth2 --- mac_filter
                                                   \- parser_entries
                                                   \- vid_filter
      
      There's one directory per PPv2 instance, named after pdev->name to make
      sure names are uniques. In each of these directories, there's :
      
       - one directory per interface on the controller, each containing :
      
         - "mac_filter", which lists all filtered addresses for this port
           (based on TCAM, not on the kernel's uc / mc lists)
      
         - "parser_entries", which lists the indices of all valid TCAM
            entries that have this port in their port map
      
         - "vid_filter", which lists the vids allowed on this port, based on
           TCAM
      
       - one "parser" directory (the parser is common to all ports), containing :
      
         - one directory per TCAM entry (256 of them, from 0 to 255), each
           containing :
      
           - "ai" : Contains the 1 byte Additional Info field from TCAM, and
      
           - "header_data" : Contains the 8 bytes Header Data extracted from
             the packet
      
           - "lookup_id" : Contains the 4 bits LU_ID
      
           - "sram" : contains the raw SRAM data, which is the result of the TCAM
      		lookup. This readonly at the moment.
      
           - "valid" : Indicates if the entry is valid of not.
      
      All entries are read-only, and everything is output in hex form.
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21da57a2
    • A
      net: mvpp2: switch to SPDX identifiers · f1e37e31
      Antoine Tenart 提交于
      Use the appropriate SPDX license identifiers and drop the license text.
      This patch is only cosmetic.
      Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1e37e31
  2. 15 7月, 2018 4 次提交
  3. 14 7月, 2018 5 次提交
  4. 13 7月, 2018 28 次提交
  5. 12 7月, 2018 1 次提交
    • I
      be2net: move rss_flags field in rss_info to ensure proper alignment · 28ace84b
      Ivan Vecera 提交于
      The current position of .rss_flags field in struct rss_info causes
      that fields .rsstable and .rssqueue (both 128 bytes long) crosses
      cache-line boundaries. Moving it at the end properly align all fields.
      
      Before patch:
      struct rss_info {
              u64                        rss_flags;            /*     0     8 */
              u8                         rsstable[128];        /*     8   128 */
              /* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */
              u8                         rss_queue[128];       /*   136   128 */
              /* --- cacheline 4 boundary (256 bytes) was 8 bytes ago --- */
              u8                         rss_hkey[40];         /*   264    40 */
      };
      
      After patch:
      struct rss_info {
              u8                         rsstable[128];        /*     0   128 */
              /* --- cacheline 2 boundary (128 bytes) --- */
              u8                         rss_queue[128];       /*   128   128 */
              /* --- cacheline 4 boundary (256 bytes) --- */
              u8                         rss_hkey[40];         /*   256    40 */
              u64                        rss_flags;            /*   296     8 */
      };
      Signed-off-by: NIvan Vecera <cera@cera.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28ace84b