1. 06 2月, 2019 16 次提交
  2. 05 2月, 2019 10 次提交
    • L
      net: phy: fixed-phy: Drop GPIO from fixed_phy_add() · 5468e82f
      Linus Walleij 提交于
      All users of the fixed_phy_add() pass -1 as GPIO number
      to the fixed phy driver, and all users of fixed_phy_register()
      pass -1 as GPIO number as well, except for the device
      tree MDIO bus.
      
      Any new users should create a proper device and pass the
      GPIO as a descriptor associated with the device so delete
      the GPIO argument from the calls and drop the code looking
      requesting a GPIO in fixed_phy_add().
      
      In fixed phy_register(), investigate the "fixed-link"
      node and pick the GPIO descriptor from "link-gpios" if
      this property exists. Move the corresponding code out
      of of_mdio.c as the fixed phy code anyways requires
      OF to be in use.
      Tested-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5468e82f
    • T
      net/mlx5: Fix code style issue in mlx driver · fc9c5a4a
      Tonghao Zhang 提交于
      Add the tab before '}' and keep the code style consistent.
      Signed-off-by: NTonghao Zhang <xiangxia.m.yue@gmail.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Acked-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc9c5a4a
    • D
      Merge branch 'sh_eth-implement-simple-RX-checksum-offload' · d3ab9df5
      David S. Miller 提交于
      Sergei Shtylyov says:
      
      ====================
      sh_eth: implement simple RX checksum offload
      
      Here's a set of 7 patches against DaveM's 'net-next.git' repo. I'm implemeting
      the simple RX checksum offload (like was done for the 'ravb' driver by Simon
      Horman); it has been only tested on the R8A7740 and R8A77980 SoCs, the other
      SoCs should just work (according to their manuals)...
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3ab9df5
    • S
      sh_eth: offload RX checksum on SH7763 · 997feb11
      Sergei Shtylyov 提交于
      The SH7763 SoC manual describes the Ether MAC's RX checksum offload
      the same way as it's implemented in the EtherAVB MACs...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      997feb11
    • S
      sh_eth: offload RX checksum on SH7734 · 06240e1b
      Sergei Shtylyov 提交于
      The SH7734 SoC manual describes the Ether MAC's RX checksum offload
      the same way as it's implemented in the EtherAVB MACs...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06240e1b
    • S
      sh_eth: offload RX checksum on R8A77980 · 0da843ad
      Sergei Shtylyov 提交于
      The R-Car V3H (R8A77980) SoC manual describes the Ether MAC's RX checksum
      offload the same way as it's implemented in the EtherAVB MAC...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0da843ad
    • S
      sh_eth: offload RX checksum on R8A7740 · 040c16fd
      Sergei Shtylyov 提交于
      The R-Mobile A1 (R8A7740) SoC manual describes the Ether MAC's RX checksum
      offload the same way as it's implemented in the EtherAVB MAC...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      040c16fd
    • S
      sh_eth: offload RX checksum on R7S72100 · 48132cd0
      Sergei Shtylyov 提交于
      The RZ/A1H (R7S721000) SoC manual describes the Ether MAC's RX checksum
      offload the same way as it's implemented in the EtherAVB MACs...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48132cd0
    • S
      sh_eth: RX checksum offload support · f8e022db
      Sergei Shtylyov 提交于
      Add support for the RX checksum offload. This is enabled by default and
      may be disabled and re-enabled using 'ethtool':
      
      # ethtool -K eth0 rx off
      # ethtool -K eth0 rx on
      
      Some Ether MACs provide a simple checksumming scheme which appears to be
      completely compatible with CHECKSUM_COMPLETE: sum of all packet data after
      the L2 header is appended to packet data; this may be trivially read by
      the driver and used to update the skb accordingly. The same checksumming
      scheme is implemented in the EtherAVB MACs and now supported by the 'ravb'
      driver.
      
      In terms of performance, throughput is close to gigabit line rate with the
      RX checksum offload both enabled and disabled.  The 'perf' output, however,
      appears to indicate that significantly less time is spent in do_csum() --
      this is as expected.
      
      Test results with RX checksum offload enabled:
      
      ~/netperf-2.2pl4# perf record -a ./netperf -t TCP_MAERTS -H 192.168.2.4
      TCP MAERTS TEST to 192.168.2.4
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      
      131072  16384  16384    10.01     933.93
      [ perf record: Woken up 8 times to write data ]
      [ perf record: Captured and wrote 1.955 MB perf.data (41940 samples) ]
      ~/netperf-2.2pl4# perf report
      Samples: 41K of event 'cycles:ppp', Event count (approx.): 9915302763
      Overhead  Command          Shared Object             Symbol
         9.44%  netperf          [kernel.kallsyms]         [k] __arch_copy_to_user
         7.75%  swapper          [kernel.kallsyms]         [k] _raw_spin_unlock_irq
         6.31%  swapper          [kernel.kallsyms]         [k] default_idle_call
         5.89%  swapper          [kernel.kallsyms]         [k] arch_cpu_idle
         4.37%  swapper          [kernel.kallsyms]         [k] tick_nohz_idle_exit
         4.02%  netperf          [kernel.kallsyms]         [k] _raw_spin_unlock_irq
         2.52%  netperf          [kernel.kallsyms]         [k] preempt_count_sub
         1.81%  netperf          [kernel.kallsyms]         [k] tcp_recvmsg
         1.80%  netperf          [kernel.kallsyms]         [k] _raw_spin_unlock_irqres
         1.78%  netperf          [kernel.kallsyms]         [k] preempt_count_add
         1.36%  netperf          [kernel.kallsyms]         [k] __tcp_transmit_skb
         1.20%  netperf          [kernel.kallsyms]         [k] __local_bh_enable_ip
         1.10%  netperf          [kernel.kallsyms]         [k] sh_eth_start_xmit
      
      Test results with RX checksum offload disabled:
      
      ~/netperf-2.2pl4# perf record -a ./netperf -t TCP_MAERTS -H 192.168.2.4
      TCP MAERTS TEST to 192.168.2.4
      Recv   Send    Send
      Socket Socket  Message  Elapsed
      Size   Size    Size     Time     Throughput
      bytes  bytes   bytes    secs.    10^6bits/sec
      131072  16384  16384    10.01     932.04
      [ perf record: Woken up 14 times to write data ]
      [ perf record: Captured and wrote 3.642 MB perf.data (78817 samples) ]
      ~/netperf-2.2pl4# perf report
      Samples: 78K of event 'cycles:ppp', Event count (approx.): 18091442796
      Overhead  Command          Shared Object       Symbol
         7.00%  swapper          [kernel.kallsyms]   [k] do_csum
         3.94%  swapper          [kernel.kallsyms]   [k] sh_eth_poll
         3.83%  ksoftirqd/0      [kernel.kallsyms]   [k] do_csum
         3.23%  swapper          [kernel.kallsyms]   [k] _raw_spin_unlock_irq
         2.87%  netperf          [kernel.kallsyms]   [k] __arch_copy_to_user
         2.86%  swapper          [kernel.kallsyms]   [k] arch_cpu_idle
         2.13%  swapper          [kernel.kallsyms]   [k] default_idle_call
         2.12%  ksoftirqd/0      [kernel.kallsyms]   [k] sh_eth_poll
         2.02%  swapper          [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
         1.84%  swapper          [kernel.kallsyms]   [k] __softirqentry_text_start
         1.64%  swapper          [kernel.kallsyms]   [k] tick_nohz_idle_exit
         1.53%  netperf          [kernel.kallsyms]   [k] _raw_spin_unlock_irq
         1.32%  netperf          [kernel.kallsyms]   [k] preempt_count_sub
         1.27%  swapper          [kernel.kallsyms]   [k] __pi___inval_dcache_area
         1.22%  swapper          [kernel.kallsyms]   [k] check_preemption_disabled
         1.01%  ksoftirqd/0      [kernel.kallsyms]   [k] _raw_spin_unlock_irqrestore
      
      The above results collected on the R-Car V3H Starter Kit board.
      
      Based on the commit 4d86d381 ("ravb: RX checksum offload")...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8e022db
    • S
      sh_eth: rename sh_eth_cpu_data::hw_checksum · 2c2ab5af
      Sergei Shtylyov 提交于
      Commit 62e04b7e ("sh_eth: rename 'sh_eth_cpu_data::hw_crc'") renamed
      the field to 'hw_checksum' for the Ether DMAC "intelligent checksum",
      however some Ether MACs implement a simpler checksumming scheme, so that
      name now seems misleading. Rename that field to 'csmr' as the "intelligent
      checksum" is always controlled by the CSMR register.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c2ab5af
  3. 04 2月, 2019 14 次提交
    • S
      socket: fix for Add SO_TIMESTAMP[NS]_NEW · cc733578
      Stephen Rothwell 提交于
      Fixes: 887feae3 ("socket: Add SO_TIMESTAMP[NS]_NEW")
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc733578
    • J
      netdevice.h: Add __cold to netdev_<level> logging functions · ce3fdb69
      Joe Perches 提交于
      Add __cold to the netdev_<level> logging functions similar to
      the use of __cold in the generic printk function.
      
      Using __cold moves all the netdev_<level> logging functions
      out-of-line possibly improving code locality and runtime
      performance.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce3fdb69
    • D
      net: Fix fall through warning in y2038 tstamp changes. · ff7653f9
      David S. Miller 提交于
      net/core/sock.c: In function 'sock_setsockopt':
      net/core/sock.c:914:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
         sock_set_flag(sk, SOCK_TSTAMP_NEW);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      net/core/sock.c:915:2: note: here
        case SO_TIMESTAMPING_OLD:
        ^~~~
      
      Fixes: 9718475e ("socket: Add SO_TIMESTAMPING_NEW")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff7653f9
    • M
      bpfilter: remove extra header search paths for bpfilter_umh · 303a339f
      Masahiro Yamada 提交于
      Currently, the header search paths -Itools/include and
      -Itools/include/uapi are not used. Let's drop the unused code.
      
      We can remove -I. too by fixing up one C file.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      303a339f
    • D
      Merge branch 'phy-aquantia-improvements' · ee825e8b
      David S. Miller 提交于
      Heiner Kallweit says:
      
      ====================
      net: phy: aquantia: number of improvements
      
      This patch series is based on work from Andrew. I adjusted and added
      certain parts. The series improves few aspects of driver, no functional
      change intended.
      
      v2:
      - add my SoB to patch 1
      - leave kernel.h in in patch 2
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee825e8b
    • H
      net: phy: aquantia: replace magic numbers with constants · 278f6b67
      Heiner Kallweit 提交于
      Replace magic numbers with proper constants. The original patch is
      from Andrew, I extended / adjusted certain parts:
      - Use decimal bit numbers. The datasheet uses hex bit numbers 0 .. F.
      - Order defines from highest to lowest bit numbers
      - correct some typos
      - add constant MDIO_AN_TX_VEND_INT_MASK2_LINK
      - Remove few functional improvements from the patch, they will come as
        a separate patch.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      278f6b67
    • H
      net: phy: aquantia: use macro PHY_ID_MATCH_MODEL · 4d5dfb66
      Heiner Kallweit 提交于
      Make use of macro PHY_ID_MATCH_MODEL to simplify the code.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d5dfb66
    • H
      net: phy: aquantia: remove unneeded includes · 81e6578c
      Heiner Kallweit 提交于
      Remove unneeded header includes.
      
      v2:
      - leave kernel.h in
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81e6578c
    • A
      net: phy: aquantia: Shorten name space prefix to aqr_ · b37ecb59
      Andrew Lunn 提交于
      aquantia_ as a name space prefix is rather long, resulting in lots of
      lines needing wrapping, reducing readability. Use the prefix aqr_
      instead, which fits with the vendor naming there devices aqr107, for
      example.
      
      v2:
      - add SoB from Heiner
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b37ecb59
    • F
      net: Fix ip_mc_{dec,inc}_group allocation context · 9fb20801
      Florian Fainelli 提交于
      After 4effd28c ("bridge: join all-snoopers multicast address"), I
      started seeing the following sleep in atomic warnings:
      
      [   26.763893] BUG: sleeping function called from invalid context at mm/slab.h:421
      [   26.771425] in_atomic(): 1, irqs_disabled(): 0, pid: 1658, name: sh
      [   26.777855] INFO: lockdep is turned off.
      [   26.781916] CPU: 0 PID: 1658 Comm: sh Not tainted 5.0.0-rc4 #20
      [   26.787943] Hardware name: BCM97278SV (DT)
      [   26.792118] Call trace:
      [   26.794645]  dump_backtrace+0x0/0x170
      [   26.798391]  show_stack+0x24/0x30
      [   26.801787]  dump_stack+0xa4/0xe4
      [   26.805182]  ___might_sleep+0x208/0x218
      [   26.809102]  __might_sleep+0x78/0x88
      [   26.812762]  kmem_cache_alloc_trace+0x64/0x28c
      [   26.817301]  igmp_group_dropped+0x150/0x230
      [   26.821573]  ip_mc_dec_group+0x1b0/0x1f8
      [   26.825585]  br_ip4_multicast_leave_snoopers.isra.11+0x174/0x190
      [   26.831704]  br_multicast_toggle+0x78/0xcc
      [   26.835887]  store_bridge_parm+0xc4/0xfc
      [   26.839894]  multicast_snooping_store+0x3c/0x4c
      [   26.844517]  dev_attr_store+0x44/0x5c
      [   26.848262]  sysfs_kf_write+0x50/0x68
      [   26.852006]  kernfs_fop_write+0x14c/0x1b4
      [   26.856102]  __vfs_write+0x60/0x190
      [   26.859668]  vfs_write+0xc8/0x168
      [   26.863059]  ksys_write+0x70/0xc8
      [   26.866449]  __arm64_sys_write+0x24/0x30
      [   26.870458]  el0_svc_common+0xa0/0x11c
      [   26.874291]  el0_svc_handler+0x38/0x70
      [   26.878120]  el0_svc+0x8/0xc
      
      while toggling the bridge's multicast_snooping attribute dynamically.
      
      Pass a gfp_t down to igmpv3_add_delrec(), introduce
      __igmp_group_dropped() and introduce __ip_mc_dec_group() to take a gfp_t
      argument.
      
      Similarly introduce ____ip_mc_inc_group() and __ip_mc_inc_group() to
      allow caller to specify gfp_t.
      
      IPv6 part of the patch appears fine.
      
      Fixes: 4effd28c ("bridge: join all-snoopers multicast address")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9fb20801
    • J
      net: devlink: report cell size of shared buffers · bff5731d
      Jakub Kicinski 提交于
      Shared buffer allocation is usually done in cell increments.
      Drivers will either round up the allocation or refuse the
      configuration if it's not an exact multiple of cell size.
      Drivers know exactly the cell size of shared buffer, so help
      out users by providing this information in dumps.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bff5731d
    • D
      Merge branch 'net-y2038-safe-socket-timestamps' · a98dc6ae
      David S. Miller 提交于
      Deepa Dinamani says:
      
      ====================
      net: y2038-safe socket timestamps
      
      The series introduces new socket timestamps that are
      y2038 safe.
      
      The time data types used for the existing socket timestamp
      options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING
      are not y2038 safe. The series introduces SO_TIMESTAMP_NEW,
      SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace these.
      These new timestamps can be used on all architectures.
      
      The alternative considered was to extend the sys_setsockopt()
      by using the flags. We did not receive any strong opinions about
      either of the approaches. Hence, this was chosen, as glibc folks
      preferred this.
      
      The series does not deal with updating the internal kernel socket
      calls like rxrpc to make them y2038 safe. This will be dealt
      with separately.
      
      Note that the timestamps behavior already does not match the
      man page specific behavior:
      SIOCGSTAMP
          This ioctl should only be used if the socket option SO_TIMESTAMP
      	is not set on the socket. Otherwise, it returns the timestamp of
      	the last packet that was received while SO_TIMESTAMP was not set,
      	or it fails if no such packet has been received,
      	(i.e., ioctl(2) returns -1 with errno set to ENOENT).
      
      The recommendation is to update the man page to remove the above statement.
      
      The overview of the socket timestamp series is as below:
      1. Delete asm specific socket.h when possible.
      2. Support SO/SCM_TIMESTAMP* options only in userspace.
      3. Rename current SO/SCM_TIMESTAMP* to SO/SCM_TIMESTAMP*_OLD.
      3. Alter socket options so that SOCK_RCVTSTAMPNS does
         not rely on SOCK_RCVTSTAMP.
      4. Introduce y2038 safe types for socket timestamp.
      5. Introduce new y2038 safe socket options SO/SCM_TIMESTAMP*_NEW.
      6. Intorduce new y2038 safe socket timeout options.
      
      Changes since v4:
      * Fixed the typo in calling sock_get_timeout()
      
      Changes since v3:
      * Rebased onto net-next and fixups as per review comments
      * Merged the socket timeout series
      * Integrated Arnd's patch to simplify compat handling of timeout syscalls
      
      Changes since v2:
      * Removed extra functions to reduce diff churn as per code review
      
      Changes since v1:
      * Dropped the change to disentangle sock flags
      * Renamed sock_timeval to __kernel_sock_timeval
      * Updated a few comments
      * Added documentation changes
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a98dc6ae
    • D
      sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW · a9beb86a
      Deepa Dinamani 提交于
      Add new socket timeout options that are y2038 safe.
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Cc: ccaulfie@redhat.com
      Cc: davem@davemloft.net
      Cc: deller@gmx.de
      Cc: paulus@samba.org
      Cc: ralf@linux-mips.org
      Cc: rth@twiddle.net
      Cc: cluster-devel@redhat.com
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a9beb86a
    • D
      socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes · 45bdc661
      Deepa Dinamani 提交于
      SO_RCVTIMEO and SO_SNDTIMEO socket options use struct timeval
      as the time format. struct timeval is not y2038 safe.
      The subsequent patches in the series add support for new socket
      timeout options with _NEW suffix that will use y2038 safe
      data structures. Although the existing struct timeval layout
      is sufficiently wide to represent timeouts, because of the way
      libc will interpret time_t based on user defined flag, these
      new flags provide a way of having a structure that is the same
      for all architectures consistently.
      Rename the existing options with _OLD suffix forms so that the
      right option is enabled for userspace applications according
      to the architecture and time_t definition of libc.
      Signed-off-by: NDeepa Dinamani <deepa.kernel@gmail.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Cc: ccaulfie@redhat.com
      Cc: deller@gmx.de
      Cc: paulus@samba.org
      Cc: ralf@linux-mips.org
      Cc: rth@twiddle.net
      Cc: cluster-devel@redhat.com
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arch@vger.kernel.org
      Cc: linux-mips@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45bdc661