1. 21 Feb, 2017 30 commits
    • Eric Dumazet's avatar
      tcp: Revert "tcp: tcp_probe: use spin_lock_bh()" · 29869d66
      Eric Dumazet authored
      This reverts commit e70ac171.
      
      jtcp_rcv_established() is in fact called with hard irq being disabled.
      
      Initial bug report from Ricardo Nabinger Sanchez [1] still needs
      to be investigated, but does not look like a TCP bug.
      
      [1] https://www.spinics.net/lists/netdev/msg420960.htmlSigned-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarkernel test robot <xiaolong.ye@intel.com>
      Cc: Ricardo Nabinger Sanchez <rnsanchez@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29869d66
    • Tobias Klauser's avatar
      net/hsr: use eth_hw_addr_random() · d4af4c0a
      Tobias Klauser authored
      Use eth_hw_addr_random() to set a random MAC address in order to make sure
      dev->addr_assign_type will be properly set to NET_ADDR_RANDOM.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4af4c0a
    • David S. Miller's avatar
      Merge branch 'mvpp2-next' · 32cc1bb3
      David S. Miller authored
      Thomas Petazzoni says:
      
      ====================
      net: mvpp2: misc improvements and preparation patches
      
      This series contains a number of fixes, misc improvements and
      preparation patches for an upcoming series that adds support for the
      new PPv2.2 network controller to the mvpp2 driver.
      
      The most significant improvements are:
      
       - Switching to using build_skb(), which is necessary for the upcoming
         PPv2.2 support, but anyway a good improvement to the current mvpp2
         driver (supporting PPv2.1).
      
       - Making the driver build on 64-bit platforms.
      
      Changes since v3:
      
       - Addition of a patch "net: mvpp2: fix DMA address calculation in
         mvpp2_txq_inc_put()", which fixes a bug in the driver in the
         calculation of DMA addresses. This bug was found using
         DMA_API_DEBUG.
      
       - Modify the "net: mvpp2: switch to build_skb() in the RX path" patch
         to recalculate the fragment size when the MTU is changed in
         mvpp2_bm_update_mtu().
      
       - Added Acked-by from Russell King on all patches, except:
      
          * "net: mvpp2: fix DMA address calculation in
            mvpp2_txq_inc_put()", because it's a new patch
      
          * "net: mvpp2: switch to build_skb() in the RX path" because I
            modified it since the v3.
      
       - Rebased on top of 4.10.
      
      Changes since v2:
      
       - Fix remaining 64-bit build warning, reported by David Miller.
      
       - Adjust how bit mask related definitions are done in "net: mvpp2:
         simplify MVPP2_PRS_RI_* definitions" according to Russell King
         suggestions.
      
       - Add a patch "net: mvpp2: remove useless arguments in
         mvpp2_rx_{pkts,time}_coal_set", suggested by Russell King.
      
       - Rework mvpp2_rx_time_coal_set() implementation to avoid overflows
         and rounding errors. I've used the implementation suggested by
         Russell King.
      
      Changes since v1:
      
       - This series is split as a separate series from the larger patch set
         adding support for PPv2.2 in the mvpp2 driver, as requested by
         David Miller.
      
       - Rebased on top of v4.10-rc1.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32cc1bb3
    • Thomas Petazzoni's avatar
      net: mvpp2: enable building on 64-bit platforms · d3158807
      Thomas Petazzoni authored
      The mvpp2 is going to be extended to support the Marvell Armada 7K/8K
      platform, which is ARM64. As a preparation to this work, this commit
      enables building the mvpp2 driver on ARM64, by:
      
       - Adjusting the Kconfig dependency
      
       - Fixing the types used in the driver so that they are 32/64-bits
         compliant. We use dma_addr_t for DMA addresses, and unsigned long
         for virtual addresses.
      
      It is worth mentioning that after this commit, the driver is for now
      still only used on 32-bits platforms, and will only work on 32-bits
      platforms.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3158807
    • Thomas Petazzoni's avatar
      net: mvpp2: switch to build_skb() in the RX path · 0e037281
      Thomas Petazzoni authored
      This commit adapts the mvpp2 RX path to use the build_skb() method. Not
      only build_skb() is now the recommended mechanism, but it also
      simplifies the addition of support for the PPv2.2 variant.
      
      Indeed, without build_skb(), we have to keep track for each RX
      descriptor of the physical address of the packet buffer, and the virtual
      address of the SKB. However, in PPv2.2 running on 64 bits platform,
      there is not enough space in the descriptor to store the virtual address
      of the SKB. So having to take care only of the address of the packet
      buffer, and building the SKB upon reception helps in supporting PPv2.2.
      
      The implementation is fairly straightforward:
      
       - mvpp2_skb_alloc() is renamed to mvpp2_buf_alloc() and no longer
         allocates a SKB. Instead, it allocates a buffer using the new
         mvpp2_frag_alloc() function, with enough space for the data and SKB.
      
       - The initialization of the RX buffers in mvpp2_bm_bufs_add() as well
         as the refill of the RX buffers in mvpp2_rx_refill() is adjusted
         accordingly.
      
       - Finally, the mvpp2_rx() is modified to use build_skb().
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e037281
    • Thomas Petazzoni's avatar
      net: mvpp2: simplify MVPP2_PRS_RI_* definitions · 8138affc
      Thomas Petazzoni authored
      Some of the MVPP2_PRS_RI_* definitions use the ~(value) syntax, which
      doesn't compile nicely on 64-bit. Moreover, those definitions are in
      fact unneeded, since they are always used in combination with a bit
      mask that ensures only the appropriate bits are modified.
      
      Therefore, such definitions should just be set to 0x0. In addition, as
      suggested by Russell King, we change the _MASK definitions to also use
      the BIT() macro so that it is clear they are related to the values
      defined afterwards.
      
      For example:
      
       #define MVPP2_PRS_RI_L2_CAST_MASK              0x600
       #define MVPP2_PRS_RI_L2_UCAST                  ~(BIT(9) | BIT(10))
       #define MVPP2_PRS_RI_L2_MCAST                  BIT(9)
       #define MVPP2_PRS_RI_L2_BCAST                  BIT(10)
      
      becomes
      
       #define MVPP2_PRS_RI_L2_CAST_MASK              (BIT(9) | BIT(10))
       #define MVPP2_PRS_RI_L2_UCAST                  0x0
       #define MVPP2_PRS_RI_L2_MCAST                  BIT(9)
       #define MVPP2_PRS_RI_L2_BCAST                  BIT(10)
      
      Because the values (MVPP2_PRS_RI_L2_UCAST, MVPP2_PRS_RI_L2_MCAST and
      MVPP2_PRS_RI_L2_BCAST) are always applied with
      MVPP2_PRS_RI_L2_CAST_MASK, and therefore there is no need for
      MVPP2_PRS_RI_L2_UCAST to be defined as ~(BIT(9) | BIT(10)).
      
      It fixes the following warnings when building the driver on a 64-bit
      platform (which is not possible as of this commit, but will be enabled
      in a follow-up commit):
      
      drivers/net/ethernet/marvell/mvpp2.c: In function ‘mvpp2_prs_mac_promisc_set’:
      drivers/net/ethernet/marvell/mvpp2.c:524:33: warning: large integer implicitly truncated to unsigned type [-Woverflow]
       #define MVPP2_PRS_RI_L2_UCAST   ~(BIT(9) | BIT(10))
                                       ^
      drivers/net/ethernet/marvell/mvpp2.c:1459:33: note: in expansion of macro ‘MVPP2_PRS_RI_L2_UCAST’
         mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L2_UCAST,
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8138affc
    • Thomas Petazzoni's avatar
    • Thomas Petazzoni's avatar
    • Thomas Petazzoni's avatar
      net: mvpp2: simplify mvpp2_bm_bufs_add() · 3eb2d998
      Thomas Petazzoni authored
      The mvpp2_bm_bufs_add() currently creates a fake cookie by calling
      mvpp2_bm_cookie_pool_set(), just to be able to call
      mvpp2_pool_refill(). But all what mvpp2_pool_refill() does is extract
      the pool ID from the cookie, and call mvpp2_bm_pool_put() with this ID.
      
      Instead of doing this convoluted thing, just call mvpp2_bm_pool_put()
      directly, since we have the BM pool ID.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3eb2d998
    • Thomas Petazzoni's avatar
      net: mvpp2: drop useless fields in mvpp2_bm_pool and related code · 7ef7e1d9
      Thomas Petazzoni authored
      This commit drops dead code from the mvpp2 driver. The 'in_use' and
      'in_use_thresh' fields of 'struct mvpp2_bm_pool' are
      incremented/decremented/initialized in various places. But they are only
      used in one place:
      
             if (is_recycle &&
                 (atomic_read(&bm_pool->in_use) < bm_pool->in_use_thresh))
                     return 0;
      
      However 'is_recycle', passed as argument to mvpp2_rx_refill() is always
      false. So in fact, this code is never reached, and the 'is_recycle'
      argument is useless. So let's drop this code.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ef7e1d9
    • Thomas Petazzoni's avatar
      net: mvpp2: remove unused 'tx_skb' field of 'struct mvpp2_tx_queue' · 5dfa9e83
      Thomas Petazzoni authored
      This commit remove a field of 'struct mvpp2_tx_queue' that is not used
      anywhere.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5dfa9e83
    • Thomas Petazzoni's avatar
      net: mvpp2: release reference to txq_cpu[] entry after unmapping · 36fb7435
      Thomas Petazzoni authored
      The mvpp2_txq_bufs_free() function is called upon TX completion to DMA
      unmap TX buffers, and free the corresponding SKBs. It gets the
      references to the SKB to free and the DMA buffer to unmap from a per-CPU
      txq_pcpu data structure.
      
      However, the code currently increments the pointer to the next entry
      before doing the DMA unmap and freeing the SKB. It does not cause any
      visible problem because for a given SKB the TX completion is guaranteed
      to take place on the CPU where the TX was started. However, it is much
      more logical to increment the pointer to the next entry once the current
      entry has been completely unmapped/released.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36fb7435
    • Thomas Petazzoni's avatar
      net: mvpp2: handle too large value in mvpp2_rx_time_coal_set() · ab42676a
      Thomas Petazzoni authored
      When configuring the MVPP2_ISR_RX_THRESHOLD_REG with the RX coalescing
      time threshold, we do not check for the maximum allowed value supported
      by the driver, which means we might overflow and use a bogus value. This
      commit adds a check for this situation, and if a value higher than what
      is supported by the hardware is provided, then we use the maximum value
      supported by the hardware.
      
      In order to achieve this in a way that avoids overflow and rounding
      errors, we introduce two utility functions mvpp2_usec_to_cycles() and
      cycles_to_usec(). Many thanks to Russell King for suggesting this
      implementation.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab42676a
    • Thomas Petazzoni's avatar
      net: mvpp2: handle too large value handling in mvpp2_rx_pkts_coal_set() · f8b0d5f8
      Thomas Petazzoni authored
      Currently, mvpp2_rx_pkts_coal_set() does the following to avoid setting
      a too large value for the RX coalescing by packet number:
      
        val = (pkts & MVPP2_OCCUPIED_THRESH_MASK);
      
      This means that if you set a value that is slightly higher the the
      maximum number of packets, you in fact get a very low value. It makes a
      lot more sense to simply check if the value is too high, and if it's too
      high, limit it to the maximum possible value.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8b0d5f8
    • Thomas Petazzoni's avatar
      net: mvpp2: remove useless arguments in mvpp2_rx_{pkts, time}_coal_set · d63f9e41
      Thomas Petazzoni authored
      As noticed by Russell King, the last argument of
      mvpp2_rx_{pkts,time}_coal_set() is useless, since the packet/time
      coalescing value is already stored in the 'struct mvpp2_rx_queue *'
      passed as argument to these functions. So passing the packet/time value
      as an additional argument, and setting them again in the mvpp2_rx_queue
      structure is useles.
      
      This commit therefore gets rid of this additional argument, assuming the
      caller has assigned the appropriate value to rxq->pkts_coal or
      rxq->time_coal before calling the respective functions.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d63f9e41
    • Thomas Petazzoni's avatar
      net: mvpp2: fix DMA address calculation in mvpp2_txq_inc_put() · 239a3b66
      Thomas Petazzoni authored
      When TX descriptors are filled in, the buffer DMA address is split
      between the tx_desc->buf_phys_addr field (high-order bits) and
      tx_desc->packet_offset field (5 low-order bits).
      
      However, when we re-calculate the DMA address from the TX descriptor in
      mvpp2_txq_inc_put(), we do not take tx_desc->packet_offset into
      account. This means that when the DMA address is not aligned on a 32
      bytes boundary, we end up calling dma_unmap_single() with a DMA address
      that was not the one returned by dma_map_single().
      
      This inconsistency is detected by the kernel when DMA_API_DEBUG is
      enabled. We fix this problem by properly calculating the DMA address in
      mvpp2_txq_inc_put().
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      239a3b66
    • Lee Ryder's avatar
      macsec: fix validation failed in asynchronous operation. · b3bdc3ac
      Lee Ryder authored
      MACSec test failed when asynchronous crypto operations is used. It
      encounters packet validation failed since macsec_skb_cb(skb)->valid
      is always 'false'.
      
      This patch adds missing "macsec_skb_cb(skb)->valid = true" in
      macsec_decrypt_done() when "err == 0".
      Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3bdc3ac
    • Gao Feng's avatar
      net: sock: Use USEC_PER_SEC macro instead of literal 1000000 · 8ccde4c5
      Gao Feng authored
      The USEC_PER_SEC is used once in sock_set_timeout as the max value of
      tv_usec. But there are other similar codes which use the literal
      1000000 in this file.
      It is minor cleanup to keep consitent.
      Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ccde4c5
    • Jason Wang's avatar
      virtio-net: switch to use build_skb() for small buffer · f6b10209
      Jason Wang authored
      This patch switch to use build_skb() for small buffer which can have
      better performance for both TCP and XDP (since we can work at page
      before skb creation). It also remove lots of XDP codes since both
      mergeable and small buffer use page frag during refill now.
      
                             Before   | After
      XDP_DROP(xdp1) 64B  :  11.1Mpps | 14.4Mpps
      
      Tested with xdp1/xdp2/xdp_ip_tx_tunnel and netperf.
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f6b10209
    • Paolo Abeni's avatar
      ip: fix IP_CHECKSUM handling · ca4ef457
      Paolo Abeni authored
      The skbs processed by ip_cmsg_recv() are not guaranteed to
      be linear e.g. when sending UDP packets over loopback with
      MSGMORE.
      Using csum_partial() on [potentially] the whole skb len
      is dangerous; instead be on the safe side and use skb_checksum().
      
      Thanks to syzkaller team to detect the issue and provide the
      reproducer.
      
      v1 -> v2:
       - move the variable declaration in a tighter scope
      
      Fixes: ad6f939a ("ip: Add offset parameter to ip_cmsg_recv")
      Reported-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca4ef457
    • Roopa Prabhu's avatar
      vxlan: remove unused variable saddr in neigh_reduce · 8dcd81a9
      Roopa Prabhu authored
      silences the below warning:
          drivers/net/vxlan.c: In function ‘neigh_reduce’:
          drivers/net/vxlan.c:1599:25: warning: variable ‘saddr’ set but not used
          [-Wunused-but-set-variable]
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8dcd81a9
    • Roopa Prabhu's avatar
      vxlan: add changelink support · 8bcdc4f3
      Roopa Prabhu authored
      This patch adds changelink rtnl op support for vxlan netdevs.
      code changes involve:
          - refactor vxlan_newlink into vxlan_nl2conf to be
          used by vxlan_newlink and vxlan_changelink
          - vxlan_nl2conf and vxlan_dev_configure take a
          changelink argument to isolate changelink checks
          and updates.
          - Allow changing only a few attributes:
              - return -EOPNOTSUPP for attributes that cannot
              be changed for now. Incremental patches can
              make the non-supported one available in the future
              if needed.
      Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8bcdc4f3
    • Tobias Klauser's avatar
      rtnl: simplify error return path in rtnl_create_link() · d1892e4e
      Tobias Klauser authored
      There is only one possible error path which reaches the err label, so
      return ERR_PTR(-ENOMEM) directly if alloc_netdev_mqs() fails. This also
      allows to omit the err variable.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1892e4e
    • Jason Wang's avatar
      virito-net: set queues after reset during xdp_set · 017b29c3
      Jason Wang authored
      We set queues before reset which will cause a crash[1]. This is
      because is_xdp_raw_buffer_queue() depends on the old xdp queue pairs
      number to do the correct detection. So fix this by
      
      - passing xdp queue pairs and current queue pairs to virtnet_reset()
      - change vi->xdp_qp after reset but before refill, to make sure both
        free_unused_bufs() and refill can make correct detection of XDP.
      - remove the duplicated queue pairs setting before virtnet_reset()
        since we will do it inside virtnet_reset()
      
      [1]
      
      [   74.328168] general protection fault: 0000 [#1] SMP
      [   74.328625] Modules linked in: nfsd xfs libcrc32c virtio_net virtio_pci
      [   74.329117] CPU: 0 PID: 2849 Comm: xdp2 Not tainted 4.10.0-rc7+ #499
      [   74.329577] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
      [   74.330424] task: ffff88007a894000 task.stack: ffffc90004388000
      [   74.330844] RIP: 0010:skb_release_head_state+0x28/0x80
      [   74.331298] RSP: 0018:ffffc9000438b8d0 EFLAGS: 00010206
      [   74.331676] RAX: 0000000000000000 RBX: ffff88007ad96300 RCX: 0000000000000000
      [   74.332217] RDX: ffff88007fc137a8 RSI: ffff88007fc0db28 RDI: 0001bf00000001be
      [   74.332758] RBP: ffffc9000438b8d8 R08: 000000000005008f R09: 00000000000005f9
      [   74.333274] R10: ffff88007d001700 R11: ffffffff820a8a4d R12: ffff88007ad96300
      [   74.333787] R13: 0000000000000002 R14: ffff880036604000 R15: 000077ff80000000
      [   74.334308] FS:  00007fc70d8a7b40(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000
      [   74.334891] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   74.335314] CR2: 00007fff4144a710 CR3: 000000007ab56000 CR4: 00000000003406f0
      [   74.335830] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   74.336373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   74.336895] Call Trace:
      [   74.337086]  skb_release_all+0xd/0x30
      [   74.337356]  consume_skb+0x2c/0x90
      [   74.337607]  free_unused_bufs+0x1ff/0x270 [virtio_net]
      [   74.337988]  ? vp_synchronize_vectors+0x3b/0x60 [virtio_pci]
      [   74.338398]  virtnet_xdp+0x21e/0x440 [virtio_net]
      [   74.338741]  dev_change_xdp_fd+0x101/0x140
      [   74.339048]  do_setlink+0xcf4/0xd20
      [   74.339304]  ? symcmp+0xf/0x20
      [   74.339529]  ? mls_level_isvalid+0x52/0x60
      [   74.339828]  ? mls_range_isvalid+0x43/0x50
      [   74.340135]  ? nla_parse+0xa0/0x100
      [   74.340400]  rtnl_setlink+0xd4/0x120
      [   74.340664]  ? cpumask_next_and+0x30/0x50
      [   74.340966]  rtnetlink_rcv_msg+0x7f/0x1f0
      [   74.341259]  ? sock_has_perm+0x59/0x60
      [   74.341586]  ? napi_consume_skb+0xe2/0x100
      [   74.342010]  ? rtnl_newlink+0x890/0x890
      [   74.342435]  netlink_rcv_skb+0x92/0xb0
      [   74.342846]  rtnetlink_rcv+0x23/0x30
      [   74.343277]  netlink_unicast+0x162/0x210
      [   74.343677]  netlink_sendmsg+0x2db/0x390
      [   74.343968]  sock_sendmsg+0x33/0x40
      [   74.344233]  SYSC_sendto+0xee/0x160
      [   74.344482]  ? SYSC_bind+0xb0/0xe0
      [   74.344806]  ? sock_alloc_file+0x92/0x110
      [   74.345106]  ? fd_install+0x20/0x30
      [   74.345360]  ? sock_map_fd+0x3f/0x60
      [   74.345586]  SyS_sendto+0x9/0x10
      [   74.345790]  entry_SYSCALL_64_fastpath+0x1a/0xa9
      [   74.346086] RIP: 0033:0x7fc70d1b8f6d
      [   74.346312] RSP: 002b:00007fff4144a708 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
      [   74.346785] RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007fc70d1b8f6d
      [   74.347244] RDX: 000000000000002c RSI: 00007fff4144a720 RDI: 0000000000000003
      [   74.347683] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
      [   74.348544] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff4144bd90
      [   74.349082] R13: 0000000000000002 R14: 0000000000000002 R15: 00007fff4144cda0
      [   74.349607] Code: 00 00 00 55 48 89 e5 53 48 89 fb 48 8b 7f 58 48 85 ff 74 0e 40 f6 c7 01 74 3d 48 c7 43 58 00 00 00 00 48 8b 7b 68 48 85 ff 74 05 <f0> ff 0f 74 20 48 8b 43 60 48 85 c0 74 14 65 8b 15 f3 ab 8d 7e
      [   74.351008] RIP: skb_release_head_state+0x28/0x80 RSP: ffffc9000438b8d0
      [   74.351625] ---[ end trace fe6e19fd11cfc80b ]---
      
      Fixes: 2de2f7f4 ("virtio_net: XDP support for adjust_head")
      Cc: John Fastabend <john.fastabend@gmail.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      017b29c3
    • Michael Walle's avatar
      dpaa_eth: implement ioctl() for PHY-related ops · 1763413a
      Michael Walle authored
      This commit adds the ndo_do_ioctl() callback which allows the userspace to
      access PHY registers, for example. This will make mii-diag and similar
      tools work.
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1763413a
    • Philippe Reynes's avatar
      net: qualcomm: qca: use new api ethtool_{get|set}_link_ksettings · 2cf8a897
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2cf8a897
    • David S. Miller's avatar
      Merge branch 'bnxt_en-probe-and-open-bugs' · 836dacdd
      David S. Miller authored
      Michael Chan says:
      
      ====================
      bnxt_en: Fix probe and open bugs.
      
      Fix 3 issues related to bnxt_init_one() and bnxt_open().  Don't probe
      bridge devices and fixup some error code paths.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      836dacdd
    • Sathya Perla's avatar
      bnxt_en: fix pci cleanup in bnxt_init_one() failure path · 17086399
      Sathya Perla authored
      In the bnxt_init_one() failure path, bar1 and bar2 are not
      being unmapped.  This commit fixes this issue.  Reorganize the
      code so that bnxt_init_one()'s failure path and bnxt_remove_one()
      can call the same function to do the PCI cleanup.
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      17086399
    • Michael Chan's avatar
      bnxt_en: Fix NULL pointer dereference in a failure path during open. · daf1f1e7
      Michael Chan authored
      If bnxt_hwrm_ring_free() is called during a failure path in bnxt_open(),
      it is possible that the completion rings have not been allocated yet.
      In that case, the completion doorbell has not been initialized, and
      calling bnxt_disable_int() will crash.  Fix it by checking that the
      completion ring has been initialized before writing to the completion
      ring doorbell.
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      daf1f1e7
    • Ray Jui's avatar
      bnxt_en: Reject driver probe against all bridge devices · 4e00338a
      Ray Jui authored
      There are additional SoC devices that use the same device ID for
      bridge and NIC devices.  The bnxt driver should reject probe against
      all bridge devices since it's meant to be used with only endpoint
      devices.
      Signed-off-by: default avatarRay Jui <ray.jui@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e00338a
  2. 20 Feb, 2017 10 commits