11 Dec, 2010

1 commit

  • While an interface is down, many implementations of
    ethtool_ops::get_link, including the default, ethtool_op_get_link(),
    will report the last link state seen while the interface was up. In
    general the current physical link state is not available if the
    interface is down.

    Define ETHTOOL_GLINK to reflect whether the interface *and* any
    physical port have a working link, and consistently return 0 when the
    interface is down.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

21 Oct, 2010

1 commit

  • Now that vlan acceleration is handled consistently regardless of usage,
    it is possible to enable and disable it at will. This adds support for
    Ethtool operations that change the offloading status for debugging
    purposes, similar to other forms of hardware acceleration.

    Signed-off-by: Jesse Gross
    Signed-off-by: David S. Miller

    Jesse Gross
     

22 Sep, 2010

2 commits


18 Sep, 2010

2 commits


16 Sep, 2010

2 commits

  • struct ethtool_rawip4_spec and struct ethtool_ether_spec are neither
    commented nor used by any driver, so remove them. Adjust padding in
    the user-visible unions that included these structures.

    Fix references to struct ethtool_rawip4_spec in
    ethtool_get_rx_ntuple(), which should use struct ethtool_usrip4_spec.

    struct ethtool_usrip4_spec cannot hold IPv6 host addresses and there
    is no separate structure that can, so remove ETH_RX_NFC_IP6 and the
    reference to it in niu.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • There are now several interfaces within the ethtool API for getting
    and setting RX flow filtering and hashing behaviour, most of which are
    poorly documented. This adds kernel-doc comments for all these
    interfaces, based on the existing incomplete comments and on the
    initial implementations.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

08 Jul, 2010

1 commit


01 Jul, 2010

2 commits

  • Many NICs use an indirection table to map an RX flow hash value to one
    of an arbitrary number of queues (not necessarily a power of 2). It
    can be useful to remove some queues from this indirection table so
    that they are only used for flows that are specifically filtered
    there. It may also be useful to weight the mapping to account for
    user processes with the same CPU-affinity as the RX interrupts.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • ethtool_op_set_flags() does not check for unsupported flags, and has
    no way of doing so. This means it is not suitable for use as a
    default implementation of ethtool_ops::set_flags.

    Add a 'supported' parameter specifying the flags that the driver and
    hardware support, validate the requested flags against this, and
    change all current callers to pass this parameter.

    Change some other trivial implementations of ethtool_ops::set_flags to
    call ethtool_op_set_flags().

    Signed-off-by: Ben Hutchings
    Reviewed-by: Stanislaw Gruszka
    Acked-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Ben Hutchings
     

29 Jun, 2010

1 commit

  • struct ethtool_rxnfc was originally defined in 2.6.27 for the
    ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data
    fields. It was then extended in 2.6.30 to support various additional
    commands. These commands should have been defined to use a new
    structure, but it is too late to change that now.

    Since user-space may still be using the old structure definition
    for the ETHTOOL_{G,S}RXFH commands, and since they do not need the
    additional fields, only copy the originally defined fields to and
    from user-space.

    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org
    Signed-off-by: David S. Miller

    Ben Hutchings
     

15 Jun, 2010

1 commit

  • commit 97f8aefbbfb5aa5c9944e5fa8149f1fdaf71c7b6 "net: fix ethtool
    coding style errors and warnings" changed the indentation of several
    macro definitions in ethtool.h. These definitions line up in the diff
    where there is an extra character at the start of each line, but not
    in the resulting file.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

08 Apr, 2010

1 commit


31 Mar, 2010

1 commit


06 Mar, 2010

2 commits

  • On 03/04/2010 09:26 AM, Ben Hutchings wrote:
    > On Thu, 2010-03-04 at 00:51 -0800, Jeff Kirsher wrote:
    >> From: Jeff Garzik
    >>
    >> This patch is an alternative approach for accessing string
    >> counts, vs. the drvinfo indirect approach. This way the drvinfo
    >> space doesn't run out, and we don't break ABI later.
    > [...]
    >> --- a/net/core/ethtool.c
    >> +++ b/net/core/ethtool.c
    >> @@ -214,6 +214,10 @@ static noinline int ethtool_get_drvinfo(struct net_device *dev, void __user *use
    >> info.cmd = ETHTOOL_GDRVINFO;
    >> ops->get_drvinfo(dev,&info);
    >>
    >> + /*
    >> + * this method of obtaining string set info is deprecated;
    >> + * consider using ETHTOOL_GSSET_INFO instead
    >> + */
    >
    > This comment belongs on the interface (ethtool.h) not the
    > implementation.

    Debatable -- the current comment is located at the callsite of
    ops->get_sset_count(), which is where an implementor might think to add
    a new call. Not all the numeric fields in ethtool_drvinfo are obtained
    from ->get_sset_count().

    Hence the "some" in the attached patch to include/linux/ethtool.h,
    addressing your comment.

    > [...]
    >> +static noinline int ethtool_get_sset_info(struct net_device *dev,
    >> + void __user *useraddr)
    >> +{
    > [...]
    >> + /* calculate size of return buffer */
    >> + for (i = 0; i< 64; i++)
    >> + if (sset_mask& (1ULL<< i))
    >> + n_bits++;
    > [...]
    >
    > We have a function for this:
    >
    > n_bits = hweight64(sset_mask);

    Agreed.

    I've attached a follow-up patch, which should enable my/Jeff's kernel
    patch to be applied, followed by this one.

    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Jeff Garzik
     
  • This patch is an alternative approach for accessing string
    counts, vs. the drvinfo indirect approach. This way the drvinfo
    space doesn't run out, and we don't break ABI later.

    Signed-off-by: Jeff Garzik
    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Garzik
     

26 Feb, 2010

2 commits


15 Feb, 2010

1 commit


11 Feb, 2010

1 commit

  • This patchset enables the ethtool layer to program n-tuple
    filters to an underlying device. The idea is to allow capable
    hardware to have static rules applied that can assist steering
    flows into appropriate queues.

    Hardware that is known to support these types of filters today
    are ixgbe and niu.

    Signed-off-by: Peter P Waskiewicz Jr
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Peter P Waskiewicz Jr
     

04 Dec, 2009

1 commit


29 Nov, 2009

1 commit


03 Nov, 2009

1 commit


07 Oct, 2009

1 commit

  • After updating firmware stored in flash, users may wish to reset the
    relevant hardware and start the new firmware immediately. This should
    not be completely automatic as it may be disruptive.

    A selective reset may also be useful for debugging or diagnostics.

    This adds a separate reset operation which takes flags indicating the
    components to be reset. Drivers are allowed to reset only a subset of
    those requested, and must indicate the actual subset. This allows the
    use of generic component masks and some future expansion.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

05 Oct, 2009

1 commit


03 Sep, 2009

1 commit

  • This patch adds support to flash a firmware image to a device using ethtool.
    The driver gets the filename of the firmware image and flashes the image
    using the request firmware path.

    The region "on the chip" to be flashed can be specified by an option.
    It is upto the device driver to enumerate the region number passed by ethtool,
    to the region to be flashed.

    The default behavior is to flash all the regions on the chip.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     

28 Jul, 2009

1 commit


09 Jun, 2009

1 commit

  • Ethtool is a standard way of getting information about
    ethernet interfaces. We enhance ethtool kernel interface
    & e1000e to make the MDI-X status readable via ethtool in
    userspace.

    Signed-off-by: Chaitanya Lala
    Signed-off-by: Arthur Jones
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Chaitanya Lala
     

30 Apr, 2009

3 commits


20 Feb, 2009

1 commit


16 Dec, 2008

1 commit

  • This patch adds the ethtool ops to enable and disable GRO. It also
    makes GRO depend on RX checksum offload much the same as how TSO
    depends on SG support.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

07 Aug, 2008

1 commit

  • Introduce the speed_hi field to ethtool_cmd, using the reserved space,
    to expand the speed field to 2^32 Megabits/second.

    Making this field expansion now gives us plenty of time to fix up the
    user-space pieces that use SIOCETHTOOL before hardware faster than 64
    Gb/s is available.

    Signed-off-by: Brandon Philips
    Signed-off-by: Jeff Garzik

    Brandon Philips
     

02 Jul, 2008

1 commit


08 Mar, 2008

1 commit


03 Feb, 2008

1 commit


11 Oct, 2007

2 commits