Re: [E1000-eedc] [PATCH 2/9] implementation of IEEE 802.1Qbg in lldpad, part 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> > ---
> >  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
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux