1. 07 12月, 2016 1 次提交
    • S
      net: hns: Fix to conditionally convey RX checksum flag to stack · 862b3d20
      Salil 提交于
      This patch introduces the RX checksum function to check the
      status of the hardware calculated checksum and its error and
      appropriately convey status to the upper stack in skb->ip_summed
      field.
      
      In hardware, we only support checksum for the following
      protocols:
      1) IPv4,
      2) TCP(over IPv4 or IPv6),
      3) UDP(over IPv4 or IPv6),
      4) SCTP(over IPv4 or IPv6)
      but we support many L3(IPv4, IPv6, MPLS, PPPoE etc) and
      L4(TCP, UDP, GRE, SCTP, IGMP, ICMP etc.) protocols.
      
      Hardware limitation:
      Our present hardware RX Descriptor lacks L3/L4 checksum
      "Status & Error" bit (which usually can be used to indicate whether
      checksum was calculated by the hardware and if there was any error
      encountered during checksum calculation).
      
      Software workaround:
      We do get info within the RX descriptor about the kind of
      L3/L4 protocol coming in the packet and the error status. These
      errors might not just be checksum errors but could be related to
      version, length of IPv4, UDP, TCP etc.
      Because there is no-way of knowing if it is a L3/L4 error due
      to bad checksum or any other L3/L4 error, we will not (cannot)
      convey hardware checksum status(CHECKSUM_UNNECESSARY) for such
      cases to upper stack and will not maintain the RX L3/L4 checksum
      counters as well.
      Signed-off-by: NSalil Mehta <salil.mehta@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      862b3d20
  2. 11 11月, 2016 2 次提交
  3. 18 10月, 2016 1 次提交
    • J
      ethernet: use core min/max MTU checking · 44770e11
      Jarod Wilson 提交于
      et131x: min_mtu 64, max_mtu 9216
      
      altera_tse: min_mtu 64, max_mtu 1500
      
      amd8111e: min_mtu 60, max_mtu 9000
      
      bnad: min_mtu 46, max_mtu 9000
      
      macb: min_mtu 68, max_mtu 1500 or 10240 depending on hardware capability
      
      xgmac: min_mtu 46, max_mtu 9000
      
      cxgb2: min_mtu 68, max_mtu 9582 (pm3393) or 9600 (vsc7326)
      
      enic: min_mtu 68, max_mtu 9000
      
      gianfar: min_mtu 50, max_mu 9586
      
      hns_enet: min_mtu 68, max_mtu 9578 (v1) or 9706 (v2)
      
      ksz884x: min_mtu 60, max_mtu 1894
      
      myri10ge: min_mtu 68, max_mtu 9000
      
      natsemi: min_mtu 64, max_mtu 2024
      
      nfp: min_mtu 68, max_mtu hardware-specific
      
      forcedeth: min_mtu 64, max_mtu 1500 or 9100, depending on hardware
      
      pch_gbe: min_mtu 46, max_mtu 10300
      
      pasemi_mac: min_mtu 64, max_mtu 9000
      
      qcaspi: min_mtu 46, max_mtu 1500
      - remove qcaspi_netdev_change_mtu as it is now redundant
      
      rocker: min_mtu 68, max_mtu 9000
      
      sxgbe: min_mtu 68, max_mtu 9000
      
      stmmac: min_mtu 46, max_mtu depends on hardware
      
      tehuti: min_mtu 60, max_mtu 16384
      - driver had no max mtu checking, but product docs say 16k jumbo packets
        are supported by the hardware
      
      netcp: min_mtu 68, max_mtu 9486
      - remove netcp_ndo_change_mtu as it is now redundant
      
      via-velocity: min_mtu 64, max_mtu 9000
      
      octeon: min_mtu 46, max_mtu 65370
      
      CC: netdev@vger.kernel.org
      CC: Mark Einon <mark.einon@gmail.com>
      CC: Vince Bridgers <vbridger@opensource.altera.com>
      CC: Rasesh Mody <rasesh.mody@qlogic.com>
      CC: Nicolas Ferre <nicolas.ferre@atmel.com>
      CC: Santosh Raspatur <santosh@chelsio.com>
      CC: Hariprasad S <hariprasad@chelsio.com>
      CC:  Christian Benvenuti <benve@cisco.com>
      CC: Sujith Sankar <ssujith@cisco.com>
      CC: Govindarajulu Varadarajan <_govind@gmx.com>
      CC: Neel Patel <neepatel@cisco.com>
      CC: Claudiu Manoil <claudiu.manoil@freescale.com>
      CC: Yisen Zhuang <yisen.zhuang@huawei.com>
      CC: Salil Mehta <salil.mehta@huawei.com>
      CC: Hyong-Youb Kim <hykim@myri.com>
      CC: Jakub Kicinski <jakub.kicinski@netronome.com>
      CC: Olof Johansson <olof@lixom.net>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Byungho An <bh74.an@samsung.com>
      CC: Girish K S <ks.giri@samsung.com>
      CC: Vipul Pandya <vipul.pandya@samsung.com>
      CC: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      CC: Alexandre Torgue <alexandre.torgue@st.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Wingman Kwok <w-kwok2@ti.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Francois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44770e11
  4. 03 10月, 2016 5 次提交
  5. 22 9月, 2016 1 次提交
  6. 02 7月, 2016 1 次提交
  7. 21 6月, 2016 7 次提交
  8. 05 6月, 2016 4 次提交
  9. 05 5月, 2016 1 次提交
  10. 26 4月, 2016 1 次提交
    • Y
      net: hns: add attribute port-idx-in-ae in enet node. · 406adee9
      Yisen.Zhuang\(Zhuangyuzeng\) 提交于
      This patch parse port-idx-in-ae in enet node. In NIC mode of DSAF, all 6
      PHYs of service DSAF are taken as ethernet ports to the CPU. The
      port-idx-in-ae can be 0 to 5. Here is the diagram:
                  +-----+---------------+
                  |            CPU      |
                  +-+-+-+---+-+-+-+-+-+-+
                    |    |   | | | | | |
                 debug debug   service
                 port  port     port
                 (0)   (0)     (0-5)
      
      In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
      ports connect to a LAN Switch while the CPU side assume itself have one
      single NIC connect to this switch. In this case, the port-idx-in-ae will
      be 0 only.
                  +-----+-----+------+------+
                  |                CPU      |
                  +-+-+-+-+-+-+-+-+-+-+-+-+-+
                    |    |     service| port(0)
                  debug debug  +------------+
                  port  port   |   switch   |
                  (0)   (0)    +-+-+-+-+-+-++
                                | | | | | |
                               external port
      
      when port-idx-in-ae is not exists, old attribute port-id will be used
      (only for compatible purpose, not recommended to use port-id in new code).
      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>
      406adee9
  11. 25 3月, 2016 3 次提交
  12. 23 3月, 2016 3 次提交
  13. 22 1月, 2016 1 次提交
  14. 06 1月, 2016 1 次提交
    • A
      net: hns: avoid uninitialized variable warning: · be78a690
      Arnd Bergmann 提交于
      gcc fails to see that the use of the 'last_offset' variable
      in hns_nic_reuse_page() is used correctly and issues a bogus
      warning:
      
      drivers/net/ethernet/hisilicon/hns/hns_enet.c: In function 'hns_nic_reuse_page':
      drivers/net/ethernet/hisilicon/hns/hns_enet.c:541:6: warning: 'last_offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      This simplifies the function to make it more obvious what is
      going on to both readers and compilers, which makes the warning
      go away.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be78a690
  15. 09 12月, 2015 1 次提交
  16. 05 12月, 2015 3 次提交
  17. 02 11月, 2015 1 次提交
  18. 19 10月, 2015 1 次提交
  19. 14 10月, 2015 1 次提交
  20. 29 9月, 2015 1 次提交