1. 02 Oct, 2019 24 commits
  2. 01 Oct, 2019 14 commits
    • Simon Horman's avatar
      dt-bindings: sh_eth convert bindings to json-schema · 37a2fce0
      Simon Horman authored
      Convert Renesas Electronics SH EtherMAC bindings documentation to
      json-schema.  Also name bindings documentation file according to the compat
      string being documented.
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Reviewed-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37a2fce0
    • Peter Fink's avatar
      net: usb: ax88179_178a: allow optionally getting mac address from device tree · 9fb137ae
      Peter Fink authored
      Adopt and integrate the feature to pass the MAC address via device tree
      from asix_device.c (03fc5d4f) also to other ax88179 based asix chips.
      E.g. the bootloader fills in local-mac-address and the driver will then
      pick up and use this MAC address.
      Signed-off-by: default avatarPeter Fink <pfink@christ-es.de>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9fb137ae
    • Nicolas Dichtel's avatar
      ipv6: minor code reorg in inet6_fill_ifla6_attrs() · 0d7982ce
      Nicolas Dichtel authored
      Just put related code together to ease code reading: the memcpy() is
      related to the nla_reserve().
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d7982ce
    • David S. Miller's avatar
      Merge branch 'netdev-altnames' · 7a56493f
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      net: introduce alternative names for network interfaces
      
      In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for
      netdevice name length. Now when we have PF and VF representors
      with port names like "pfXvfY", it became quite common to hit this limit:
      0123456789012345
      enp131s0f1npf0vf6
      enp131s0f1npf0vf22
      
      Udev cannot rename these interfaces out-of-the-box and user needs to
      create custom rules to handle them.
      
      Also, udev has multiple schemes of netdev names. From udev code:
       * Type of names:
       *   b<number>                             - BCMA bus core number
       *   c<bus_id>                             - bus id of a grouped CCW or CCW device,
       *                                           with all leading zeros stripped [s390]
       *   o<index>[n<phys_port_name>|d<dev_port>]
       *                                         - on-board device index number
       *   s<slot>[f<function>][n<phys_port_name>|d<dev_port>]
       *                                         - hotplug slot index number
       *   x<MAC>                                - MAC address
       *   [P<domain>]p<bus>s<slot>[f<function>][n<phys_port_name>|d<dev_port>]
       *                                         - PCI geographical location
       *   [P<domain>]p<bus>s<slot>[f<function>][u<port>][..][c<config>][i<interface>]
       *                                         - USB port number chain
       *   v<slot>                               - VIO slot number (IBM PowerVM)
       *   a<vendor><model>i<instance>           - Platform bus ACPI instance id
       *   i<addr>n<phys_port_name>              - Netdevsim bus address and port name
      
      One device can be often renamed by multiple patterns at the
      same time (e.g. pci address/mac).
      
      This patchset introduces alternative names for network interfaces.
      Main goal is to:
      1) Overcome the IFNAMSIZ limitation (altname limitation is 128 bytes)
      2) Allow to have multiple names at the same time (multiple udev patterns)
      3) Allow to use alternative names as handle for commands
      
      The patchset introduces two new commands to add/delete list of properties.
      Currently only alternative names are implemented but the ifrastructure
      could be easily extended later on. This is very similar to the list of vlan
      and tunnels being added/deleted to/from bridge ports.
      
      See following examples.
      
      $ ip link
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
      
      -> Add alternative names for dummy0:
      
      $ ip link prop add dummy0 altname someothername
      $ ip link prop add dummy0 altname someotherveryveryveryverylongname
      $ ip link
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname someothername
          altname someotherveryveryveryverylongname
      $ ip link show someotherveryveryveryverylongname
      2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname someothername
          altname someotherveryveryveryverylongname
      
      -> Add bridge brx, add it's alternative name and use alternative names to
         do enslavement.
      
      $ ip link add name brx type bridge
      $ ip link prop add brx altname mypersonalsuperspecialbridge
      $ ip link set someotherveryveryveryverylongname master mypersonalsuperspecialbridge
      $ ip link
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop master brx state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname someothername
          altname someotherveryveryveryverylongname
      3: brx: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname mypersonalsuperspecialbridge
      
      -> Add ipv4 address to the bridge using alternative name:
      
      $ ip addr add 192.168.0.1/24 dev mypersonalsuperspecialbridge
      $ ip addr show mypersonalsuperspecialbridge
      3: brx: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname mypersonalsuperspecialbridge
          inet 192.168.0.1/24 scope global brx
             valid_lft forever preferred_lft forever
      
      -> Delete one of dummy0 alternative names:
      
      $ ip link prop del dummy0 altname someotherveryveryveryverylongname
      $ ip link
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop master brx state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname someothername
      3: brx: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname mypersonalsuperspecialbridge
      
      -> Add multiple alternative names at once
      
      $ ip link prop add dummy0 altname a altname b altname c altname d
      $ ip link
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop master brx state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname someothername
          altname a
          altname b
          altname c
          altname d
      3: brx: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether ae:67:a9:67:46:86 brd ff:ff:ff:ff:ff:ff
          altname mypersonalsuperspecialbridge
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a56493f
    • Jiri Pirko's avatar
      net: rtnetlink: add possibility to use alternative names as message handle · 76c9ac0e
      Jiri Pirko authored
      Extend the basic rtnetlink commands to use alternative interface names
      as a handle instead of ifindex and ifname.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76c9ac0e
    • Jiri Pirko's avatar
      net: rtnetlink: introduce helper to get net_device instance by ifname · cc6090e9
      Jiri Pirko authored
      Introduce helper function rtnl_get_dev() that gets net_device structure
      instance pointer according to passed ifname or ifname attribute.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc6090e9
    • Jiri Pirko's avatar
      net: rtnetlink: unify the code in __rtnl_newlink get dev with the rest · 7af12cba
      Jiri Pirko authored
      __rtnl_newlink() code flow is a bit different around tb[IFLA_IFNAME]
      processing comparing to the other places. Change that to be unified with
      the rest.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7af12cba
    • Jiri Pirko's avatar
      net: rtnetlink: put alternative names to getlink message · 88f4fb0c
      Jiri Pirko authored
      Extend exiting getlink info message with list of properties. Now the
      only ones are alternative names.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88f4fb0c
    • Jiri Pirko's avatar
      net: rtnetlink: add linkprop commands to add and delete alternative ifnames · 36fbf1e5
      Jiri Pirko authored
      Add two commands to add and delete list of link properties. Implement
      the first property type along - alternative ifnames.
      Each net device can have multiple alternative names.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36fbf1e5
    • Jiri Pirko's avatar
      net: introduce name_node struct to be used in hashlist · ff927412
      Jiri Pirko authored
      Introduce name_node structure to hold name of device and put it into
      hashlist instead of putting there struct net_device directly. Add a
      necessary infrastructure to manipulate the hashlist. This prepares
      the code to use the same hashlist for alternative names introduced
      later in this set.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff927412
    • Jiri Pirko's avatar
      net: procfs: use index hashlist instead of name hashlist · 6958c97a
      Jiri Pirko authored
      Name hashlist is going to be used for more than just dev->name, so use
      rather index hashlist for iteration over net_device instances.
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6958c97a
    • Eric Dumazet's avatar
      tcp: add ipv6_addr_v4mapped_loopback() helper · be2644aa
      Eric Dumazet authored
      tcp_twsk_unique() has a hard coded assumption about ipv4 loopback
      being 127/8
      
      Lets instead use the standard ipv4_is_loopback() method,
      in a new ipv6_addr_v4mapped_loopback() helper.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be2644aa
    • Julio Faracco's avatar
      net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method · 5be5515a
      Julio Faracco authored
      Function netif_schedule_queue() has a hardcoded comparison between queue
      state and any xoff flag. This comparison does the same thing as method
      netif_xmit_stopped(). In terms of code clarity, it is better. See other
      methods like: generic_xdp_tx() and dev_direct_xmit().
      Signed-off-by: default avatarJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5be5515a
    • Prashant Malani's avatar
      r8152: Factor out OOB link list waits · 5f71c840
      Prashant Malani authored
      The same for-loop check for the LINK_LIST_READY bit of an OOB_CTRL
      register is used in several places. Factor these out into a single
      function to reduce the lines of code.
      
      Change-Id: I20e8f327045a72acc0a83e2d145ae2993ab62915
      Signed-off-by: default avatarPrashant Malani <pmalani@chromium.org>
      Reviewed-by: default avatarGrant Grundler <grundler@chromium.org>
      Acked-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f71c840
  3. 29 Sep, 2019 1 commit
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 02dc96ef
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Sanity check URB networking device parameters to avoid divide by
          zero, from Oliver Neukum.
      
       2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6
          don't work properly. Longer term this needs a better fix tho. From
          Vijay Khemka.
      
       3) Small fixes to selftests (use ping when ping6 is not present, etc.)
          from David Ahern.
      
       4) Bring back rt_uses_gateway member of struct rtable, it's semantics
          were not well understood and trying to remove it broke things. From
          David Ahern.
      
       5) Move usbnet snaity checking, ignore endpoints with invalid
          wMaxPacketSize. From Bjørn Mork.
      
       6) Missing Kconfig deps for sja1105 driver, from Mao Wenan.
      
       7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel,
          Alex Vesker, and Yevgeny Kliteynik
      
       8) Missing CAP_NET_RAW checks in various places, from Ori Nimron.
      
       9) Fix crash when removing sch_cbs entry while offloading is enabled,
          from Vinicius Costa Gomes.
      
      10) Signedness bug fixes, generally in looking at the result given by
          of_get_phy_mode() and friends. From Dan Crapenter.
      
      11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet.
      
      12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern.
      
      13) Fix quantization code in tcp_bbr, from Kevin Yang.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits)
        net: tap: clean up an indentation issue
        nfp: abm: fix memory leak in nfp_abm_u32_knode_replace
        tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state
        sk_buff: drop all skb extensions on free and skb scrubbing
        tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth
        mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions
        Documentation: Clarify trap's description
        mlxsw: spectrum: Clear VLAN filters during port initialization
        net: ena: clean up indentation issue
        NFC: st95hf: clean up indentation issue
        net: phy: micrel: add Asym Pause workaround for KSZ9021
        net: socionext: ave: Avoid using netdev_err() before calling register_netdev()
        ptp: correctly disable flags on old ioctls
        lib: dimlib: fix help text typos
        net: dsa: microchip: Always set regmap stride to 1
        nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs
        nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
        net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N
        vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled
        net: sched: sch_sfb: don't call qdisc_put() while holding tree lock
        ...
      02dc96ef
  4. 28 Sep, 2019 1 commit
    • Linus Torvalds's avatar
      Merge branch 'hugepage-fallbacks' (hugepatch patches from David Rientjes) · edf445ad
      Linus Torvalds authored
      Merge hugepage allocation updates from David Rientjes:
       "We (mostly Linus, Andrea, and myself) have been discussing offlist how
        to implement a sane default allocation strategy for hugepages on NUMA
        platforms.
      
        With these reverts in place, the page allocator will happily allocate
        a remote hugepage immediately rather than try to make a local hugepage
        available. This incurs a substantial performance degradation when
        memory compaction would have otherwise made a local hugepage
        available.
      
        This series reverts those reverts and attempts to propose a more sane
        default allocation strategy specifically for hugepages. Andrea
        acknowledges this is likely to fix the swap storms that he originally
        reported that resulted in the patches that removed __GFP_THISNODE from
        hugepage allocations.
      
        The immediate goal is to return 5.3 to the behavior the kernel has
        implemented over the past several years so that remote hugepages are
        not immediately allocated when local hugepages could have been made
        available because the increased access latency is untenable.
      
        The next goal is to introduce a sane default allocation strategy for
        hugepages allocations in general regardless of the configuration of
        the system so that we prevent thrashing of local memory when
        compaction is unlikely to succeed and can prefer remote hugepages over
        remote native pages when the local node is low on memory."
      
      Note on timing: this reverts the hugepage VM behavior changes that got
      introduced fairly late in the 5.3 cycle, and that fixed a huge
      performance regression for certain loads that had been around since
      4.18.
      
      Andrea had this note:
      
       "The regression of 4.18 was that it was taking hours to start a VM
        where 3.10 was only taking a few seconds, I reported all the details
        on lkml when it was finally tracked down in August 2018.
      
           https://lore.kernel.org/linux-mm/20180820032640.9896-2-aarcange@redhat.com/
      
        __GFP_THISNODE in MADV_HUGEPAGE made the above enterprise vfio
        workload degrade like in the "current upstream" above. And it still
        would have been that bad as above until 5.3-rc5"
      
      where the bad behavior ends up happening as you fill up a local node,
      and without that change, you'd get into the nasty swap storm behavior
      due to compaction working overtime to make room for more memory on the
      nodes.
      
      As a result 5.3 got the two performance fix reverts in rc5.
      
      However, David Rientjes then noted that those performance fixes in turn
      regressed performance for other loads - although not quite to the same
      degree.  He suggested reverting the reverts and instead replacing them
      with two small changes to how hugepage allocations are done (patch
      descriptions rephrased by me):
      
       - "avoid expensive reclaim when compaction may not succeed": just admit
         that the allocation failed when you're trying to allocate a huge-page
         and compaction wasn't successful.
      
       - "allow hugepage fallback to remote nodes when madvised": when that
         node-local huge-page allocation failed, retry without forcing the
         local node.
      
      but by then I judged it too late to replace the fixes for a 5.3 release.
      So 5.3 was released with behavior that harked back to the pre-4.18 logic.
      
      But now we're in the merge window for 5.4, and we can see if this
      alternate model fixes not just the horrendous swap storm behavior, but
      also restores the performance regression that the late reverts caused.
      
      Fingers crossed.
      
      * emailed patches from David Rientjes <rientjes@google.com>:
        mm, page_alloc: allow hugepage fallback to remote nodes when madvised
        mm, page_alloc: avoid expensive reclaim when compaction may not succeed
        Revert "Revert "Revert "mm, thp: consolidate THP gfp handling into alloc_hugepage_direct_gfpmask""
        Revert "Revert "mm, thp: restore node-local hugepage allocations""
      edf445ad