netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Raspl <raspl@linux.vnet.ibm.com>
To: John Fastabend <john.r.fastabend@intel.com>,
	Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Ben Hutchings <bhutchings@solarflare.com>,
	blaschka@linux.vnet.ibm.com, netdev <netdev@vger.kernel.org>,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH 0/2] Display adjacent switch port's attributes
Date: Mon, 16 Dec 2013 16:32:15 +0100	[thread overview]
Message-ID: <52AF1CFF.7040004@linux.vnet.ibm.com> (raw)
In-Reply-To: <52AA2EF4.70300@intel.com>

Am 12.12.2013 22:47, schrieb John Fastabend:
> [...]
> 
>>> Just to elaborate...
>>>
>>> Any application using lldp information will want to get events when
>>> TLVs change. Maybe you can contrive ethtool to do this but its
>>> going to
>>> be ugly. Netlink can support multicast events and applications can
>>> register for them. Also netlink's TLV format matches nicely with
>>> LLDPs
>>> TLV format.
>>
>> ethtool and netlink usually intersect for a few bits of information
>> such as link status for instance. It is useful to have this
>> information twice, with ethtool as a debugging aid, and via
>> netlink to
>> take appropriate actions.
>>
>> Maybe we just need to be clear on what needs to be present in ethtool
>> only (configuration, static information) and see on a case-by-case
>> what needs to be present in both ethtool and netlink?
>>
> 
> OK if there is an enable/disable bit in ethtool that might make some
> sense. Or an error flag that is helpful to have.
> 
> In this case we are dealing with peer attributes which are dynamic and
> in my opinion should go into netlink and duplicating them in ethtool
> although possible doesn't seem very useful to me.

I think what most folks in the discussion so far assume is that we
have a full LLDP implementation with respective hooks and events.
This is not true for our device: We can only poll it for the
adjacent link port's state, and that's it. I.e. we don't receive any
events for changes on the port's state.
lldpad seems to handle the entire LLDP layer in software. And I'm
not sure if our device integrates with that so well, as it handles
LLDP on its own. We'd have to disable pretty much all functionality
that lldpad offers, and limit support to display of a few parameters
which we would have to poll on demand.
Likewise with netlink: If one of the arguments for netlink is that
it supports notifications, then we can't take any advantage of that
either, for the reasons stated above.
By its nature, what we can offer and support with our device is
simple debugging functionality, displaying the current state of the
switch port at a given moment - just like ethtool will display the
current port speed and media type. Hence the original idea to add
respective functionality to ethtool in a generic manner, so others
with similar constraints could use it as well.
If ethtool is not acceptable, and if lldpad and netlink are no good
fits either, would respective sysfs attributes for our device type work?

Stefan

  parent reply	other threads:[~2013-12-16 15:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 13:28 [PATCH 0/2] Display adjacent switch port's attributes Stefan Raspl
2013-12-11 13:28 ` [PATCH 1/2] ethtool: Add callback to indicate adjacent switch port attributes Stefan Raspl
2013-12-11 13:29 ` [PATCH 2/2] qeth: Display adjacent switch port attributes in ethtool Stefan Raspl
2013-12-11 20:13 ` [PATCH 0/2] Display adjacent switch port's attributes Stephen Hemminger
2013-12-12 10:06   ` Nicolas Dichtel
2013-12-12 13:57   ` Stefan Raspl
2013-12-12 17:28     ` David Miller
2013-12-12 17:52       ` John Fastabend
2013-12-12 19:03         ` Florian Fainelli
2013-12-12 21:47           ` John Fastabend
2013-12-12 22:00             ` Ben Hutchings
2013-12-16 15:32             ` Stefan Raspl [this message]
2014-01-07 14:28               ` Stefan Raspl

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=52AF1CFF.7040004@linux.vnet.ibm.com \
    --to=raspl@linux.vnet.ibm.com \
    --cc=bhutchings@solarflare.com \
    --cc=blaschka@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=john.r.fastabend@intel.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).