All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.r.fastabend@intel.com>
To: Shmulik Ravid <shmulikr@broadcom.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/7] net: dcbnl, add multicast group for DCB
Date: Mon, 20 Jun 2011 09:16:22 -0700	[thread overview]
Message-ID: <4DFF7256.6080706@intel.com> (raw)
In-Reply-To: <1308507279.15528.14.camel@lb-tlvb-shmulik.il.broadcom.com>

On 6/19/2011 11:14 AM, Shmulik Ravid wrote:
> 
> On Fri, 2011-06-17 at 14:16 -0700, John Fastabend wrote:
>> 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 <john.r.fastabend@intel.com>
>> ---
>>
>>  include/linux/rtnetlink.h |    2 
>>  net/dcb/dcbnl.c           |  228 +++++++++++++++++++++++++++++----------------
>>  2 files changed, 147 insertions(+), 83 deletions(-)
>>
> [...]
>> +static int dcbnl_notify(struct net_device *dev, int event, int cmd,
>> +			u32 seq, u32 pid)
> [...]
> A driver supporting an embedded dcbx stack would want to directly invoke
> the notification routine, therefore it should be exported. I'd like also

We can export this function when we add support to the driver.

> to add support for a CEE notification. Also when the driver invokes the
> notification shouldn't it use a new event type something like
> RTM_NEWDCB?
>  

I'm not sure a RTM_NEWDCB event is needed. How would user space be expected
to handle the two events? FCoE needs to know if the link is lossless or not
it shouldn't care if a firmware agent is running or a user space LLDP agent.
Other applications (multipathd, iscsid) probably just want to know the current
DCB attributes.

Maybe I missed your point could you provide more details?

Thanks,
John

  reply	other threads:[~2011-06-20 16:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 21:16 [PATCH 0/7] Series short description John Fastabend
2011-06-17 21:16 ` [PATCH 1/7] dcb: Add DCBX capabilities bitmask to the get_ieee response John Fastabend
2011-06-17 21:16 ` [PATCH 2/7] net: dcbnl, add multicast group for DCB John Fastabend
2011-06-19 18:14   ` Shmulik Ravid
2011-06-20 16:16     ` John Fastabend [this message]
2011-06-17 21:16 ` [PATCH 3/7] dcb: Add ieee_dcb_setapp() to be used for IEEE 802.1Qaz APP data John Fastabend
2011-06-17 21:16 ` [PATCH 4/7] dcb: Add ieee_dcb_delapp() and dcb op to delete app entry John Fastabend
2011-06-17 21:16 ` [PATCH 5/7] dcb: Add dcb_ieee_getapp_mask() for drivers to query APP settings John Fastabend
2011-06-17 21:16 ` [PATCH 6/7] dcb: fix return type on dcb_setapp() John Fastabend
2011-06-17 21:16 ` [PATCH 7/7] dcb: Add missing error check in dcb_ieee_set() John Fastabend
2011-06-19 17:58 ` [PATCH 0/7] Series short description Shmulik Ravid
2011-06-20 16:05   ` John Fastabend

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DFF7256.6080706@intel.com \
    --to=john.r.fastabend@intel.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shmulikr@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.