1. 13 7月, 2018 8 次提交
  2. 30 6月, 2018 2 次提交
  3. 04 6月, 2018 1 次提交
  4. 01 6月, 2018 1 次提交
    • M
      net: mvpp2: Split the PPv2 driver to a dedicated directory · db9d7d36
      Maxime Chevallier 提交于
      As the mvpp2 driver is growing, move this driver to a dedicated
      directory and split it into several files.
      
      Since this driver has a lot of register defines and structure
      definitions, it can benefit from having all of this into a dedicated
      header file, named mvpp2.h.
      
      A good chunk of the mvpp2 code is dedicated to Header Parser handling, so
      we introduce mvpp2_prs.h where all Header Parser definitions are located,
      and mvpp2_prs.c containing the related code.
      
      In the same way, mvpp2_cls.h and mvpp2_cls.c are created to contain
      Classifier and RSS related code.
      
      The former 'mvpp2.c' file is renamed 'mvpp2_main.c' so that we can keep
      the driver binary named 'mvpp2'.
      
      This commit is only about spliting the driver into multiple files and
      doesn't introduce any new function, feature or fix besides removing
      'static' keywords when needed.
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Tested-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db9d7d36
  5. 20 5月, 2018 1 次提交
  6. 19 5月, 2018 1 次提交
  7. 18 5月, 2018 7 次提交
  8. 27 4月, 2018 2 次提交
  9. 20 4月, 2018 1 次提交
  10. 16 4月, 2018 1 次提交
    • M
      net: mvpp2: Fix TCAM filter reserved range · 982e0500
      Maxime Chevallier 提交于
      Marvell's PPv2 controller has a Packet Header parser, which uses a
      fixed-size TCAM array of filter entries.
      
      The mvpp2 driver reserves some ranges among the 256 TCAM entries to
      perform MAC and VID filtering. The rest of the TCAM ids are freely usable
      for other features, such as IPv4 proto matching.
      
      This commit fixes the MVPP2_PE_LAST_FREE_TID define that sets the end of
      the "free range", which included the MAC range. This could therefore allow
      some other features to use entries dedicated to MAC filtering,
      lowering the number of unicast/multicast addresses that could be allowed
      before switching to promiscuous mode.
      
      Fixes: 10fea26c ("net: mvpp2: Add support for unicast filtering")
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      982e0500
  11. 06 4月, 2018 1 次提交
  12. 28 3月, 2018 1 次提交
  13. 27 3月, 2018 2 次提交
    • M
      net: mvpp2: Don't use dynamic allocs for local variables · 0c6d9b44
      Maxime Chevallier 提交于
      Some helper functions that search for given entries in the TCAM filter
      on PPv2 controller make use of dynamically alloced temporary variables,
      allocated with GFP_KERNEL. These functions can be called in atomic
      context, and dynamic alloc is not really needed in these cases anyways.
      
      This commit gets rid of dynamic allocs and use stack allocation in the
      following functions, and where they're used :
       - mvpp2_prs_flow_find
       - mvpp2_prs_vlan_find
       - mvpp2_prs_double_vlan_find
       - mvpp2_prs_mac_da_range_find
      
      For all these functions, instead of returning an temporary object
      representing the TCAM entry, we simply return the TCAM id that matches
      the requested entry.
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c6d9b44
    • M
      net: mvpp2: Make mvpp2_prs_hw_read a parser entry init function · 47e0e14e
      Maxime Chevallier 提交于
      The mvpp2_prs_hw_read function uses the 'index' field of the struct
      mvpp2_prs_entry to initialize the rest of the fields. This makes it
      unclear from a caller's perspective, who needs to manipulate a struct
      that is not entirely initialized.
      
      This commit makes it an init function for prs_entry, by passing it the
      index as a parameter. The function now zeroes the entry, and sets the
      index field before doing all other init from HW.
      
      The function is renamed 'mvpp2_prs_init_from_hw' to make that clear.
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47e0e14e
  14. 23 3月, 2018 1 次提交
  15. 08 3月, 2018 3 次提交
  16. 06 3月, 2018 5 次提交
  17. 01 3月, 2018 1 次提交
    • M
      net: mvpp2: Add hardware offloading for VLAN filtering · 56beda3d
      Maxime Chevallier 提交于
      Marvell PPv2 controller allows for generic packet filtering. This commit
      adds entries to implement VLAN filtering. The approach taken is :
      
       - Filter entries that would match on the presence of the VLAN tag
         (existing VLAN detection, DSA / EDSA detection) will set the next
         lookup ID to be for the VID.
      
       - For each VLAN existing on a given port, we add an entry that matches
         this specific VID. If the incoming packet matches the VID entry, it is
         set for the next lookup in the chain (LU_L2).
      
       - A Guard entry is added for each port, that will match if the incoming
         packet didn't match any of the above VID entries. This entry tags the
         packet to be dropped.
      
      Due to this design, and the fact that the total 256 filter entries are
      also used for other purposes, we have a limit of 10 VLANs per port. To
      accommodate the case where we would need more VLANS on one port, this
      patch implements the ndo_set_features to allow for disabling of VLAN
      filtering using ethtool.
      
      The default config has VLAN filtering disabled.
      Signed-off-by: NMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56beda3d
  18. 12 2月, 2018 1 次提交
    • M
      mvpp2: fix multicast address filter · 7ac8ff95
      Mikulas Patocka 提交于
      IPv6 doesn't work on the MacchiatoBIN board. It is caused by broken
      multicast address filter in the mvpp2 driver.
      
      The driver loads doesn't load any multicast entries if "allmulti" is not
      set. This condition should be reversed.
      
      The condition !netdev_mc_empty(dev) is useless (because
      netdev_for_each_mc_addr is nop if the list is empty).
      
      This patch also fixes a possible overflow of the multicast list - if
      mvpp2_prs_mac_da_accept fails, we set the allmulti flag and retry.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ac8ff95