1. 09 May, 2019 22 commits
  2. 08 May, 2019 18 commits
    • Pieter Jansen van Vuuren's avatar
      net/sched: avoid double free on matchall reoffload · 5f058368
      Pieter Jansen van Vuuren authored
      Avoid freeing cls_mall.rule twice when failing to setup flow_action
      offload used in the hardware intermediate representation. This is
      achieved by returning 0 when the setup fails but the skip software
      flag has not been set.
      
      Fixes: f00cbf19 ("net/sched: use the hardware intermediate representation for matchall")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f058368
    • Pieter Jansen van Vuuren's avatar
      nfp: reintroduce ndo_get_port_parent_id for representor ports · 1e966763
      Pieter Jansen van Vuuren authored
      NFP does not register devlink ports for representors (without
      the "devlink: expose PF and VF representors as ports" series
      there are no port flavours to expose them as).
      
      Commit c25f08ac ("nfp: remove ndo_get_port_parent_id implementation")
      went to far in removing ndo_get_port_parent_id for representors.
      This causes redirection offloads to fail, and switch_id attribute
      missing.
      
      Reintroduce the ndo_get_port_parent_id callback for representor ports.
      
      Fixes: c25f08ac ("nfp: remove ndo_get_port_parent_id implementation")
      Signed-off-by: default avatarPieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e966763
    • David S. Miller's avatar
      Merge branch 'phy-realtek-delays' · 8dde1429
      David S. Miller authored
      Serge Semin says:
      
      ====================
      net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f)
      
      It has been discovered that RX/TX delays of rtl8211e ethernet PHY
      can be configured via a MDIO register hidden in the extension pages
      layout. Particularly the extension page 0xa4 provides a register 0x1c,
      which bits 1 and 2 control the described delays. They are used to
      implement the "rgmii-{id,rxid,txid}" phy-mode support in patch 1.
      
      The second patch makes sure the rtl8211f TX-delay is configured only
      if RGMII interface mode is specified including the rgmii-rxid one.
      In other cases (most importantly for NA mode) the delays are supposed
      to be preconfigured by some other software or hardware and should be
      left as is without any modification. The similar thing is also done
      for rtl8211e in the patch 1 of this series.
      
      Changelog v3
      - Add this cover-letter.
      - Add Andrew' Reviewed-by tag to patch 1.
      - Accept RGMII_RXID interface mode for rtl8211f and clear the TX_DELAY
        bit in this case.
      - Initialize ret variable with 0 to prevent the "may be used uninitialized"
        warning in patch 1.
      
      Changelog v4
      - Rebase onto net-next
      ====================
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8dde1429
    • Serge Semin's avatar
      net: phy: realtek: Change TX-delay setting for RGMII modes only · 1da7756e
      Serge Semin authored
      It's prone to problems if delay is cleared out for other than RGMII
      modes. So lets set/clear the TX-delay in the config register only
      if actually RGMII-like interface mode is requested. This only
      concerns rtl8211f chips.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1da7756e
    • Serge Semin's avatar
      net: phy: realtek: Add rtl8211e rx/tx delays config · f81dadbc
      Serge Semin authored
      There are two chip pins named TXDLY and RXDLY which actually adds the 2ns
      delays to TXC and RXC for TXD/RXD latching. Alas this is the only
      documented info regarding the RGMII timing control configurations the PHY
      provides. It turns out the same settings can be setup via MDIO registers
      hidden in the extension pages layout. Particularly the extension page 0xa4
      provides a register 0x1c, which bits 1 and 2 control the described delays.
      They are used to implement the "rgmii-{id,rxid,txid}" phy-mode.
      
      The hidden RGMII configs register utilization was found in the rtl8211e
      U-boot driver:
      https://elixir.bootlin.com/u-boot/v2019.01/source/drivers/net/phy/realtek.c#L99
      
      There is also a freebsd-folks discussion regarding this register:
      https://reviews.freebsd.org/D13591
      
      It confirms that the register bits field must control the so called
      configuration pins described in the table 12-13 of the official PHY
      datasheet:
      8:6 = PHY Address
      5:4 = Auto-Negotiation
      3 = Interface Mode Select
      2 = RX Delay
      1 = TX Delay
      0 = SELRGV
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f81dadbc
    • Vladimir Oltean's avatar
      net: dsa: sja1105: Don't return a negative in u8 sja1105_stp_state_get · 3b2c4f4d
      Vladimir Oltean authored
      Dan Carpenter says:
      
      The patch 640f763f: "net: dsa: sja1105: Add support for Spanning
      Tree Protocol" from May 5, 2019, leads to the following static
      checker warning:
      
              drivers/net/dsa/sja1105/sja1105_main.c:1073 sja1105_stp_state_get()
              warn: signedness bug returning '(-22)'
      
      The caller doesn't check for negative errors anyway.
      
      Fixes: 640f763f: ("net: dsa: sja1105: Add support for Spanning Tree Protocol")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b2c4f4d
    • Colin Ian King's avatar
      net: dsa: sja1105: fix check on while loop exit · 5425711b
      Colin Ian King authored
      The while-loop exit condition check is not correct; the
      loop should continue if the returns from the function calls are
      negative or the CRC status returns are invalid.  Currently it
      is ignoring the returns from the function calls.  Fix this by
      removing the status return checks and only break from the loop
      at the very end when we know that all the success condtions have
      been met.
      
      Kudos to Dan Carpenter for describing the correct fix and
      Vladimir Oltean for noting the change to the check on the number
      of retries.
      
      Addresses-Coverity: ("Uninitialized scalar variable")
      Fixes: 8aa9ebcc ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Tested-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5425711b
    • Wang Hai's avatar
      net: dsa: sja1105: Make 'sja1105et_regs' and 'sja1105pqrs_regs' static · 86dc59e3
      Wang Hai authored
      drivers/net/dsa/sja1105/sja1105_spi.c:486:21: warning: symbol 'sja1105et_regs' was not declared. Should it be static?
      drivers/net/dsa/sja1105/sja1105_spi.c:511:21: warning: symbol 'sja1105pqrs_regs' was not declared. Should it be static?
      
      Fixes: 8aa9ebcc ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarWang Hai <wanghai26@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86dc59e3
    • Paolo Abeni's avatar
      selinux: do not report error on connect(AF_UNSPEC) · c7e0d6cc
      Paolo Abeni authored
      calling connect(AF_UNSPEC) on an already connected TCP socket is an
      established way to disconnect() such socket. After commit 68741a8a
      ("selinux: Fix ltp test connect-syscall failure") it no longer works
      and, in the above scenario connect() fails with EAFNOSUPPORT.
      
      Fix the above falling back to the generic/old code when the address family
      is not AF_INET{4,6}, but leave the SCTP code path untouched, as it has
      specific constraints.
      
      Fixes: 68741a8a ("selinux: Fix ltp test connect-syscall failure")
      Reported-by: default avatarTom Deseyn <tdeseyn@redhat.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7e0d6cc
    • Colin Ian King's avatar
      net: hns3: remove redundant assignment of l2_hdr to itself · c264ed44
      Colin Ian King authored
      The pointer l2_hdr is being assigned to itself, this is redundant
      and can be removed.
      
      Addresses-Coverity: ("Evaluation order violation")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c264ed44
    • Colin Ian King's avatar
      net: dsa: lantiq: fix spelling mistake "brigde" -> "bridge" · d6759172
      Colin Ian King authored
      There are several spelling mistakes in dev_err messages. Fix these.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6759172
    • Geert Uytterhoeven's avatar
      openvswitch: Replace removed NF_NAT_NEEDED with IS_ENABLED(CONFIG_NF_NAT) · f319ca65
      Geert Uytterhoeven authored
      Commit 4806e975 ("netfilter: replace NF_NAT_NEEDED with
      IS_ENABLED(CONFIG_NF_NAT)") removed CONFIG_NF_NAT_NEEDED, but a new user
      popped up afterwards.
      
      Fixes: fec9c271 ("openvswitch: load and reference the NAT helper.")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarFlavio Leitner <fbl@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f319ca65
    • David Ahern's avatar
      ipv4: Fix raw socket lookup for local traffic · 19e4e768
      David Ahern authored
      inet_iif should be used for the raw socket lookup. inet_iif considers
      rt_iif which handles the case of local traffic.
      
      As it stands, ping to a local address with the '-I <dev>' option fails
      ever since ping was changed to use SO_BINDTODEVICE instead of
      cmsg + IP_PKTINFO.
      
      IPv6 works fine.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      19e4e768
    • Hangbin Liu's avatar
      fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied · e9919a24
      Hangbin Liu authored
      With commit 153380ec ("fib_rules: Added NLM_F_EXCL support to
      fib_nl_newrule") we now able to check if a rule already exists. But this
      only works with iproute2. For other tools like libnl, NetworkManager,
      it still could add duplicate rules with only NLM_F_CREATE flag, like
      
      [localhost ~ ]# ip rule
      0:      from all lookup local
      32766:  from all lookup main
      32767:  from all lookup default
      100000: from 192.168.7.5 lookup 5
      100000: from 192.168.7.5 lookup 5
      
      As it doesn't make sense to create two duplicate rules, let's just return
      0 if the rule exists.
      
      Fixes: 153380ec ("fib_rules: Added NLM_F_EXCL support to fib_nl_newrule")
      Reported-by: default avatarThomas Haller <thaller@redhat.com>
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9919a24
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 80f23212
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "Highlights:
      
         1) Support AES128-CCM ciphers in kTLS, from Vakul Garg.
      
         2) Add fib_sync_mem to control the amount of dirty memory we allow to
            queue up between synchronize RCU calls, from David Ahern.
      
         3) Make flow classifier more lockless, from Vlad Buslov.
      
         4) Add PHY downshift support to aquantia driver, from Heiner
            Kallweit.
      
         5) Add SKB cache for TCP rx and tx, from Eric Dumazet. This reduces
            contention on SLAB spinlocks in heavy RPC workloads.
      
         6) Partial GSO offload support in XFRM, from Boris Pismenny.
      
         7) Add fast link down support to ethtool, from Heiner Kallweit.
      
         8) Use siphash for IP ID generator, from Eric Dumazet.
      
         9) Pull nexthops even further out from ipv4/ipv6 routes and FIB
            entries, from David Ahern.
      
        10) Move skb->xmit_more into a per-cpu variable, from Florian
            Westphal.
      
        11) Improve eBPF verifier speed and increase maximum program size,
            from Alexei Starovoitov.
      
        12) Eliminate per-bucket spinlocks in rhashtable, and instead use bit
            spinlocks. From Neil Brown.
      
        13) Allow tunneling with GUE encap in ipvs, from Jacky Hu.
      
        14) Improve link partner cap detection in generic PHY code, from
            Heiner Kallweit.
      
        15) Add layer 2 encap support to bpf_skb_adjust_room(), from Alan
            Maguire.
      
        16) Remove SKB list implementation assumptions in SCTP, your's truly.
      
        17) Various cleanups, optimizations, and simplifications in r8169
            driver. From Heiner Kallweit.
      
        18) Add memory accounting on TX and RX path of SCTP, from Xin Long.
      
        19) Switch PHY drivers over to use dynamic featue detection, from
            Heiner Kallweit.
      
        20) Support flow steering without masking in dpaa2-eth, from Ioana
            Ciocoi.
      
        21) Implement ndo_get_devlink_port in netdevsim driver, from Jiri
            Pirko.
      
        22) Increase the strict parsing of current and future netlink
            attributes, also export such policies to userspace. From Johannes
            Berg.
      
        23) Allow DSA tag drivers to be modular, from Andrew Lunn.
      
        24) Remove legacy DSA probing support, also from Andrew Lunn.
      
        25) Allow ll_temac driver to be used on non-x86 platforms, from Esben
            Haabendal.
      
        26) Add a generic tracepoint for TX queue timeouts to ease debugging,
            from Cong Wang.
      
        27) More indirect call optimizations, from Paolo Abeni"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1763 commits)
        cxgb4: Fix error path in cxgb4_init_module
        net: phy: improve pause mode reporting in phy_print_status
        dt-bindings: net: Fix a typo in the phy-mode list for ethernet bindings
        net: macb: Change interrupt and napi enable order in open
        net: ll_temac: Improve error message on error IRQ
        net/sched: remove block pointer from common offload structure
        net: ethernet: support of_get_mac_address new ERR_PTR error
        net: usb: smsc: fix warning reported by kbuild test robot
        staging: octeon-ethernet: Fix of_get_mac_address ERR_PTR check
        net: dsa: support of_get_mac_address new ERR_PTR error
        net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats
        vrf: sit mtu should not be updated when vrf netdev is the link
        net: dsa: Fix error cleanup path in dsa_init_module
        l2tp: Fix possible NULL pointer dereference
        taprio: add null check on sched_nest to avoid potential null pointer dereference
        net: mvpp2: cls: fix less than zero check on a u32 variable
        net_sched: sch_fq: handle non connected flows
        net_sched: sch_fq: do not assume EDT packets are ordered
        net: hns3: use devm_kcalloc when allocating desc_cb
        net: hns3: some cleanup for struct hns3_enet_ring
        ...
      80f23212
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 82efe439
      Linus Torvalds authored
      Pull Devicetree updates from Rob Herring:
      
       - Fix possible memory leak in reserved-memory failure case
      
       - Support for DMA parent bus which are not a parent node
      
       - Clang -Wunsequenced fix
      
       - Remove some unnecessary prints on memory alloc failures
      
       - Various printk msg and comment fixes
      
       - Update DT schema tools repository location
      
       - Convert simple-framebuffer binding to DT schema
      
       - Bindings for isl68137 and ir38064 trivial devices
      
       - New documentation on binding do's and don't's for binding writers to
         ignore
      
      * tag 'devicetree-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (22 commits)
        of: unittest: Remove error printing on OOM
        of: irq: Remove WARN_ON() for kzalloc() failure
        dt-bindings: pinctrl: fix bias-pull,up typo
        dt-bindings: Update schema project location to devicetree.org github group
        of: fix clang -Wunsequenced for be32_to_cpu()
        of/device.c: fix the wrong comments
        dt-bindings: Add isl68137 as a trivial device
        dt-bindings: Add ir38064 as a trivial device
        of: del redundant type conversion
        dt-bindings: mfd: axp20x: Add fallback for axp805
        of: Improve of_phandle_iterator_next() error message
        dt-bindings: connector: Spelling mistake
        dt-bindings: Add schemas for simple-framebuffer
        of: address: Add support for the parent DMA bus
        of: address: Retrieve a parent through a callback in __of_translate_address
        dt-bindings: bus: Add binding for the Allwinner MBUS controller
        dt-bindings: interconnect: Add a dma interconnect name
        of: use correct function prototype for of_overlay_fdt_apply()
        of: reserved_mem: fix reserve memory leak
        of: property: Document that of_graph_get_endpoint_by_regs needs of_node_put
        ...
      82efe439
    • Linus Torvalds's avatar
      Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random · dd5001e2
      Linus Torvalds authored
      Pull randomness updates from Ted Ts'o:
      
       - initialize the random driver earler
      
       - fix CRNG initialization when we trust the CPU's RNG on NUMA systems
      
       - other miscellaneous cleanups and fixes.
      
      * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
        random: add a spinlock_t to struct batched_entropy
        random: document get_random_int() family
        random: fix CRNG initialization when random.trust_cpu=1
        random: move rand_initialize() earlier
        random: only read from /dev/random after its pool has received 128 bits
        drivers/char/random.c: make primary_crng static
        drivers/char/random.c: remove unused stuct poolinfo::poolbits
        drivers/char/random.c: constify poolinfo_table
      dd5001e2
    • Linus Torvalds's avatar
      Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt · a9fbcd67
      Linus Torvalds authored
      Pull fscrypt updates from Ted Ts'o:
       "Clean up fscrypt's dcache revalidation support, and other
        miscellaneous cleanups"
      
      * tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt:
        fscrypt: cache decrypted symlink target in ->i_link
        vfs: use READ_ONCE() to access ->i_link
        fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext
        fscrypt: only set dentry_operations on ciphertext dentries
        fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory
        fscrypt: fix race allowing rename() and link() of ciphertext dentries
        fscrypt: clean up and improve dentry revalidation
        fscrypt: use READ_ONCE() to access ->i_crypt_info
        fscrypt: remove WARN_ON_ONCE() when decryption fails
        fscrypt: drop inode argument from fscrypt_get_ctx()
      a9fbcd67