16 Jun, 2017

1 commit

  • A common pattern with skb_put() is to just want to memcpy()
    some data into the new space, introduce skb_put_data() for
    this.

    An spatch similar to the one for skb_put_zero() converts many
    of the places using it:

    @@
    identifier p, p2;
    expression len, skb, data;
    type t, t2;
    @@
    (
    -p = skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    |
    -p = (t)skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, len);
    |
    -memcpy(p, data, len);
    )

    @@
    type t, t2;
    identifier p, p2;
    expression skb, data;
    @@
    t *p;
    ...
    (
    -p = skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    |
    -p = (t *)skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, sizeof(*p));
    |
    -memcpy(p, data, sizeof(*p));
    )

    @@
    expression skb, len, data;
    @@
    -memcpy(skb_put(skb, len), data, len);
    +skb_put_data(skb, data, len);

    (again, manually post-processed to retain some comments)

    Reviewed-by: Stephen Hemminger
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

14 Jun, 2017

1 commit


24 Mar, 2017

1 commit


23 Mar, 2017

2 commits

  • The extended device socket cannot turn on/off while system is running.
    So when system boots up and the device is not power on, the fjes driver
    does not need be loaded.

    To check the status of the device, the patch adds ACPI _STA method check.

    Signed-off-by: Yasuaki Ishimatsu
    CC: Taku Izumi
    Signed-off-by: David S. Miller

    Yasuaki Ishimatsu
     
  • The fjes driver is used only by FUJITSU servers and almost of all
    servers in the world never use it. But currently if ACPI PNP0C02
    is defined in the ACPI table, the following message is always shown:

    "FUJITSU Extended Socket Network Device Driver - version 1.2
    - Copyright (c) 2015 FUJITSU LIMITED"

    The message makes users confused because there is no reason that
    the message is shown in other vendor servers.

    To avoid the confusion, the patch adds a check that the server
    has a extended socket device or not.

    Signed-off-by: Yasuaki Ishimatsu
    CC: Taku Izumi
    Signed-off-by: David S. Miller

    Yasuaki Ishimatsu
     

16 Mar, 2017

1 commit

  • This patch fixes netdev->features for Extended Socket network device.

    Currently Extended Socket network device's netdev->feature claims
    NETIF_F_HW_CSUM, however this is completely wrong. There's no feature
    of checksum offloading.
    That causes invalid TCP/UDP checksum and packet rejection when IP
    forwarding from Extended Socket network device to other network device.

    NETIF_F_HW_CSUM should be omitted.

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     

13 Mar, 2017

1 commit


31 Jan, 2017

1 commit

  • napi_complete_done() allows to opt-in for gro_flush_timeout,
    added back in linux-3.19, commit 3b47d30396ba
    ("net: gro: add a per device gro flush timer")

    This allows for more efficient GRO aggregation without
    sacrifying latencies.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

09 Jan, 2017

1 commit

  • The network device operation for reading statistics is only called
    in one place, and it ignores the return value. Having a structure
    return value is potentially confusing because some future driver could
    incorrectly assume that the return value was used.

    Fix all drivers with ndo_get_stats64 to have a void function.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     

21 Oct, 2016

1 commit

  • firewire-net:
    - set min/max_mtu
    - remove fwnet_change_mtu

    nes:
    - set max_mtu
    - clean up nes_netdev_change_mtu

    xpnet:
    - set min/max_mtu
    - remove xpnet_dev_change_mtu

    hippi:
    - set min/max_mtu
    - remove hippi_change_mtu

    batman-adv:
    - set max_mtu
    - remove batadv_interface_change_mtu
    - initialization is a little async, not 100% certain that max_mtu is set
    in the optimal place, don't have hardware to test with

    rionet:
    - set min/max_mtu
    - remove rionet_change_mtu

    slip:
    - set min/max_mtu
    - streamline sl_change_mtu

    um/net_kern:
    - remove pointless ndo_change_mtu

    hsi/clients/ssi_protocol:
    - use core MTU range checking
    - remove now redundant ssip_pn_set_mtu

    ipoib:
    - set a default max MTU value
    - Note: ipoib's actual max MTU can vary, depending on if the device is in
    connected mode or not, so we'll just set the max_mtu value to the max
    possible, and let the ndo_change_mtu function continue to validate any new
    MTU change requests with checks for CM or not. Note that ipoib has no
    min_mtu set, and thus, the network core's mtu > 0 check is the only lower
    bounds here.

    mptlan:
    - use net core MTU range checking
    - remove now redundant mpt_lan_change_mtu

    fddi:
    - min_mtu = 21, max_mtu = 4470
    - remove now redundant fddi_change_mtu (including export)

    fjes:
    - min_mtu = 8192, max_mtu = 65536
    - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to
    get past the core net MTU range checks so fjes_change_mtu can validate a
    new MTU against what it supports (see fjes_support_mtu in fjes_hw.c)

    hsr:
    - min_mtu = 0 (calls ether_setup, max_mtu is 1500)

    f_phonet:
    - min_mtu = 6, max_mtu = 65541

    u_ether:
    - min_mtu = 14, max_mtu = 15412

    phonet/pep-gprs:
    - min_mtu = 576, max_mtu = 65530
    - remove redundant gprs_set_mtu

    CC: netdev@vger.kernel.org
    CC: linux-rdma@vger.kernel.org
    CC: Stefan Richter
    CC: Faisal Latif
    CC: linux-rdma@vger.kernel.org
    CC: Cliff Whickman
    CC: Robin Holt
    CC: Jes Sorensen
    CC: Marek Lindner
    CC: Simon Wunderlich
    CC: Antonio Quartulli
    CC: Sathya Prakash
    CC: Chaitra P B
    CC: Suganath Prabu Subramani
    CC: MPT-FusionLinux.pdl@broadcom.com
    CC: Sebastian Reichel
    CC: Felipe Balbi
    CC: Arvid Brodin
    CC: Remi Denis-Courmont
    Signed-off-by: Jarod Wilson
    Signed-off-by: David S. Miller

    Jarod Wilson
     

18 Oct, 2016

1 commit

  • phys_addr_t may be wider than a pointer and has to be printed
    using the special %pap format string, as pointed out by
    this new warning.

    arch/x86/include/../../../drivers/net/fjes/fjes_trace.h: In function ‘trace_raw_output_fjes_hw_start_debug_req’:
    arch/x86/include/../../../drivers/net/fjes/fjes_trace.h:212:563: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

    Note that this has to pass the address by reference instead of
    casting it to a different type.

    Fixes: b6ba737d0b29 ("fjes: ethtool -w and -W support for fjes driver")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

15 Oct, 2016

6 commits

  • Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     
  • This patch adds debugfs entry to show EP status information.
    You can get each EP's status information like the following:

    # cat /sys/kernel/debug/fjes/fjes.0/status

    EPID STATUS SAME_ZONE CONNECTED
    ep0 shared Y Y
    ep1 - - -
    ep2 unshared N N
    ep3 unshared N N
    ep4 unshared N N
    ep5 unshared N N
    ep6 unshared N N
    ep7 unshared N N

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     
  • This patch adds implementation of supporting
    ethtool -w and -W for fjes driver.

    You can enable and disable firmware debug mode by
    using ethtool -W, and also retrieve firmware
    activity information by using ethtool -w.

    This is useful for debugging.

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     
  • This patch adds tracepoints in fjes driver.
    This is useful for debugging purpose.

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     
  • This patch enhances ethtool -S for fjes driver so that
    EP related statistics can be retrieved.

    The following statistics can be displayed via ethtool -S:

    ep%d_com_regist_buf_exec
    ep%d_com_unregist_buf_exec
    ep%d_send_intr_rx
    ep%d_send_intr_unshare
    ep%d_send_intr_zoneupdate
    ep%d_recv_intr_rx
    ep%d_recv_intr_unshare
    ep%d_recv_intr_stop
    ep%d_recv_intr_zoneupdate
    ep%d_tx_buffer_full
    ep%d_tx_dropped_not_shared
    ep%d_tx_dropped_ver_mismatch
    ep%d_tx_dropped_buf_size_mismatch
    ep%d_tx_dropped_vlanid_mismatch

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     
  • This patch adds implementation of supporting
    ethtool -d for fjes driver. By using ethtool -d,
    you can get registers dump of Exetnded socket device.

    # ethtool -d es0

    Offset Values
    ------ ------
    0x0000: 01 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00
    0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0020: 02 00 00 80 02 00 00 80 64 a6 58 08 07 00 00 00
    0x0030: 00 00 00 00 28 80 00 00 00 00 f9 e3 06 00 00 00
    0x0040: 00 00 00 00 18 00 00 00 80 a4 58 08 07 00 00 00
    0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0080: 00 00 00 00 00 00 e0 7f 00 00 01 00 00 00 01 00
    0x0090: 00 00 00 00

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     

16 Aug, 2016

1 commit


04 Jun, 2016

1 commit

  • alloc_workqueue replaces deprecated create_workqueue().

    The workqueue adapter->txrx_wq has workitem
    &adapter->raise_intr_rxdata_task per adapter. Extended Socket Network
    Device is shared memory based, so someone's transmission denotes other's
    reception. raise_intr_rxdata_task raises interruption of receivers from
    the sender in order to notify receivers.

    The workqueue adapter->control_wq has workitem
    &adapter->interrupt_watch_task per adapter. interrupt_watch_task is used
    to prevent delay of interrupts.

    Dedicated workqueues have been used in both cases since the workitems
    on the workqueues are involved in normal device operation and require
    forward progress under memory pressure.

    max_active has been set to 0 since there is no need for throttling
    the number of active work items.

    Since network devices may be used for memory reclaim,
    WQ_MEM_RECLAIM has been set to guarantee forward progress.

    Signed-off-by: Bhaktipriya Shridhar
    Signed-off-by: David S. Miller

    Bhaktipriya Shridhar
     

10 May, 2016

1 commit

  • commit-bd5a256 introduces a deadlock bug in fjes_change_mtu().
    This spin_lock_irqsave() is obviously unnecessary.

    This patch eliminates unnecessary spin_lock_irqsave() in
    fjes_change_mtu()

    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     

05 May, 2016

2 commits

  • Replace all trans_start updates with netif_trans_update helper.
    change was done via spatch:

    struct net_device *d;
    @@
    - d->trans_start = jiffies
    + netif_trans_update(d)

    Compile tested only.

    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: linux-xtensa@linux-xtensa.org
    Cc: linux1394-devel@lists.sourceforge.net
    Cc: linux-rdma@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: MPT-FusionLinux.pdl@broadcom.com
    Cc: linux-scsi@vger.kernel.org
    Cc: linux-can@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-omap@vger.kernel.org
    Cc: linux-hams@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Cc: linux-wireless@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: devel@driverdev.osuosl.org
    Cc: b.a.t.m.a.n@lists.open-mesh.org
    Cc: linux-bluetooth@vger.kernel.org
    Signed-off-by: Florian Westphal
    Acked-by: Felipe Balbi
    Acked-by: Mugunthan V N
    Acked-by: Antonio Quartulli
    Signed-off-by: David S. Miller

    Florian Westphal
     
  • a trans_start struct member exists twice:
    - in struct net_device (legacy)
    - in struct netdev_queue

    Instead of open-coding dev->trans_start usage to obtain the current
    trans_start value, use dev_trans_start() instead.

    This is not exactly the same, as dev_trans_start also considers
    the trans_start values of the netdev queues owned by the device
    and provides the most recent one.

    For legacy devices this doesn't matter as dev_trans_start can cope
    with netdev trans_start values of 0 (they are ignored).

    This is a prerequisite to eventual removal of dev->trans_start.

    Cc: linux-rdma@vger.kernel.org
    Signed-off-by: Florian Westphal
    Signed-off-by: David S. Miller

    Florian Westphal
     

17 Apr, 2016

6 commits


12 Apr, 2016

1 commit


16 Nov, 2015

1 commit


08 Nov, 2015

1 commit


16 Oct, 2015

1 commit


18 Sep, 2015

1 commit

  • Dan Carpenter reported off-by-one error of fjes at
    http://www.mail-archive.com/netdev@vger.kernel.org/msg77520.html

    Actually this is a bug.
    ep_shm_info[epidx].{es_status, zone} should be update
    inside for loop.

    This patch fixes this bug.

    Reported-by: Dan Carpenter
    Signed-off-by: Taku Izumi
    Signed-off-by: David S. Miller

    Taku Izumi
     

25 Aug, 2015

7 commits