1. 02 Aug, 2017 25 commits
  2. 01 Aug, 2017 15 commits
    • Willem de Bruijn's avatar
      net: add skb_frag_foreach_page and use with kmap_atomic · c613c209
      Willem de Bruijn authored
      Skb frags may contain compound pages. Various operations map frags
      temporarily using kmap_atomic, but this function works on single
      pages, not whole compound pages. The distinction is only relevant
      for high mem pages that require temporary mappings.
      
      Introduce a looping mechanism that for compound highmem pages maps
      one page at a time, does not change behavior on other pages.
      Use the loop in the kmap_atomic callers in net/core/skbuff.c.
      
      Verified by triggering skb_copy_bits with
      
          tcpdump -n -c 100 -i ${DEV} -w /dev/null &
          netperf -t TCP_STREAM -H ${HOST}
      
        and by triggering __skb_checksum with
      
          ethtool -K ${DEV} tx off
      
        repeated the tests with looping on a non-highmem platform
        (x86_64) by making skb_frag_must_loop always return true.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c613c209
    • David S. Miller's avatar
      Merge branch 'mediatek-next' · 1ae39d65
      David S. Miller authored
      Sean Wang says:
      
      ====================
      net-next: mediatek: add support for ethernet on MT7622 SoC
      
      Changes since v2:
      - update John's mail
      
      Changes since v1:
      - add refinement for ethernet clock management
      - take out the code block for ESW, add it until ESW driver is actually introduced
      
      The series adds the driver for ethernet controller found on MT7622 SoC.
      There are additions against with previous MT7623 SoC such as shared SGMII
      given for the dual GMACs and built-in 5-ports 10/100 embedded switch support
      (ESW). Thus more clocks consumers and SGMII hardware setup for the extra
      features are all introduced here and as for the support for ESW that would be
      planned to add in the separate patch integrating with DSA infrastructure
      in the future.
      
      Currently testing successfully is done with those patches for the conditions
      such as GMAC2 with IP1001 PHY via RGMII and GMAC1/2 with RTL8211F PHY via SGMII.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ae39d65
    • Sean Wang's avatar
      MAINTAINERS: add Sean/Nelson as MediaTek ethernet maintainers · 0857d6f8
      Sean Wang authored
      Sean and Nelson work for MediaTek on maintaining the MediaTek ethernet
      driver for the existing SoCs and adding support for the following SoCs.
      In the past, Sean has been active at making most of the qualifications
      , stress test and submitting a lot of patches for the driver while
      Nelson was looking into the aspects more on hardware additions and details
      such as introducing PDMA with Hardware LRO to the driver. Also update
      John's up-to-date mail address in the patch.
      
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarNelson Chang <nelson.chang@mediatek.com>
      Acked-by: default avatarJohn Crispin <john@phrozen.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0857d6f8
    • Sean Wang's avatar
      net-next: mediatek: add support for MediaTek MT7622 SoC · 42c03844
      Sean Wang authored
      This patch adds the driver for ethernet controller on MT7622 SoC. It has
      the similar handling logic as the previously MT7623 does, but there are
      additions against with MT7623 SoC, the shared SGMII given for the dual
      GMACs and including 5-ports 10/100 embedded switch support (ESW) as the
      GMAC1 option, thus more clocks consumers for the extra feature are
      introduced here. So for ease portability and maintenance, those
      differences all are being kept inside the platform data as other drivers
      usually do. Currently testing successfully is done with those patches for
      the conditions such as GMAC2 with IP1001 PHY via RGMII and GMAC1/2 with
      RTL8211F PHY via SGMII.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42c03844
    • Sean Wang's avatar
      net-next: mediatek: add platform data to adapt into various hardware · 2ec50f57
      Sean Wang authored
      This patch is the preparation patch in order to adapt into various
      hardware through adding platform data which holds specific characteristics
      among MediaTek SoCs and introducing the unified clock handler for those
      distinct clock requirements depending on different features such as
      TRGMII and SGMII getting support on the target SoC. And finally, add
      enhancement with given the generic description for Kconfig and remove the
      unnecessary machine type dependency in Makefile.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2ec50f57
    • Sean Wang's avatar
      dt-bindings: net: mediatek: add support for MediaTek MT7623 and MT7622 SoC · da779b40
      Sean Wang authored
      The patch adds the supplements in the dt-binding document for MediaTek
      MT7622 SoC with extra SGMII system controller and relevant clock consumers
      listed as the requirements for those SoCs equipped with the SGMII circuit.
      Also, add the missing binding information for MT7623 SoC here which relies
      on the fallback binding of MT2701.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da779b40
    • David S. Miller's avatar
      Merge branch 'kzproxy-next' · 2e674381
      David S. Miller authored
      Tom Herbert says:
      
      ====================
      net: Infrastructure changes for [kz]proxy
      
      This patch set contains some general infrastructure enhancements that
      will be used by kernel proxy and zero proxy.
      
      The changes are:
        - proto_ops: Add locked versions of sendmsg and sendpage
        - skb_send_sock: Allow sending and skb on a socket within the
          kernel
        - Generalize strparser. Allow it to be used in other contexts than
          just in the read_sock path. This will be used in the transmit
          path of zero proxy.
      
      Some nice future work (which I've been discussing with John Fastabend)
      will be to make some of the related functions to allow gifting of skbs
      We should be able to do that with skb_send_sock and strp_process. I'd
      also like this feature in the read_sock callbeck.
      
      Tested: Ran modified kernel without incident. Tested new functionality
      using zero proxy (in development).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e674381
    • Tom Herbert's avatar
      strparser: Generalize strparser · bbb03029
      Tom Herbert authored
      Generalize strparser from more than just being used in conjunction
      with read_sock. strparser will also be used in the send path with
      zero proxy. The primary change is to create strp_process function
      that performs the critical processing on skbs. The documentation
      is also updated to reflect the new uses.
      Signed-off-by: default avatarTom Herbert <tom@quantonium.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbb03029
    • Tom Herbert's avatar
      skbuff: Function to send an skbuf on a socket · 20bf50de
      Tom Herbert authored
      Add skb_send_sock to send an skbuff on a socket within the kernel.
      Arguments include an offset so that an skbuf might be sent in mulitple
      calls (e.g. send buffer limit is hit).
      Signed-off-by: default avatarTom Herbert <tom@quantonium.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20bf50de
    • Tom Herbert's avatar
      proto_ops: Add locked held versions of sendmsg and sendpage · 306b13eb
      Tom Herbert authored
      Add new proto_ops sendmsg_locked and sendpage_locked that can be
      called when the socket lock is already held. Correspondingly, add
      kernel_sendmsg_locked and kernel_sendpage_locked as front end
      functions.
      
      These functions will be used in zero proxy so that we can take
      the socket lock in a ULP sendmsg/sendpage and then directly call the
      backend transport proto_ops functions.
      Signed-off-by: default avatarTom Herbert <tom@quantonium.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      306b13eb
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 29fda25a
      David S. Miller authored
      Two minor conflicts in virtio_net driver (bug fix overlapping addition
      of a helper) and MAINTAINERS (new driver edit overlapping revamp of
      PHY entry).
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29fda25a
    • David S. Miller's avatar
      Merge branch 'revert-ipv6-const' · bb1182bc
      David S. Miller authored
      Julia Lawall says:
      
      ====================
      Revert "ipv6: constify inet6_protocol structures"
      
      inet6_add_protocol and inet6_del_protocol include casts that remove the
      effect of the const annotation on their parameter, leading to possible
      runtime crashes.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb1182bc
    • Julia Lawall's avatar
      Revert "l2tp: constify inet6_protocol structures" · e6eeb287
      Julia Lawall authored
      This reverts commit d04916a4.
      
      inet6_add_protocol and inet6_del_protocol include casts that remove the
      effect of the const annotation on their parameter, leading to possible
      runtime crashes.
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6eeb287
    • Julia Lawall's avatar
      Revert "ipv6: constify inet6_protocol structures" · 39294c3d
      Julia Lawall authored
      This reverts commit 3a3a4e30.
      
      inet6_add_protocol and inet6_del_protocol include casts that remove the
      effect of the const annotation on their parameter, leading to possible
      runtime crashes.
      Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39294c3d
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · bc78d646
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Handle notifier registry failures properly in tun/tap driver, from
          Tonghao Zhang.
      
       2) Fix bpf verifier handling of subtraction bounds and add a testcase
          for this, from Edward Cree.
      
       3) Increase reset timeout in ftgmac100 driver, from Ben Herrenschmidt.
      
       4) Fix use after free in prd_retire_rx_blk_timer_exired() in AF_PACKET,
          from Cong Wang.
      
       5) Fix SElinux regression due to recent UDP optimizations, from Paolo
          Abeni.
      
       6) We accidently increment IPSTATS_MIB_FRAGFAILS in the ipv6 code
          paths, fix from Stefano Brivio.
      
       7) Fix some mem leaks in dccp, from Xin Long.
      
       8) Adjust MDIO_BUS kconfig deps to avoid build errors, from Arnd
          Bergmann.
      
       9) Mac address length check and buffer size fixes from Cong Wang.
      
      10) Don't leak sockets in ipv6 udp early demux, from Paolo Abeni.
      
      11) Fix return value when copy_from_user() fails in
          bpf_prog_get_info_by_fd(), from Daniel Borkmann.
      
      12) Handle PHY_HALTED properly in phy library state machine, from
          Florian Fainelli.
      
      13) Fix OOPS in fib_sync_down_dev(), from Ido Schimmel.
      
      14) Fix truesize calculation in virtio_net which led to performance
          regressions, from Michael S Tsirkin.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits)
        samples/bpf: fix bpf tunnel cleanup
        udp6: fix jumbogram reception
        ppp: Fix a scheduling-while-atomic bug in del_chan
        Revert "net: bcmgenet: Remove init parameter from bcmgenet_mii_config"
        virtio_net: fix truesize for mergeable buffers
        mv643xx_eth: fix of_irq_to_resource() error check
        MAINTAINERS: Add more files to the PHY LIBRARY section
        ipv4: fib: Fix NULL pointer deref during fib_sync_down_dev()
        net: phy: Correctly process PHY_HALTED in phy_stop_machine()
        sunhme: fix up GREG_STAT and GREG_IMASK register offsets
        bpf: fix bpf_prog_get_info_by_fd to dump correct xlated_prog_len
        tcp: avoid bogus gcc-7 array-bounds warning
        net: tc35815: fix spelling mistake: "Intterrupt" -> "Interrupt"
        bpf: don't indicate success when copy_from_user fails
        udp6: fix socket leak on early demux
        net: thunderx: Fix BGX transmit stall due to underflow
        Revert "vhost: cache used event for better performance"
        team: use a larger struct for mac address
        net: check dev->addr_len for dev_set_mac_address()
        phy: bcm-ns-usb3: fix MDIO_BUS dependency
        ...
      bc78d646