1. 27 4月, 2016 28 次提交
  2. 26 4月, 2016 12 次提交
    • D
      Merge branch 'ila-csum-neutral' · fab7b629
      David S. Miller 提交于
      Tom Herbert says:
      
      ====================
      ila: Support for checksum neutral translations
      
      This patch set updates ILA to support draft-herbert-nvo3-ila-02. The
      primary addition is support checksum neutral ILA translation.
      This allows address to be performed and still keep any transport
      layer checksums that include the addresses in their pseudo header to
      still be correct without the translator needing to parse L4.
      
      Other items are:
         - Structures for ILA addresses, identifiers, locators
         - Disallow translation on non-ILA addresses (check by
           type in identifier).
         - Change xlat (nf_input) to translates solely based
           on matching locators not identifiers (since identifiers
           are not obfuscated by checksum neutral).
         - Side effect if above is that multiple ILA domains are
           supported. Each local locator can map to a different
           SIR address (ILA domain), and each domain defines its
           own identifier space.
      
      Tested: Ran TCP_RR with 200 cnxs. ILA performance is slightly better
      than previously since we are not longer parsing L4 for checksum
      handling. I amd seeing about 1% performance overhead. Also ran
      TCP_STREAM and tested non-ILA address (type=0) are not translated.
      
      v2: Fix compilation errors
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fab7b629
    • T
      ila: add checksum neutral ILA translations · 90bfe662
      Tom Herbert 提交于
      Support checksum neutral ILA as described in the ILA draft. The low
      order 16 bits of the identifier are used to contain the checksum
      adjustment value.
      
      The csum-mode parameter is added to described checksum processing. There
      are three values:
       - adjust transport checksum (previous behavior)
       - do checksum neutral mapping
       - do nothing
      
      On output the csum-mode in the ila_params is checked and acted on. If
      mode is checksum neutral mapping then to mapping and set C-bit.
      
      On input, C-bit is checked. If it is set checksum-netural mapping is
      done (regardless of csum-mode in ila params) and C-bit will be cleared.
      If it is not set then action in csum-mode is taken.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90bfe662
    • T
      ila: xlat changes · 642c2c95
      Tom Herbert 提交于
      Change model of xlat to be used only for input where lookup is done on
      the locator part of an address (comparing to locator_match as key
      in rhashtable). This is needed for checksum neutral translation
      which obfuscates the low order 16 bits of the identifier. It also
      permits hosts to be in muliple ILA domains (each locator can map
      to a different SIR address). A check is also added to disallow
      translating non-ILA addresses (check of type in identifier).
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      642c2c95
    • T
      ila: Add struct definitions and helpers · 351596aa
      Tom Herbert 提交于
      Add structures for identifiers, locators, and an ila address which
      is composed of a locator and identifier and in6_addr can be cast to
      it. This includes a three bit type field and enums for the types defined
      in ILA I-D.
      
      In ILA lwt don't allow user to set a translation for a non-ILA
      address (type of identifier is zero meaning it is an IID). This also
      requires that the destination prefix is at least 65 bytes (64
      bit locator and first byte of identifier).
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      351596aa
    • J
      net: tsi108: use NULL for pointer-typed argument · a843311d
      Julia Lawall 提交于
      The first argument of pci_free_consistent has type struct pci_dev *, so use
      NULL instead of 0.
      
      The semantic patch that performs this transformation is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      @@
      pci_free_consistent(
      - 0
      + NULL
        , ...)
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a843311d
    • D
      Merge branch 'hns-debug-dsaf' · 218afa10
      David S. Miller 提交于
      Yisen Zhuang says:
      
      ====================
      net: hns: add support of debug dsaf device
      
      There are two kinds of dsaf device in hns, one is for service ports,
      contains crossbar in it, can work under different mode. Another is for
      debug port, only can work under single port mode. The current code only
      declares a dsaf device for both service ports and debug ports.It is not so
      readability. This patch separates it to three platform devices to make the
      code more simple and readability.
      
      The diagram of all port in one platform device(old):
                                              CPU
                                               |
                                               |        DSAF(one platform device)
          --------------------------------------------------------------      /
          |                           |                  |      |      |     /
          |                          PPE                PPE    PPE     |    /
          |                           |                  |      |      |   /
          |                           |                  |      |      |  /
          |                        crossbar              |      |      | /
          |                           |                  |      |      |/
          |    -----------------------------------       |      |      |
          |    |      |      |      |      |      |      |      |      |
          |    |      |      |      |      |      |      |      |      |
          |   MAC    MAC    MAC    MAC    MAC    MAC    MAC    MAC     |
          |    |      |      |      |      |      |      |      |      |
          --------------------------------------------------------------
               |      |      |      |      |      |      |      |
              PHY    PHY    PHY    PHY    PHY    PHY    PHY    PHY
      
      The diagram of separating ports to three platform(new):
                                                               CPU
                                                                |
                                          -----------------------------------
                                          |                     |           |
          ----------------------------------------------    ---------   ---------
          |                         |                  |    |       |   |   |   |
          |                        PPE                 |    |  PPE  |   |  PPE  |
          |                         |                  |    |   |   |   |   |   |
          |                         |                  |    |   |   |   |   |   |
          |                      crossbar              |    |   |   |   |   |   |
          |                         |                  |    |   |   |   |   |   |
          |   ----------------------------------       |    |   |   |   |   |   |
          |   |     |     |      |      |      |       |    |   |   |   |   |   |
          |   |     |     |      |      |      |       |    |   |   |   |   |   |
          |  MAC   MAC   MAC    MAC    MAC    MAC      |    |  MAC  |   |  MAC  |
          |   |     |     |      |      |      |       |    |   |   |   |   |   |
          ----------------------------------------------    ---------   ---------
              |     |     |      |      |      |    \        /  |        /  |
             PHY   PHY   PHY    PHY    PHY    PHY    \      /  PHY      /  PHY
                                                      \    /           /
                                                       \  /           /
                                                   DSAF(three platform device)
      
      We take the compatibility into consideration, and it works well by using the
      old dts file(tested on d02 board).
      
      For more details, please see individual patches.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      218afa10
    • Y
      dts: hisi: update hns dst for separating dsaf dev support · 218afd68
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      Because debug dsaf port was separated from service dsaf port, this patch
      updates the related configurations of hns dts, changes it to match with
      the new binding files. This also removes enet nodes which don't exist in
      d02 board.
      Signed-off-by: NYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      218afd68
    • Y
      Documentation: Bindings: add port-idx-in-ae for enet node · c132cdcc
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      This patch adds description for port-idx-in-ae attribute.
      Signed-off-by: NYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c132cdcc
    • Y
      Documentation: Bindings: Update DT binding for separating dsaf dev support · 2fc695a1
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      Because debug dsaf port was separated from service dsaf port, this patch
      updates the related information of DT binding.
      Signed-off-by: NYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fc695a1
    • Y
      net: hns: add attribute port-mode-offset for dsaf port node · 0d768fc6
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      Port mode offset for each dsaf port is different. The current code is not
      so readability. This patch adds configuration named port-mode-offset to
      make the code simple and more readability. If port-mode-offset isn't
      exists, default value 0 will be used.
      Signed-off-by: NDaode Huang <huangdaode@hisilicon.com>
      Signed-off-by: NYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d768fc6
    • Y
      net: hns: add attribute port-rst-offset for dsaf port node · 850bfa3b
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      The reset offset for each port in a dsaf is different. The current code is
      not so readability. This patch adds configuration named port-rst-offset to
      make the code simple and more readability. If this attribute doesn't exist,
      default value of this attribute is equal to its port index.
      Signed-off-by: NYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      850bfa3b
    • Y
      net: hns: add attribute cpld_ctrl for dsaf port node · 31d4446d
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      This patch adds attribute cpld_ctrl for dsaf port node, parses the syscon
      for mac_cb from dts, and changes the method of access the cpld related
      registers through syscon.
      Signed-off-by: NDaode Huang <huangdaode@hisilicon.com>
      Signed-off-by: NYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31d4446d