01 Nov, 2011

2 commits


07 Oct, 2011

2 commits


09 Jul, 2011

1 commit


06 Jul, 2011

2 commits

  • This patch add an unsolicited notification of the DCBX negotiated
    parameters for the CEE flavor of the DCBX protocol. The notification
    message is identical to the aggregated CEE get operation and holds all
    the pertinent local and peer information. The notification routine is
    exported so it can be invoked by drivers supporting an embedded DCBX
    stack.

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

    Shmulik Ravid
     
  • The following couple of patches add dcbnl an unsolicited notification of
    the the DCB configuration for the CEE flavor of the DCBX protocol. This
    is useful when the user-mode DCB client is not responsible for
    conducting and resolving the DCBX negotiation (either because the DCBX
    stack is embedded in the HW or the negotiation is handled by another
    agent in the host), but still needs to get the negotiated parameters.
    This functionality already exists for the IEEE flavor of the DCBX
    protocol and these patches add it to the older CEE flavor.

    The first patch extends the CEE attribute GET operation to include not
    only the peer information, but also all the pertinent local
    configuration (negotiated parameters). The second patch adds and export
    a CEE specific notification routine.

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

    Shmulik Ravid
     

23 Jun, 2011

1 commit


22 Jun, 2011

7 commits

  • Missing error checking before nla_parse_nested().

    Reported-by: Mark Rustad
    Signed-off-by: John Fastabend
    Signed-off-by: David S. Miller

    John Fastabend
     
  • Incorrect return type on dcb_setapp() this routine
    returns negative error codes. All call sites of
    dcb_setapp() assign the return value to an int already
    so no need to update drivers.

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

    John Fastabend
     
  • With multiple APP entries per selector and protocol drivers
    or stacks may want to pick a specific value or stripe traffic
    across many priorities. Also if an APP entry in use is
    deleted the stack/driver may want to choose from the existing
    APP entries.

    To facilitate this and avoid having duplicate code to walk
    the APP ring provide a routine dcb_ieee_getapp_mask() to
    return a u8 bitmask of all priorities set for the specified
    selector and protocol. This routine and bitmask is a helper
    for DCB kernel users.

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

    John Fastabend
     
  • Now that we allow multiple IEEE App entries we need a way
    to remove specific entries. To do this add the ieee_dcb_delapp()
    routine.

    Additionaly drivers may need to remove the APP entry from
    their firmware tables. Add dcb ops routine to handle this.

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

    John Fastabend
     
  • This adds a setapp routine for IEEE802.1Qaz encoded APP data types.
    The IEEE 802.1Qaz spec encodes the priority bits differently and
    allows for multiple APP data entries of the same selector and
    protocol. Trying to force these to use the same set routines was
    becoming tedious. Furthermore, userspace could probably enforce
    the correct semantics, but expecting drivers to do this seems
    error prone in the firmware case.

    For these reasons add ieee_dcb_setapp() that understands the
    IEEE 802.1Qaz encoded form.

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

    John Fastabend
     
  • Now that dcbnl is being used in many cases by more
    than a single agent it is beneficial to be notified
    when some entity either driver or user space has
    changed the DCB attributes.

    Today applications either end up polling the interface
    or relying on a user space database to maintain the DCB
    state and post events. Polling is a poor solution for
    obvious reasons. And relying on a user space database
    has its own downside. Namely it has created strange
    boot dependencies requiring the database be populated
    before any applications dependent on DCB attributes
    starts or the application goes into a polling loop.
    Populating the database requires negotiating link
    setting with the peer and can take anywhere from less
    than a second up to a few seconds depending on the switch
    implementation.

    Perhaps more importantly if another application or an
    embedded agent sets a DCB link attribute the database
    has no way of knowing other than polling the kernel.
    This prevents applications from responding quickly to
    changes in link events which at least in the FCoE case
    and probably any other protocols expecting a lossless
    link may result in IO errors.

    By adding a multicast group for DCB we have clean way
    to disseminate kernel DCB link attributes up to user
    space. Avoiding the need for user space to maintain
    a coherant database and disperse events that potentially
    do not reflect the current link state.

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

    John Fastabend
     
  • Adding the capabilities bitmask to the get_ieee response allows
    user space to determine the current DCBX mode. Either CEE or IEEE
    this is useful with devices that support switching between modes
    where knowing the current state is relevant.

    Derived from work by Mark Rustad

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

    John Fastabend
     

10 Jun, 2011

1 commit

  • The message size allocated for rtnl ifinfo dumps was limited to
    a single page. This is not enough for additional interface info
    available with devices that support SR-IOV and caused a bug in
    which VF info would not be displayed if more than approximately
    40 VFs were created per interface.

    Implement a new function pointer for the rtnl_register service that will
    calculate the amount of data required for the ifinfo dump and allocate
    enough data to satisfy the request.

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

    Greg Rose
     

15 Mar, 2011

1 commit


04 Mar, 2011

1 commit


03 Mar, 2011

3 commits

  • This patch adds the support for retrieving the remote or peer DCBX
    configuration via dcbnl for embedded DCBX stacks supporting the CEE DCBX
    standard.

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

    Shmulik Ravid
     
  • These 2 patches add the support for retrieving the remote or peer DCBX
    configuration via dcbnl for embedded DCBX stacks. The peer configuration
    is part of the DCBX MIB and is useful for debugging and diagnostics of
    the overall DCB configuration. The first patch add this support for IEEE
    802.1Qaz standard the second patch add the same support for the older
    CEE standard. Diff for v2 - the peer-app-info is CEE specific.

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

    Shmulik Ravid
     
  • The incorrect ops routine was being tested for in
    DCB_ATTR_IEEE_PFC attributes. This patch corrects
    it.

    Currently, every driver implementing ieee_setets also
    implements ieee_setpfc so this bug is not actualized
    yet.

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

    John Fastabend
     

14 Feb, 2011

2 commits


25 Jan, 2011

1 commit


07 Jan, 2011

2 commits


04 Jan, 2011

1 commit


01 Jan, 2011

6 commits

  • A couple of small cleanups for patches:
    [net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes
    [net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers
    [net-next-2.6 PATCH 3/3] net_dcb: add application notifiers

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

    Shmulik Ravid
     
  • Adding a pair of set-get routines to dcbnl for setting the negotiation
    flags of the various DCB features. Conforms to the CEE flavor of DCBX
    The user sets these flags (enable, advertise, willing) for each feature
    to be used by the DCBX engine. The 'get' routine returns which of the
    features is enabled after the negotiation.

    This patch is dependent on the following patches:
    [net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes
    [net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers
    [net-next-2.6 PATCH 3/3] net_dcb: add application notifiers

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

    Shmulik Ravid
     
  • Adding an optional DCBX capability and a pair for get-set routines for
    setting the device DCBX mode. The DCBX capability is a bit field of
    supported attributes. The user is expected to set the DCBX mode with a
    subset of the advertised attributes.

    This patch is dependent on the following patches:
    [net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes
    [net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers
    [net-next-2.6 PATCH 3/3] net_dcb: add application notifiers

    Signed-off-by: Shmulik Ravid
    Acked-by: John Fastabend
    Signed-off-by: David S. Miller

    Shmulik Ravid
     
  • DCBx applications priorities can be changed dynamically. If
    application stacks are expected to keep the skb priority
    consistent with the dcbx priority the stack will need to
    be notified when these changes occur.

    This patch adds application notifiers for the stack to register
    with.

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

    John Fastabend
     
  • This patch adds application tlv handlers. Networking stacks
    may use the application priority to set the skb priority of
    their stack using the negoatiated dcbx priority.

    This patch provides the dcb_{get|set}app() routines for the
    stack to query these parameters. Notice lower layer drivers
    can use the dcbnl_ops routines if additional handling is
    needed. Perhaps in the firmware case for example

    Signed-off-by: John Fastabend
    Signed-off-by: Shmulik Ravid
    Signed-off-by: David S. Miller

    John Fastabend
     
  • The IEEE8021Qaz is the IEEE standard version of CEE. The
    standard has had enough significant changes from the CEE
    version that many of the CEE attributes have no meaning
    in the new spec or do not easily map to IEEE standards.

    Rather then attempt to create a complicated mapping
    between CEE and IEEE standards this patch adds a nested
    IEEE attribute to the list of DCB attributes. The policy
    is,

    [DCB_ATTR_IFNAME]
    [DCB_ATTR_STATE]
    ...
    [DCB_ATTR_IEEE]
    [DCB_ATTR_IEEE_ETS]
    [DCB_ATTR_IEEE_PFC]
    [DCB_ATTR_IEEE_APP_TABLE]
    [DCB_ATTR_IEEE_APP]
    ...

    The following dcbnl_rtnl_ops routines were added to handle
    the IEEE standard,

    int (*ieee_getets) (struct net_device *, struct ieee_ets *);
    int (*ieee_setets) (struct net_device *, struct ieee_ets *);
    int (*ieee_getpfc) (struct net_device *, struct ieee_pfc *);
    int (*ieee_setpfc) (struct net_device *, struct ieee_pfc *);
    int (*ieee_getapp) (struct net_device *, struct dcb_app *);
    int (*ieee_setapp) (struct net_device *, struct dcb_app *);

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

    John Fastabend
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

19 Feb, 2010

1 commit


30 Nov, 2009

1 commit


26 Nov, 2009

1 commit

  • Generated with the following semantic patch

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 == n2
    + net_eq(n1, n2)

    @@
    struct net *n1;
    struct net *n2;
    @@
    - n1 != n2
    + !net_eq(n1, n2)

    applied over {include,net,drivers/net}.

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

    Octavian Purdila
     

27 Sep, 2009

1 commit

  • netlink_unicast() calls kfree_skb even in the error case.

    dcbnl calls netlink_unicast() which when it fails free's the
    skb and returns an error value. dcbnl is free'ing the skb
    again when this error occurs. This patch removes the double
    free.

    Signed-off-by: John Fastabend
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    John Fastabend
     

01 Sep, 2009

2 commits