virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jens Osterkamp <jens@linux.vnet.ibm.com>
To: John Fastabend <john.r.fastabend@intel.com>
Cc: "chrisw@redhat.com" <chrisw@redhat.com>,
	"evb@yahoogroups.com" <evb@yahoogroups.com>,
	e1000-eedc@lists.sourceforge.net,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>
Subject: Re: [E1000-eedc] [PATCH 2/9] implementation of IEEE 802.1Qbg in lldpad, part 1
Date: Wed, 13 Oct 2010 16:40:48 +0200	[thread overview]
Message-ID: <201010131640.48715.jens@linux.vnet.ibm.com> (raw)
In-Reply-To: <4CB4A368.3030408@intel.com>

On Tuesday 12 October 2010, John Fastabend wrote:
> On 9/28/2010 8:10 AM, Jens Osterkamp wrote:
> > This patch contains the first part of an initial implementation of the
> > IEEE 802.1Qbg standard: it implements code for the exchange of EVB
> > capabilities between a host with virtual machines and an adjacent switch.
> > For this it adds a new EVB TLV to LLDP.
> > 
> > Exchange of EVB TLV may be enabled or disabled on a per port basis.
> > Information about the information negotiated by the protocol can be
> > queried on the commandline with lldptool.
> > 
> > This patch adds support for querying and setting parameters used in
> > the exchange of EVB TLV messages.
> > The parameters that can be set are:
> > 
> >         - forwarding mode
> >         - host protocol capabilities (RTE, ECP, VDP)
> >         - no. of supported VSIs
> >         - retransmission timer exponent (RTE)
> > 
> > The parameters are implemented as a local policy: all frames received by
> > an adjacent switch are validated against this policy and taken over where
> > appropriate. Negotiated parameters are stored in lldpads config, picked up
> > again and used at the next start.
> > 
> > The patch applies to lldpad 0.9.38 and still contains code to log protocol
> > activity more verbosely than it would be necessary in the final version.
> > 
> > Signed-off-by: Jens Osterkamp <jens@linux.vnet.ibm.com>
> > ---
> >  Makefile.am             |   10 +-
> >  include/lldp.h          |   19 ++
> >  include/lldp_evb.h      |   80 ++++++
> >  include/lldp_evb_clif.h |   51 ++++
> >  include/lldp_evb_cmds.h |   31 +++
> >  include/lldp_tlv.h      |    1 +
> >  lldp_evb.c              |  638 +++++++++++++++++++++++++++++++++++++++++++++++
> >  lldp_evb_clif.c         |  226 +++++++++++++++++
> >  lldp_evb_cmds.c         |  512 +++++++++++++++++++++++++++++++++++++
> >  lldpad.c                |    2 +
> >  lldptool.c              |    2 +
> >  11 files changed, 1568 insertions(+), 4 deletions(-)
> >  create mode 100644 include/lldp_evb.h
> >  create mode 100644 include/lldp_evb_clif.h
> >  create mode 100644 include/lldp_evb_cmds.h
> >  create mode 100644 lldp_evb.c
> >  create mode 100644 lldp_evb_clif.c
> >  create mode 100644 lldp_evb_cmds.c
> > 

[snip]

> > +void evb_ifup(char *ifname)
> > +{
> > +       struct evb_data *ed;
> > +       struct evb_user_data *ud;
> > +
> > +       ed = evb_data(ifname);
> > +       if (ed) {
> > +               fprintf(stderr, "### %s:%s exists\n", __func__, ifname);
> > +               goto out_err;
> > +       }
> > +
> > +       /* not found, alloc/init per-port tlv data */
> > +       ed = (struct evb_data *) calloc(1, sizeof(struct evb_data));
> > +       if (!ed) {
> > +               fprintf(stderr, "### %s:%s malloc %ld failed\n",
> > +                        __func__, ifname, sizeof(*ed));
> > +               goto out_err;
> > +       }
> > +       strncpy(ed->ifname, ifname, IFNAMSIZ);
> > +
> > +       if (!init_cfg()) {
> > +               fprintf(stderr, "### %s:%s init_cfg failed\n", __func__, ifname);
> 
> Need to free(ed) here too it looks like. Otherwise looks good.

Thank you for spotting this ! I fixed it in my code and will include it my next posting of the series.

Jens

-- 

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

  reply	other threads:[~2010-10-13 14:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 15:10 implementation of IEEE 802.1Qbg in lldpad Jens Osterkamp
2010-09-28 15:10 ` [PATCH 1/9] consolidation of MIN and MAX macros in common.h Jens Osterkamp
2010-09-28 15:10 ` [PATCH 2/9] implementation of IEEE 802.1Qbg in lldpad, part 1 Jens Osterkamp
2010-10-12 18:05   ` [E1000-eedc] " John Fastabend
2010-10-13 14:40     ` Jens Osterkamp [this message]
2010-09-28 15:10 ` [PATCH 3/9] BUGFIX: check for existence of ifup Jens Osterkamp
2010-09-28 15:10 ` [PATCH 4/9] implementation of IEEE 802.1Qbg in lldpad, part 2 Jens Osterkamp
2010-10-12 18:06   ` [E1000-eedc] " John Fastabend
2010-10-13 15:03     ` Jens Osterkamp
2010-09-28 15:10 ` [PATCH 5/9] VDP commandline interface Jens Osterkamp
2010-09-28 15:10 ` [PATCH 6/9] add libnl dependency to configure.ac Jens Osterkamp
2010-09-28 15:11 ` [PATCH 7/9] use connect instead of bind Jens Osterkamp
2010-09-28 15:11 ` [PATCH 8/9] lldpad support for libvirt netlink message Jens Osterkamp
2010-09-28 15:11 ` [PATCH 9/9] do not use macv[tap/lan] interfaces as ports Jens Osterkamp

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=201010131640.48715.jens@linux.vnet.ibm.com \
    --to=jens@linux.vnet.ibm.com \
    --cc=chrisw@redhat.com \
    --cc=e1000-eedc@lists.sourceforge.net \
    --cc=evb@yahoogroups.com \
    --cc=john.r.fastabend@intel.com \
    --cc=virtualization@lists.linux-foundation.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).