01 Nov, 2018

2 commits

  • Replace the elaborate private structure global linked-list used in
    ntb_netdev_probe() and ntb_netdev_remove() by stashing our private
    data in the NTB transport client device.

    Signed-off-by: Aaron Sierra
    Reviewed-by: Logan Gunthorpe
    Signed-off-by: Jon Mason

    Aaron Sierra
     
  • The tx_time should be in usecs (according to the comment above the
    variable), but the setting of the timer during the rearming is done in
    msecs. Change it to match the expected units.

    Fixes: e74bfeedad08 ("NTB: Add flow control to the ntb_netdev")
    Suggested-by: Gerd W. Haeussler
    Signed-off-by: Jon Mason
    Acked-by: Dave Jiang

    Jon Mason
     

23 Jun, 2018

1 commit

  • random_ether_addr is a #define for eth_random_addr which is
    generally preferred in kernel code by ~3:1

    Convert the uses of random_ether_addr to enable removing the #define

    Miscellanea:

    o Convert &vfmac[0] to equivalent vfmac and avoid unnecessary line wrap

    Signed-off-by: Joe Perches
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Joe Perches
     

01 Nov, 2017

1 commit

  • In preparation for unconditionally passing the struct timer_list pointer to
    all timer callbacks, switch to using the new timer_setup() and from_timer()
    to pass the timer pointer explicitly.

    Cc: Jon Mason
    Cc: Dave Jiang
    Cc: Allen Hubbe
    Cc: linux-ntb@googlegroups.com
    Cc: netdev@vger.kernel.org
    Signed-off-by: Kees Cook
    Signed-off-by: David S. Miller

    Kees Cook
     

06 Jul, 2017

1 commit

  • At present, ntb_netdev devices end up under /sys/devices/virtual/net
    completely unconnected to the ntb trees below them. This patch sets the
    parent of the net_device (using SET_NETDEV_DEV) to the client_dev
    device. This results in a better connected sysfs path for the network
    device:

    /sys/devices/pci0000:00/0000:00:03.0/0000:03:00.1/0000:03:00.1/ntb_netdev0/net/eth2

    Signed-off-by: Logan Gunthorpe
    Acked-by: Allen Hubbe
    Signed-off-by: Jon Mason

    Logan Gunthorpe
     

14 Mar, 2017

1 commit


21 Oct, 2016

1 commit

  • geneve:
    - Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu
    - This one isn't quite as straight-forward as others, could use some
    closer inspection and testing

    macvlan:
    - set min/max_mtu

    tun:
    - set min/max_mtu, remove tun_net_change_mtu

    vxlan:
    - Merge __vxlan_change_mtu back into vxlan_change_mtu
    - Set max_mtu to IP_MAX_MTU and retain dynamic MTU range checks in
    change_mtu function
    - This one is also not as straight-forward and could use closer inspection
    and testing from vxlan folks

    bridge:
    - set max_mtu of IP_MAX_MTU and retain dynamic MTU range checks in
    change_mtu function

    openvswitch:
    - set min/max_mtu, remove internal_dev_change_mtu
    - note: max_mtu wasn't checked previously, it's been set to 65535, which
    is the largest possible size supported

    sch_teql:
    - set min/max_mtu (note: max_mtu previously unchecked, used max of 65535)

    macsec:
    - min_mtu = 0, max_mtu = 65535

    macvlan:
    - min_mtu = 0, max_mtu = 65535

    ntb_netdev:
    - min_mtu = 0, max_mtu = 65535

    veth:
    - min_mtu = 68, max_mtu = 65535

    8021q:
    - min_mtu = 0, max_mtu = 65535

    CC: netdev@vger.kernel.org
    CC: Nicolas Dichtel
    CC: Hannes Frederic Sowa
    CC: Tom Herbert
    CC: Daniel Borkmann
    CC: Alexander Duyck
    CC: Paolo Abeni
    CC: Jiri Benc
    CC: WANG Cong
    CC: Roopa Prabhu
    CC: Pravin B Shelar
    CC: Sabrina Dubroca
    CC: Patrick McHardy
    CC: Stephen Hemminger
    CC: Pravin Shelar
    CC: Maxim Krasnyansky
    Signed-off-by: Jarod Wilson
    Signed-off-by: David S. Miller

    Jarod Wilson
     

08 Sep, 2015

1 commit

  • Right now if we push the NTB really hard, we start dropping packets due
    to not able to process the packets fast enough. We need to st:qop the
    upper layer from flooding us when that happens.

    A timer is necessary in order to restart the queue once the resource has
    been processed on the receive side. Due to the way NTB is setup, the
    resources on the tx side are tied to the processing of the rx side and
    there's no async way to know when the rx side has released those
    resources.

    Signed-off-by: Dave Jiang
    Signed-off-by: Jon Mason

    Dave Jiang
     

10 Aug, 2015

2 commits

  • ntb_netdev is allowing the link to come up even when -ENOMEM is returned
    from ntb_transport_rx_enqueue. Fix to cover all possible errors.

    Signed-off-by: Dave Jiang
    Signed-off-by: Jon Mason

    Dave Jiang
     
  • It was possible for a synchronous update of the RX index in the error
    case to get ahead of the asynchronous RX index update in the normal
    case. Change the RX processing to preserve an RX completion order.

    There were two error cases. First, if a buffer is not present to
    receive data, there would be no queue entry to preserve the RX
    completion order. Instead of dropping the RX frame, leave the RX frame
    in the ring. Schedule RX processing when RX entries are enqueued, in
    case there are RX frames waiting in the ring to be received.

    Second, if a buffer is too small to receive data, drop the frame in the
    ring, mark the RX entry as done, and indicate the error in the RX entry
    length. Check for a negative length in the receive callback in
    ntb_netdev, and count occurrences as rx_length_errors.

    Signed-off-by: Allen Hubbe
    Signed-off-by: Jon Mason

    Allen Hubbe
     

05 Jul, 2015

1 commit


02 Jul, 2015

1 commit

  • This patch only moves files to their new locations, before applying the
    next two patches adding the NTB Abstraction layer. Splitting this patch
    from the next is intended make distinct which code is changed only due
    to moving the files, versus which are substantial code changes in adding
    the NTB Abstraction layer.

    Signed-off-by: Allen Hubbe
    Signed-off-by: Jon Mason

    Allen Hubbe
     

07 Jun, 2014

1 commit


14 May, 2014

1 commit

  • net: get rid of SET_ETHTOOL_OPS

    Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone.
    This does that.

    Mostly done via coccinelle script:
    @@
    struct ethtool_ops *ops;
    struct net_device *dev;
    @@
    - SET_ETHTOOL_OPS(dev, ops);
    + dev->ethtool_ops = ops;

    Compile tested only, but I'd seriously wonder if this broke anything.

    Suggested-by: Dave Miller
    Signed-off-by: Wilfried Klaebe
    Acked-by: Felipe Balbi
    Signed-off-by: David S. Miller

    Wilfried Klaebe
     

08 Apr, 2014

4 commits


16 May, 2013

1 commit

  • The ntb_netdev device is not removed from the global list of devices
    upon device removal. If the device is re-added, the removal code would
    find the first instance and try to remove an already removed device.

    Signed-off-by: Jon Mason

    Jon Mason
     

21 Jan, 2013

5 commits


18 Jan, 2013

2 commits