17 Oct, 2011

1 commit

  • Add configuration setting for drivers to turn spoof checking on or off
    for discrete VFs.

    v2 - Fix indentation problem, wrap the ifla_vf_info structure in
    #ifdef __KERNEL__ to prevent user space from accessing and
    change function paramater for the spoof check setting netdev
    op from u8 to bool.
    v3 - Preset spoof check setting to -1 so that user space tools such
    as ip can detect that the driver didn't report a spoofcheck
    setting. Prevents incorrect display of spoof check settings
    for drivers that don't report it.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher

    Greg Rose
     

11 May, 2011

1 commit


20 Jan, 2011

1 commit


23 Nov, 2010

1 commit

  • With the current default 'vepa' mode, a KVM guest using virtio with
    macvtap backend has the following limitations.
    - cannot change/add a mac address on the guest virtio-net
    - cannot create a vlan device on the guest virtio-net
    - cannot enable promiscuous mode on guest virtio-net

    To address these limitations, this patch introduces a new mode called
    'passthru' when creating a macvlan device which allows takeover of the
    underlying device and passing it to a guest using virtio with macvtap
    backend.

    Only one macvlan device is allowed in passthru mode and it inherits
    the mac address from the underlying device and sets it in promiscuous
    mode to receive and forward all the packets.

    Signed-off-by: Sridhar Samudrala

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

    Sridhar Samudrala
     

18 Nov, 2010

2 commits

  • Implements the AF_INET link address family exposing the per
    device configuration settings via netlink using the attribute
    IFLA_INET_CONF.

    The format of IFLA_INET_CONF differs depending on the direction
    the attribute is sent. The attribute sent by the kernel consists
    of a u32 array, basically a 1:1 copy of in_device->cnf.data[].
    The attribute expected by the kernel must consist of a sequence
    of nested u32 attributes, each representing a change request,
    e.g.
    [IFLA_INET_CONF] = {
    [IPV4_DEVCONF_FORWARDING] = 1,
    [IPV4_DEVCONF_NOXFRM] = 0,
    }

    libnl userspace API documentation and example available from:
    http://www.infradead.org/~tgr/libnl/doc-git/group__link__inet.html

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Each net_device contains address family specific data such as
    per device settings and statistics. We already expose this data
    via procfs/sysfs and partially netlink.

    The netlink method requires the requester to send one RTM_GETLINK
    request for each address family it wishes to receive data of
    and then merge this data itself.

    This patch implements a new API which combines all address family
    specific link data in a new netlink attribute IFLA_AF_SPEC.
    IFLA_AF_SPEC contains a sequence of nested attributes, one for each
    address family which in turn defines the structure of its own
    attribute. Example:

    [IFLA_AF_SPEC] = {
    [AF_INET] = {
    [IFLA_INET_CONF] = ...,
    },
    [AF_INET6] = {
    [IFLA_INET6_FLAGS] = ...,
    [IFLA_INET6_CONF] = ...,
    }
    }

    The API also allows for address families to implement a function
    which parses the IFLA_AF_SPEC attribute sent by userspace to
    implement address family specific link options.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     

05 Aug, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits)
    Documentation: update broken web addresses.
    fix comment typo "choosed" -> "chosen"
    hostap:hostap_hw.c Fix typo in comment
    Fix spelling contorller -> controller in comments
    Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault
    fs/Kconfig: Fix typo Userpace -> Userspace
    Removing dead MACH_U300_BS26
    drivers/infiniband: Remove unnecessary casts of private_data
    fs/ocfs2: Remove unnecessary casts of private_data
    libfc: use ARRAY_SIZE
    scsi: bfa: use ARRAY_SIZE
    drm: i915: use ARRAY_SIZE
    drm: drm_edid: use ARRAY_SIZE
    synclink: use ARRAY_SIZE
    block: cciss: use ARRAY_SIZE
    comment typo fixes: charater => character
    fix comment typos concerning "challenge"
    arm: plat-spear: fix typo in kerneldoc
    reiserfs: typo comment fix
    update email address
    ...

    Linus Torvalds
     

17 Jun, 2010

1 commit


13 Jun, 2010

1 commit

  • Use struct rtnl_link_stats64 as the statistics structure.

    On 32-bit architectures, insert 32 bits of padding after/before each
    field of struct net_device_stats to make its layout compatible with
    struct rtnl_link_stats64. Add an anonymous union in net_device; move
    stats into the union and add struct rtnl_link_stats64 stats64.

    Add net_device_ops::ndo_get_stats64, implementations of which will
    return a pointer to struct rtnl_link_stats64. Drivers that implement
    this operation must not update the structure asynchronously.

    Change dev_get_stats() to call ndo_get_stats64 if available, and to
    return a pointer to struct rtnl_link_stats64. Change callers of
    dev_get_stats() accordingly.

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

    Ben Hutchings
     

18 May, 2010

1 commit

  • Add new netdev ops ndo_{set|get}_vf_port to allow setting of
    port-profile on a netdev interface. Extends netlink socket RTM_SETLINK/
    RTM_GETLINK with two new sub msgs called IFLA_VF_PORTS and IFLA_PORT_SELF
    (added to end of IFLA_cmd list). These are both nested atrtibutes
    using this layout:

    [IFLA_NUM_VF]
    [IFLA_VF_PORTS]
    [IFLA_VF_PORT]
    [IFLA_PORT_*], ...
    [IFLA_VF_PORT]
    [IFLA_PORT_*], ...
    ...
    [IFLA_PORT_SELF]
    [IFLA_PORT_*], ...

    These attributes are design to be set and get symmetrically. VF_PORTS
    is a list of VF_PORTs, one for each VF, when dealing with an SR-IOV
    device. PORT_SELF is for the PF of the SR-IOV device, in case it wants
    to also have a port-profile, or for the case where the VF==PF, like in
    enic patch 2/2 of this patch set.

    A port-profile is used to configure/enable the external switch virtual port
    backing the netdev interface, not to configure the host-facing side of the
    netdev. A port-profile is an identifier known to the switch. How port-
    profiles are installed on the switch or how available port-profiles are
    made know to the host is outside the scope of this patch.

    There are two types of port-profiles specs in the netlink msg. The first spec
    is for 802.1Qbg (pre-)standard, VDP protocol. The second spec is for devices
    that run a similar protocol as VDP but in firmware, thus hiding the protocol
    details. In either case, the specs have much in common and makes sense to
    define the netlink msg as the union of the two specs. For example, both specs
    have a notition of associating/deassociating a port-profile. And both specs
    require some information from the hypervisor manager, such as client port
    instance ID.

    The general flow is the port-profile is applied to a host netdev interface
    using RTM_SETLINK, the receiver of the RTM_SETLINK msg communicates with the
    switch, and the switch virtual port backing the host netdev interface is
    configured/enabled based on the settings defined by the port-profile. What
    those settings comprise, and how those settings are managed is again
    outside the scope of this patch, since this patch only deals with the
    first step in the flow.

    Signed-off-by: Scott Feldman
    Signed-off-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Scott Feldman
     

17 May, 2010

1 commit


16 May, 2010

1 commit

  • Now we have a set of nested attributes:

    IFLA_VFINFO_LIST (NESTED)
    IFLA_VF_INFO (NESTED)
    IFLA_VF_MAC
    IFLA_VF_VLAN
    IFLA_VF_TX_RATE

    This allows a single set to operate on multiple attributes if desired.
    Among other things, it means a dump can be replayed to set state.

    The current interface has yet to be released, so this seems like
    something to consider for 2.6.34.

    Signed-off-by: Chris Wright
    Signed-off-by: David S. Miller

    Chris Wright
     

17 Mar, 2010

1 commit

  • `ip -s link` shows interface counters truncated to 32 bit. This is
    because interface statistics are transported only in 32-bit quantity
    to userspace. This commit adds a new IFLA_STATS64 attribute that
    exports them in full 64 bit.

    References: http://lkml.indiana.edu/hypermail/linux/kernel/0307.3/0215.html
    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     

13 Feb, 2010

1 commit


27 Nov, 2009

1 commit

  • In order to support all three modes of macvlan at
    runtime, extend the existing netlink protocol
    to allow choosing the mode per macvlan slave
    interface.

    This depends on a matching patch to iproute2
    in order to become accessible in user land.

    Signed-off-by: Arnd Bergmann
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

05 Nov, 2009

1 commit

  • This cleanup patch puts struct/union/enum opening braces,
    in first line to ease grep games.

    struct something
    {

    becomes :

    struct something {

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

    Eric Dumazet
     

31 Jan, 2009

1 commit


23 Sep, 2008

1 commit

  • This patch add support for keeping an additional character alias
    associated with an network interface. This is useful for maintaining
    the SNMP ifAlias value which is a user defined value. Routers use this
    to hold information like which circuit or line it is connected to. It
    is just an arbitrary text label on the network device.

    There are two exposed interfaces with this patch, the value can be
    read/written either via netlink or sysfs.

    This could be maintained just by the snmp daemon, but it is more
    generally useful for other management tools, and the kernel is good
    place to act as an agreed upon interface to store it.

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

    Stephen Hemminger
     

11 Oct, 2007

1 commit

  • The simplest thing to implement is moving network devices between
    namespaces. However with the same attribute IFLA_NET_NS_PID we can
    easily implement creating devices in the destination network
    namespace as well. However that is a little bit trickier so this
    patch sticks to what is simple and easy.

    A pid is used to identify a process that happens to be a member
    of the network namespace we want to move the network device to.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

11 Jul, 2007

2 commits


26 Apr, 2007

1 commit


09 Dec, 2006

1 commit


29 Sep, 2006

1 commit