1. 08 5月, 2018 7 次提交
  2. 07 5月, 2018 9 次提交
  3. 05 5月, 2018 1 次提交
  4. 04 5月, 2018 23 次提交
    • E
      net/mlx4_en: optimizes get_fixed_ipv6_csum() · 2d943adf
      Eric Dumazet 提交于
      While trying to support CHECKSUM_COMPLETE for IPV6 fragments,
      I had to experiments various hacks in get_fixed_ipv6_csum().
      I must admit I could not find how to implement this :/
      
      However, get_fixed_ipv6_csum() does a lot of redundant operations,
      calling csum_partial() twice.
      
      First csum_partial() computes the checksum of saddr and daddr,
      put in @csum_pseudo_hdr. Undone later in the second csum_partial()
      computed on whole ipv6 header.
      
      Then nexthdr is added once, added a second time, then substracted.
      
      payload_len is added once, then substracted.
      
      Really all this can be reduced to two add_csum(), to add back 6 bytes
      that were removed by mlx4 when providing hw_checksum in RX descriptor.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Saeed Mahameed <saeedm@mellanox.com>
      Cc: Tariq Toukan <tariqt@mellanox.com>
      Reviewed-by: NSaeed Mahameed <saeedm@mellanox.com>
      Acked-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d943adf
    • D
      Merge branch 'smc-splice-implementation' · a8d7d124
      David S. Miller 提交于
      Ursula Braun says:
      
      ====================
      net/smc: splice implementation
      
      Stefan comes up with an smc implementation for splice(). The first
      three patches are preparational patches, the 4th patch implements
      splice().
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8d7d124
    • S
      smc: add support for splice() · 9014db20
      Stefan Raspl 提交于
      Provide an implementation for splice() when we are using SMC. See
      smc_splice_read() for further details.
      Signed-off-by: NStefan Raspl <raspl@linux.ibm.com>
      Signed-off-by: Ursula Braun <ubraun@linux.ibm.com><
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9014db20
    • S
      smc: allocate RMBs as compound pages · 2ef4f27a
      Stefan Raspl 提交于
      Preparatory work for splice() support.
      Signed-off-by: NStefan Raspl <raspl@linux.ibm.com>
      Signed-off-by: Ursula Braun <ubraun@linux.ibm.com><
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ef4f27a
    • S
      smc: make smc_rx_wait_data() generic · b51fa1b1
      Stefan Raspl 提交于
      Turn smc_rx_wait_data into a generic function that can be used at various
      instances to wait on traffic to complete with varying criteria.
      Signed-off-by: NStefan Raspl <raspl@linux.ibm.com>
      Signed-off-by: Ursula Braun <ubraun@linux.ibm.com><
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b51fa1b1
    • S
      smc: simplify abort logic · c8b8ec8e
      Stefan Raspl 提交于
      Some of the conditions to exit recv() are common in two pathes - cleaning up
      code by moving the check up so we have it only once.
      Signed-off-by: NStefan Raspl <raspl@linux.ibm.com>
      Signed-off-by: Ursula Braun <ubraun@linux.ibm.com><
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8b8ec8e
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a7b15ab8
      David S. Miller 提交于
      Overlapping changes in selftests Makefile.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7b15ab8
    • D
      Merge branch 'sh_eth-complain-on-access-to-unimplemented-TSU-registers' · b05f03b2
      David S. Miller 提交于
      Sergei Shtylyov says:
      
      ====================
      sh_eth: complain on access to unimplemented TSU registers
      
      Here's a set of 2 patches against DaveM's 'net-next.git' repo. The 1st patch
      routes TSU_POST<n> register accesses thru sh_eth_tsu_{read|write}() and the 2nd
      added WARN_ON() unimplemented register to those functions. I'm going to deal with
      TSU_ADR{H|L}<n> registers in a later series...
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b05f03b2
    • S
      sh_eth: WARN_ON() access to unimplemented TSU register · 627a0d20
      Sergei Shtylyov 提交于
      Commit 3365711d ("sh_eth: WARN on access to a register not implemented
      in a particular chip") added  WARN_ON() to sh_eth_{read|write}() but not
      to sh_eth_tsu_{read|write}(). Now that we've routed almost all TSU register
      accesses  (except TSU_ADR{H|L}<n> -- which are special) thru the latter
      pair of accessors, it makes sense to check for the unimplemented TSU
      registers as well...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      627a0d20
    • S
      sh_eth: use TSU register accessors for TSU_POST<n> · 77cb065f
      Sergei Shtylyov 提交于
      There's no particularly good reason TSU_POST<n> registers get accessed
      circumventing sh_eth_tsu_{read|write}() -- start using those, removing
      (badly named) sh_eth_tsu_get_post_reg_offset(),  while at it...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      77cb065f
    • L
      Merge tag 'linux-kselftest-4.17-rc4' of... · 15042698
      Linus Torvalds 提交于
      Merge tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "This Kselftest update for 4.17-rc4 consists of a fix for a syntax
        error in the script that runs selftests. Mathieu Desnoyers found this
        bug in the script on systems running GNU Make 3.8 or older"
      
      * tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: Fix lib.mk run_tests target shell script
      15042698
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e523a256
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Various sockmap fixes from John Fastabend (pinned map handling,
          blocking in recvmsg, double page put, error handling during redirect
          failures, etc.)
      
       2) Fix dead code handling in x86-64 JIT, from Gianluca Borello.
      
       3) Missing device put in RDS IB code, from Dag Moxnes.
      
       4) Don't process fast open during repair mode in TCP< from Yuchung
          Cheng.
      
       5) Move address/port comparison fixes in SCTP, from Xin Long.
      
       6) Handle add a bond slave's master into a bridge properly, from
          Hangbin Liu.
      
       7) IPv6 multipath code can operate on unitialized memory due to an
          assumption that the icmp header is in the linear SKB area. Fix from
          Eric Dumazet.
      
       8) Don't invoke do_tcp_sendpages() recursively via TLS, from Dave
          Watson.
      
      9) Fix memory leaks in x86-64 JIT, from Daniel Borkmann.
      
      10) RDS leaks kernel memory to userspace, from Eric Dumazet.
      
      11) DCCP can invoke a tasklet on a freed socket, take a refcount. Also
          from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (78 commits)
        dccp: fix tasklet usage
        smc: fix sendpage() call
        net/smc: handle unregistered buffers
        net/smc: call consolidation
        qed: fix spelling mistake: "offloded" -> "offloaded"
        net/mlx5e: fix spelling mistake: "loobpack" -> "loopback"
        tcp: restore autocorking
        rds: do not leak kernel memory to user land
        qmi_wwan: do not steal interfaces from class drivers
        ipv4: fix fnhe usage by non-cached routes
        bpf: sockmap, fix error handling in redirect failures
        bpf: sockmap, zero sg_size on error when buffer is released
        bpf: sockmap, fix scatterlist update on error path in send with apply
        net_sched: fq: take care of throttled flows before reuse
        ipv6: Revert "ipv6: Allow non-gateway ECMP for IPv6"
        bpf, x64: fix memleak when not converging on calls
        bpf, x64: fix memleak when not converging after image
        net/smc: restrict non-blocking connect finish
        8139too: Use disable_irq_nosync() in rtl8139_poll_controller()
        sctp: fix the issue that the cookie-ack with auth can't get processed
        ...
      e523a256
    • L
      Merge branch 'parisc-4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · bb609316
      Linus Torvalds 提交于
      Pull parisc fixes from Helge Deller:
       "Fix two section mismatches, convert to read_persistent_clock64(), add
        further documentation regarding the HPMC crash handler and make
        bzImage the default build target"
      
      * 'parisc-4.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix section mismatches
        parisc: drivers.c: Fix section mismatches
        parisc: time: Convert read_persistent_clock() to read_persistent_clock64()
        parisc: Document rules regarding checksum of HPMC handler
        parisc: Make bzImage default build target
      bb609316
    • E
      dccp: fix tasklet usage · a8d7aa17
      Eric Dumazet 提交于
      syzbot reported a crash in tasklet_action_common() caused by dccp.
      
      dccp needs to make sure socket wont disappear before tasklet handler
      has completed.
      
      This patch takes a reference on the socket when arming the tasklet,
      and moves the sock_put() from dccp_write_xmit_timer() to dccp_write_xmitlet()
      
      kernel BUG at kernel/softirq.c:514!
      invalid opcode: 0000 [#1] SMP KASAN
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Modules linked in:
      CPU: 1 PID: 17 Comm: ksoftirqd/1 Not tainted 4.17.0-rc3+ #30
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:tasklet_action_common.isra.19+0x6db/0x700 kernel/softirq.c:515
      RSP: 0018:ffff8801d9b3faf8 EFLAGS: 00010246
      dccp_close: ABORT with 65423 bytes unread
      RAX: 1ffff1003b367f6b RBX: ffff8801daf1f3f0 RCX: 0000000000000000
      RDX: ffff8801cf895498 RSI: 0000000000000004 RDI: 0000000000000000
      RBP: ffff8801d9b3fc40 R08: ffffed0039f12a95 R09: ffffed0039f12a94
      dccp_close: ABORT with 65423 bytes unread
      R10: ffffed0039f12a94 R11: ffff8801cf8954a3 R12: 0000000000000000
      R13: ffff8801d9b3fc18 R14: dffffc0000000000 R15: ffff8801cf895490
      FS:  0000000000000000(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000001b2bc28000 CR3: 00000001a08a9000 CR4: 00000000001406e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       tasklet_action+0x1d/0x20 kernel/softirq.c:533
       __do_softirq+0x2e0/0xaf5 kernel/softirq.c:285
      dccp_close: ABORT with 65423 bytes unread
       run_ksoftirqd+0x86/0x100 kernel/softirq.c:646
       smpboot_thread_fn+0x417/0x870 kernel/smpboot.c:164
       kthread+0x345/0x410 kernel/kthread.c:238
       ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412
      Code: 48 8b 85 e8 fe ff ff 48 8b 95 f0 fe ff ff e9 94 fb ff ff 48 89 95 f0 fe ff ff e8 81 53 6e 00 48 8b 95 f0 fe ff ff e9 62 fb ff ff <0f> 0b 48 89 cf 48 89 8d e8 fe ff ff e8 64 53 6e 00 48 8b 8d e8
      RIP: tasklet_action_common.isra.19+0x6db/0x700 kernel/softirq.c:515 RSP: ffff8801d9b3faf8
      
      Fixes: dc841e30 ("dccp: Extend CCID packet dequeueing interface")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: Nsyzbot <syzkaller@googlegroups.com>
      Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
      Cc: dccp@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8d7aa17
    • D
      Merge branch 'smc-fixes' · 31140b47
      David S. Miller 提交于
      Ursula Braun says:
      
      ====================
      net/smc: fixes 2018/05/03
      
      here are smc fixes for 2 problems:
       * receive buffers in SMC must be registered. If registration fails
         these buffers must not be kept within the link group for reuse.
         Patch 1 is a preparational patch; patch 2 contains the fix.
       * sendpage: do not hold the sock lock when calling kernel_sendpage()
                   or sock_no_sendpage()
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31140b47
    • S
      smc: fix sendpage() call · bda27ff5
      Stefan Raspl 提交于
      The sendpage() call grabs the sock lock before calling the default
      implementation - which tries to grab it once again.
      Signed-off-by: NStefan Raspl <raspl@linux.ibm.com>
      Signed-off-by: Ursula Braun <ubraun@linux.ibm.com><
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bda27ff5
    • K
      net/smc: handle unregistered buffers · a6920d1d
      Karsten Graul 提交于
      When smc_wr_reg_send() fails then tag (regerr) the affected buffer and
      free it in smc_buf_unuse().
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6920d1d
    • K
      net/smc: call consolidation · e63a5f8c
      Karsten Graul 提交于
      Consolidate the call to smc_wr_reg_send() in a new function.
      No functional changes.
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e63a5f8c
    • C
      qed: fix spelling mistake: "offloded" -> "offloaded" · df80b8fb
      Colin Ian King 提交于
      Trivial fix to spelling mistake in DP_NOTICE message
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df80b8fb
    • D
      Merge branch 'bridge-FDB-Notify-about-removal-of-non-user-added-entries' · 62264f99
      David S. Miller 提交于
      Petr Machata says:
      
      ====================
      bridge: FDB: Notify about removal of non-user-added entries
      
      Device drivers may generally need to keep in sync with bridge's FDB. In
      particular, for its offload of tc mirror action where the mirrored-to
      device is a gretap device, mlxsw needs to listen to a number of events,
      FDB events among the others. SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE would be
      a natural notification in that case.
      
      However, for removal of FDB entries added due to device activity (as
      opposed to explicit addition through "bridge fdb add" or similar), there
      are no notifications.
      
      Thus in patch #1, add the "added_by_user" field to switchdev
      notifications sent for FDB activity. Adapt drivers to ignore activity on
      non-user-added entries, to maintain the current behavior. Specifically
      in case of mlxsw, allow mlxsw_sp_span_respin() call for any and all FDB
      updates.
      
      In patch #2, change the bridge driver to actually emit notifications for
      these FDB entries. Take care not to send notification for bridge
      updates that itself originate in SWITCHDEV_FDB_*_TO_BRIDGE events.
      
      Changes from v1 to v2:
      - Instead of introducing a new variant of fdb_delete(), add a new
        parameter to the existing function.
      - Name the parameter swdev_notify, not notify.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      62264f99
    • P
      net: bridge: Notify about !added_by_user FDB entries · 161d82de
      Petr Machata 提交于
      Do not automatically bail out on sending notifications about activity on
      non-user-added FDB entries. Instead, notify about this activity except
      for cases where the activity itself originates in a notification, to
      avoid sending duplicate notifications.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: NIvan Vecera <ivecera@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      161d82de
    • P
      switchdev: Add fdb.added_by_user to switchdev notifications · 816a3bed
      Petr Machata 提交于
      The following patch enables sending notifications also for events on FDB
      entries that weren't added by the user. Give the drivers the information
      necessary to distinguish between the two origins of FDB entries.
      
      To maintain the current behavior, have switchdev-implementing drivers
      bail out on notifications about non-user-added FDB entries. In case of
      mlxsw driver, allow a call to mlxsw_sp_span_respin() so that SPAN over
      bridge catches up with the changed FDB.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: NIvan Vecera <ivecera@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      816a3bed
    • D
      Merge branch 'mlxsw-Introduce-support-for-CQEv1-2' · 0e913f28
      David S. Miller 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Introduce support for CQEv1/2
      
      Jiri says:
      
      Current SwitchX2 and Spectrum FWs support CQEv0 and that is what we
      implement in mlxsw. Spectrum FW also supports CQE v1 and v2.
      However, Spectrum-2 won't support CQEv0. Prepare for it and setup the
      CQE versions to use according to what is queried from FW.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e913f28