[meta-networking] lldpad: new add

Submitted by Zheng Ruoqin on Jan. 7, 2018, 10:59 a.m. | Patch ID: 147204

Details

Message ID 1515322780-20975-1-git-send-email-zhengrq.fnst@cn.fujitsu.com
State Under Review
Delegated to: Joe MacDonald
Headers show

Commit Message

Zheng Ruoqin Jan. 7, 2018, 10:59 a.m.
Add a new recipe lldpad_git.bb.

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
 .../lldpad/lldpad/0001-fix-build-warnings.patch    | 94 ++++++++++++++++++++++
 .../lldpad/0002-Change-CFLAGS-to-avoid-error.patch | 25 ++++++
 .../recipes-daemons/lldpad/lldpad_git.bb           | 35 ++++++++
 3 files changed, 154 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch
 create mode 100644 meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch
 create mode 100644 meta-networking/recipes-daemons/lldpad/lldpad_git.bb

Patch hide | download patch | download mbox

diff --git a/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch b/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch
new file mode 100644
index 0000000..52c0978
--- /dev/null
+++ b/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch
@@ -0,0 +1,94 @@ 
+From: Chris Leech <cleech@redhat.com>
+Date: Wed, 17 Jun 2015 10:40:34 -0700
+Subject: [PATCH] fix build warnings
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ include/lldp_8021qaz.h | 6 ------
+ lldp/agent.c           | 5 +++++
+ lldp/agent.h           | 6 +++---
+ lldp_util.c            | 4 ++--
+ 4 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/include/lldp_8021qaz.h b/include/lldp_8021qaz.h
+index 55353b8..09dee20 100644
+--- a/include/lldp_8021qaz.h
++++ b/include/lldp_8021qaz.h
+@@ -218,9 +218,6 @@ int ieee8021qaz_mod_app(struct app_tlv_head *head, int peer,
+ 			u8 prio, u8 sel, u16 proto, u32 ops);
+ int ieee8021qaz_app_sethw(char *ifname, struct app_tlv_head *head);
+ 
+-inline int get_prio_map(u32 prio_map, int tc);
+-inline void set_prio_map(u32 *prio_map, u8 prio, int tc);
+-
+ struct ieee8021qaz_tlvs *ieee8021qaz_data(const char *);
+ 
+ int ieee8021qaz_tlvs_rxed(const char *ifname);
+@@ -234,9 +231,6 @@ int ieee8021qaz_rchange(struct port *port, struct lldp_agent *,
+ void ieee8021qaz_ifup(char *ifname, struct lldp_agent *);
+ void ieee8021qaz_ifdown(char *ifname, struct lldp_agent *);
+ u8 ieee8021qaz_mibDeleteObject(struct port *port, struct lldp_agent *);
+-inline int ieee8021qaz_clif_cmd(void *data, struct sockaddr_un *from,
+-				socklen_t fromlen, char *ibuf, int ilen,
+-				char *rbuf);
+ int ieee8021qaz_check_operstate(void);
+ int get_dcbx_hw(const char *ifname, __u8 *dcbx);
+ 
+diff --git a/lldp/agent.c b/lldp/agent.c
+index 4bc5394..45def9a 100644
+--- a/lldp/agent.c
++++ b/lldp/agent.c
+@@ -36,6 +36,11 @@
+ #include "lldp_mand_clif.h"
+ #include "lldp/agent.h"
+ 
++/* IEEE 802.1AB-2009 - Table 7-1: group MAC addresses used by LLDP */
++const u8 nearest_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x0e};
++const u8 nearest_nontpmr_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x03};
++const u8 nearest_customer_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x00};
++
+ static const u8 * agent_groupmacs[AGENT_MAX] = {
+ 	nearest_bridge,
+ 	nearest_nontpmr_bridge,
+diff --git a/lldp/agent.h b/lldp/agent.h
+index a54f72f..90da3e0 100644
+--- a/lldp/agent.h
++++ b/lldp/agent.h
+@@ -48,9 +48,9 @@ enum agent_type {
+ };
+ 
+ /* IEEE 802.1AB-2009 - Table 7-1: group MAC addresses used by LLDP */
+-static const u8 nearest_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x0e};
+-static const u8 nearest_nontpmr_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x03};
+-static const u8 nearest_customer_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x00};
++extern const u8 nearest_bridge[ETH_ALEN];
++extern const u8 nearest_nontpmr_bridge[ETH_ALEN];
++extern const u8 nearest_customer_bridge[ETH_ALEN];
+ 
+ struct agenttimers {
+ /* Tx */
+diff --git a/lldp_util.c b/lldp_util.c
+index 754b0cd..304ddc5 100644
+--- a/lldp_util.c
++++ b/lldp_util.c
+@@ -1177,7 +1177,7 @@ int check_link_status(const char *ifname)
+ int get_arg_val_list(char *ibuf, int ilen, int *ioff,
+ 			    char **args, char **argvals)
+ {
+-	u8 arglen;
++	u8 arglen = 0;
+ 	u16 argvalue_len;
+ 	int *arglens = NULL;
+ 	int *argvallens = NULL;
+@@ -1245,7 +1245,7 @@ int get_arg_val_list(char *ibuf, int ilen, int *ioff,
+ 
+ int get_arg_list(char *ibuf, int ilen, int *ioff, char **args)
+ {
+-	u8 arglen;
++	u8 arglen = 0;
+ 	int *arglens = NULL;
+ 	int *p;
+ 	int numargs;
+-- 
+2.7.4
+
diff --git a/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch b/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch
new file mode 100644
index 0000000..5cb2a0a
--- /dev/null
+++ b/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch
@@ -0,0 +1,25 @@ 
+Subject: [PATCH] Change CFLAGS to avoid error
+Fix compile error like: warning: this statement may fall
+ through [-Wimplicit-fallthrough=]
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4889d32..321bd7c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -16,7 +16,7 @@ ACLOCAL_AMFLAGS = -I m4
+ parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error
+ 
+ ## system requires a shared libconfig
+-AM_CFLAGS = -Wall -Werror -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS)
++AM_CFLAGS = -Wall -Wno-error -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS)
+ AM_LDFLAGS = $(LIBCONFIG_LIBS) $(LIBNL_LIBS)
+ 
+ ## header files to be installed, for programs using the client interface to lldpad 
+-- 
+2.7.4
+
diff --git a/meta-networking/recipes-daemons/lldpad/lldpad_git.bb b/meta-networking/recipes-daemons/lldpad/lldpad_git.bb
new file mode 100644
index 0000000..5203eb1
--- /dev/null
+++ b/meta-networking/recipes-daemons/lldpad/lldpad_git.bb
@@ -0,0 +1,35 @@ 
+SUMMARY = "Intel LLDP Agent"
+DESCRIPTION = "\
+This package contains the Linux user space daemon and configuration tool for \
+Intel LLDP Agent with Enhanced Ethernet support for the Data Center."
+
+HOMEPAGE = "http://open-lldp.org/"
+SECTION = "System Environment/Daemons"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162"
+DEPENDS = "libconfig libnl readline"
+
+SRC_URI = "git://open-lldp.org/open-lldp.git \
+           file://0001-fix-build-warnings.patch \
+           file://0002-Change-CFLAGS-to-avoid-error.patch \
+          "
+
+SRCREV = "2b7e05cff2b461efd0fb3e6e73b1bb0a23a330c1"
+
+PV = "1.0.1+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep pkgconfig systemd
+
+do_configure_prepend () {
+        ${S}/bootstrap.sh
+}
+
+do_install_append () {
+    install -m 0755 -d ${D}${systemd_unitdir}
+    mv ${D}${prefix}${systemd_unitdir}/* ${D}${systemd_unitdir}/
+    rmdir ${D}${prefix}${systemd_unitdir}
+}
+
+FILES_${PN} += "${systemd_unitdir}"

Comments

Joe MacDonald Jan. 11, 2018, 4:01 p.m.
[[oe] [meta-networking][PATCH] lldpad: new add] On 18.01.07 (Sun 18:59) zhengrq wrote:

> Add a new recipe lldpad_git.bb.
> 
> Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>

Is this related to the lldpad tree we removed in 2015?  The code repos
are different but the description makes them sound like one in the same
animal.

If that's the case, please have a look at the discussion on the patch
set where we replaced lldpad with lldpd:

   https://patchwork.openembedded.org/patch/103267/

I'm not opposed to carrying two different implementations that do
essentially the same thing provided there's a good reason to and that
both are more-or-less well maintained, but I think we had a good reason
to drop the other one last time.  Please let me know what you think.

> ---
>  .../lldpad/lldpad/0001-fix-build-warnings.patch    | 94 ++++++++++++++++++++++
>  .../lldpad/0002-Change-CFLAGS-to-avoid-error.patch | 25 ++++++
>  .../recipes-daemons/lldpad/lldpad_git.bb           | 35 ++++++++
>  3 files changed, 154 insertions(+)
>  create mode 100644 meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch
>  create mode 100644 meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch
>  create mode 100644 meta-networking/recipes-daemons/lldpad/lldpad_git.bb
> 
> diff --git a/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch b/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch
> new file mode 100644
> index 0000000..52c0978
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.patch
> @@ -0,0 +1,94 @@
> +From: Chris Leech <cleech@redhat.com>
> +Date: Wed, 17 Jun 2015 10:40:34 -0700
> +Subject: [PATCH] fix build warnings
> +

Please provide an upstream status on these.  I'm guessing backport for
the first and pending for the second, but it would be nice to have that
spelled out.

Thanks,
-J.

> +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> +---
> + include/lldp_8021qaz.h | 6 ------
> + lldp/agent.c           | 5 +++++
> + lldp/agent.h           | 6 +++---
> + lldp_util.c            | 4 ++--
> + 4 files changed, 10 insertions(+), 11 deletions(-)
> +
> +diff --git a/include/lldp_8021qaz.h b/include/lldp_8021qaz.h
> +index 55353b8..09dee20 100644
> +--- a/include/lldp_8021qaz.h
> ++++ b/include/lldp_8021qaz.h
> +@@ -218,9 +218,6 @@ int ieee8021qaz_mod_app(struct app_tlv_head *head, int peer,
> + 			u8 prio, u8 sel, u16 proto, u32 ops);
> + int ieee8021qaz_app_sethw(char *ifname, struct app_tlv_head *head);
> + 
> +-inline int get_prio_map(u32 prio_map, int tc);
> +-inline void set_prio_map(u32 *prio_map, u8 prio, int tc);
> +-
> + struct ieee8021qaz_tlvs *ieee8021qaz_data(const char *);
> + 
> + int ieee8021qaz_tlvs_rxed(const char *ifname);
> +@@ -234,9 +231,6 @@ int ieee8021qaz_rchange(struct port *port, struct lldp_agent *,
> + void ieee8021qaz_ifup(char *ifname, struct lldp_agent *);
> + void ieee8021qaz_ifdown(char *ifname, struct lldp_agent *);
> + u8 ieee8021qaz_mibDeleteObject(struct port *port, struct lldp_agent *);
> +-inline int ieee8021qaz_clif_cmd(void *data, struct sockaddr_un *from,
> +-				socklen_t fromlen, char *ibuf, int ilen,
> +-				char *rbuf);
> + int ieee8021qaz_check_operstate(void);
> + int get_dcbx_hw(const char *ifname, __u8 *dcbx);
> + 
> +diff --git a/lldp/agent.c b/lldp/agent.c
> +index 4bc5394..45def9a 100644
> +--- a/lldp/agent.c
> ++++ b/lldp/agent.c
> +@@ -36,6 +36,11 @@
> + #include "lldp_mand_clif.h"
> + #include "lldp/agent.h"
> + 
> ++/* IEEE 802.1AB-2009 - Table 7-1: group MAC addresses used by LLDP */
> ++const u8 nearest_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x0e};
> ++const u8 nearest_nontpmr_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x03};
> ++const u8 nearest_customer_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x00};
> ++
> + static const u8 * agent_groupmacs[AGENT_MAX] = {
> + 	nearest_bridge,
> + 	nearest_nontpmr_bridge,
> +diff --git a/lldp/agent.h b/lldp/agent.h
> +index a54f72f..90da3e0 100644
> +--- a/lldp/agent.h
> ++++ b/lldp/agent.h
> +@@ -48,9 +48,9 @@ enum agent_type {
> + };
> + 
> + /* IEEE 802.1AB-2009 - Table 7-1: group MAC addresses used by LLDP */
> +-static const u8 nearest_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x0e};
> +-static const u8 nearest_nontpmr_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x03};
> +-static const u8 nearest_customer_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x00};
> ++extern const u8 nearest_bridge[ETH_ALEN];
> ++extern const u8 nearest_nontpmr_bridge[ETH_ALEN];
> ++extern const u8 nearest_customer_bridge[ETH_ALEN];
> + 
> + struct agenttimers {
> + /* Tx */
> +diff --git a/lldp_util.c b/lldp_util.c
> +index 754b0cd..304ddc5 100644
> +--- a/lldp_util.c
> ++++ b/lldp_util.c
> +@@ -1177,7 +1177,7 @@ int check_link_status(const char *ifname)
> + int get_arg_val_list(char *ibuf, int ilen, int *ioff,
> + 			    char **args, char **argvals)
> + {
> +-	u8 arglen;
> ++	u8 arglen = 0;
> + 	u16 argvalue_len;
> + 	int *arglens = NULL;
> + 	int *argvallens = NULL;
> +@@ -1245,7 +1245,7 @@ int get_arg_val_list(char *ibuf, int ilen, int *ioff,
> + 
> + int get_arg_list(char *ibuf, int ilen, int *ioff, char **args)
> + {
> +-	u8 arglen;
> ++	u8 arglen = 0;
> + 	int *arglens = NULL;
> + 	int *p;
> + 	int numargs;
> +-- 
> +2.7.4
> +
> diff --git a/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch b/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch
> new file mode 100644
> index 0000000..5cb2a0a
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-avoid-error.patch
> @@ -0,0 +1,25 @@
> +Subject: [PATCH] Change CFLAGS to avoid error
> +Fix compile error like: warning: this statement may fall
> + through [-Wimplicit-fallthrough=]
> +
> +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> +---
> + Makefile.am | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index 4889d32..321bd7c 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -16,7 +16,7 @@ ACLOCAL_AMFLAGS = -I m4
> + parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error
> + 
> + ## system requires a shared libconfig
> +-AM_CFLAGS = -Wall -Werror -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS)
> ++AM_CFLAGS = -Wall -Wno-error -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS)
> + AM_LDFLAGS = $(LIBCONFIG_LIBS) $(LIBNL_LIBS)
> + 
> + ## header files to be installed, for programs using the client interface to lldpad 
> +-- 
> +2.7.4
> +
> diff --git a/meta-networking/recipes-daemons/lldpad/lldpad_git.bb b/meta-networking/recipes-daemons/lldpad/lldpad_git.bb
> new file mode 100644
> index 0000000..5203eb1
> --- /dev/null
> +++ b/meta-networking/recipes-daemons/lldpad/lldpad_git.bb
> @@ -0,0 +1,35 @@
> +SUMMARY = "Intel LLDP Agent"
> +DESCRIPTION = "\
> +This package contains the Linux user space daemon and configuration tool for \
> +Intel LLDP Agent with Enhanced Ethernet support for the Data Center."
> +
> +HOMEPAGE = "http://open-lldp.org/"
> +SECTION = "System Environment/Daemons"
> +LICENSE = "GPLv2"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162"
> +DEPENDS = "libconfig libnl readline"
> +
> +SRC_URI = "git://open-lldp.org/open-lldp.git \
> +           file://0001-fix-build-warnings.patch \
> +           file://0002-Change-CFLAGS-to-avoid-error.patch \
> +          "
> +
> +SRCREV = "2b7e05cff2b461efd0fb3e6e73b1bb0a23a330c1"
> +
> +PV = "1.0.1+git${SRCPV}"
> +S = "${WORKDIR}/git"
> +
> +inherit autotools-brokensep pkgconfig systemd
> +
> +do_configure_prepend () {
> +        ${S}/bootstrap.sh
> +}
> +
> +do_install_append () {
> +    install -m 0755 -d ${D}${systemd_unitdir}
> +    mv ${D}${prefix}${systemd_unitdir}/* ${D}${systemd_unitdir}/
> +    rmdir ${D}${prefix}${systemd_unitdir}
> +}
> +
> +FILES_${PN} += "${systemd_unitdir}"
> -- 
> 2.7.4
> 
> 
>
Zheng Ruoqin Jan. 12, 2018, 2:09 a.m.
Hi Joe:
     I'm sorry I didn't explain it in last time.

     > Is this related to the lldpad tree we removed in 2015?

     Yes, it is.

     >I'm not opposed to carrying two different implementations that do essentially the same thing provided there's a good reason to and that both are more-or-less well maintained, but I think we had a good reason to drop the other one last time.  Please let me know what you think.


     Now I have two thoughts for lldapd to be added in meta-networking

     1. Reference to the homepage of lldpad, it is not only an implementation of the LLDP protocol, the most important capabilities are:
        * Operation of the DCBX protocol(IEEE 802.1Qaz) for interfaces which support the DCB rtnetlink interface.
        * Configuring the DCB settings of the network driver based on the operation of DCBX.
 
     2. And in Fedora and Ubuntu, lldpad and lldpd are provided at the same time. So, for users who want DCBX, it seems a pity to remove lldpad in meta-oe. 

Best regards
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
       Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com


-----Original Message-----
From: Joe MacDonald [mailto:Joe_MacDonald@mentor.com] 

Sent: Friday, January 12, 2018 12:01 AM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [oe] [meta-networking][PATCH] lldpad: new add

[[oe] [meta-networking][PATCH] lldpad: new add] On 18.01.07 (Sun 18:59) zhengrq wrote:

> Add a new recipe lldpad_git.bb.

> 

> Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>


Is this related to the lldpad tree we removed in 2015?  The code repos are different but the description makes them sound like one in the same animal.

If that's the case, please have a look at the discussion on the patch set where we replaced lldpad with lldpd:

   https://patchwork.openembedded.org/patch/103267/

I'm not opposed to carrying two different implementations that do essentially the same thing provided there's a good reason to and that both are more-or-less well maintained, but I think we had a good reason to drop the other one last time.  Please let me know what you think.

> ---

>  .../lldpad/lldpad/0001-fix-build-warnings.patch    | 94 ++++++++++++++++++++++

>  .../lldpad/0002-Change-CFLAGS-to-avoid-error.patch | 25 ++++++

>  .../recipes-daemons/lldpad/lldpad_git.bb           | 35 ++++++++

>  3 files changed, 154 insertions(+)

>  create mode 100644 

> meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warnings.

> patch  create mode 100644 

> meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-av

> oid-error.patch  create mode 100644 

> meta-networking/recipes-daemons/lldpad/lldpad_git.bb

> 

> diff --git 

> a/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warning

> s.patch 

> b/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-warning

> s.patch

> new file mode 100644

> index 0000000..52c0978

> --- /dev/null

> +++ b/meta-networking/recipes-daemons/lldpad/lldpad/0001-fix-build-war

> +++ nings.patch

> @@ -0,0 +1,94 @@

> +From: Chris Leech <cleech@redhat.com>

> +Date: Wed, 17 Jun 2015 10:40:34 -0700

> +Subject: [PATCH] fix build warnings

> +


Please provide an upstream status on these.  I'm guessing backport for the first and pending for the second, but it would be nice to have that spelled out.

Thanks,
-J.

> +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>

> +---

> + include/lldp_8021qaz.h | 6 ------

> + lldp/agent.c           | 5 +++++

> + lldp/agent.h           | 6 +++---

> + lldp_util.c            | 4 ++--

> + 4 files changed, 10 insertions(+), 11 deletions(-)

> +

> +diff --git a/include/lldp_8021qaz.h b/include/lldp_8021qaz.h index 

> +55353b8..09dee20 100644

> +--- a/include/lldp_8021qaz.h

> ++++ b/include/lldp_8021qaz.h

> +@@ -218,9 +218,6 @@ int ieee8021qaz_mod_app(struct app_tlv_head *head, int peer,

> + 			u8 prio, u8 sel, u16 proto, u32 ops);  int 

> +ieee8021qaz_app_sethw(char *ifname, struct app_tlv_head *head);

> + 

> +-inline int get_prio_map(u32 prio_map, int tc); -inline void 

> +set_prio_map(u32 *prio_map, u8 prio, int tc);

> +-

> + struct ieee8021qaz_tlvs *ieee8021qaz_data(const char *);

> + 

> + int ieee8021qaz_tlvs_rxed(const char *ifname); @@ -234,9 +231,6 @@ 

> +int ieee8021qaz_rchange(struct port *port, struct lldp_agent *,  void 

> +ieee8021qaz_ifup(char *ifname, struct lldp_agent *);  void 

> +ieee8021qaz_ifdown(char *ifname, struct lldp_agent *);

> + u8 ieee8021qaz_mibDeleteObject(struct port *port, struct lldp_agent 

> +*); -inline int ieee8021qaz_clif_cmd(void *data, struct sockaddr_un *from,

> +-				socklen_t fromlen, char *ibuf, int ilen,

> +-				char *rbuf);

> + int ieee8021qaz_check_operstate(void);

> + int get_dcbx_hw(const char *ifname, __u8 *dcbx);

> + 

> +diff --git a/lldp/agent.c b/lldp/agent.c index 4bc5394..45def9a 

> +100644

> +--- a/lldp/agent.c

> ++++ b/lldp/agent.c

> +@@ -36,6 +36,11 @@

> + #include "lldp_mand_clif.h"

> + #include "lldp/agent.h"

> + 

> ++/* IEEE 802.1AB-2009 - Table 7-1: group MAC addresses used by LLDP 

> ++*/ const u8 nearest_bridge[ETH_ALEN] = 

> ++{0x01,0x80,0xc2,0x00,0x00,0x0e}; const u8 

> ++nearest_nontpmr_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x03}; 

> ++const u8 nearest_customer_bridge[ETH_ALEN] = 

> ++{0x01,0x80,0xc2,0x00,0x00,0x00};

> ++

> + static const u8 * agent_groupmacs[AGENT_MAX] = {

> + 	nearest_bridge,

> + 	nearest_nontpmr_bridge,

> +diff --git a/lldp/agent.h b/lldp/agent.h index a54f72f..90da3e0 

> +100644

> +--- a/lldp/agent.h

> ++++ b/lldp/agent.h

> +@@ -48,9 +48,9 @@ enum agent_type {

> + };

> + 

> + /* IEEE 802.1AB-2009 - Table 7-1: group MAC addresses used by LLDP 

> +*/ -static const u8 nearest_bridge[ETH_ALEN] = 

> +{0x01,0x80,0xc2,0x00,0x00,0x0e}; -static const u8 

> +nearest_nontpmr_bridge[ETH_ALEN] = {0x01,0x80,0xc2,0x00,0x00,0x03}; 

> +-static const u8 nearest_customer_bridge[ETH_ALEN] = 

> +{0x01,0x80,0xc2,0x00,0x00,0x00};

> ++extern const u8 nearest_bridge[ETH_ALEN]; extern const u8 

> ++nearest_nontpmr_bridge[ETH_ALEN];

> ++extern const u8 nearest_customer_bridge[ETH_ALEN];

> + 

> + struct agenttimers {

> + /* Tx */

> +diff --git a/lldp_util.c b/lldp_util.c index 754b0cd..304ddc5 100644

> +--- a/lldp_util.c

> ++++ b/lldp_util.c

> +@@ -1177,7 +1177,7 @@ int check_link_status(const char *ifname)  int 

> +get_arg_val_list(char *ibuf, int ilen, int *ioff,

> + 			    char **args, char **argvals)

> + {

> +-	u8 arglen;

> ++	u8 arglen = 0;

> + 	u16 argvalue_len;

> + 	int *arglens = NULL;

> + 	int *argvallens = NULL;

> +@@ -1245,7 +1245,7 @@ int get_arg_val_list(char *ibuf, int ilen, int 

> +*ioff,

> + 

> + int get_arg_list(char *ibuf, int ilen, int *ioff, char **args)  {

> +-	u8 arglen;

> ++	u8 arglen = 0;

> + 	int *arglens = NULL;

> + 	int *p;

> + 	int numargs;

> +--

> +2.7.4

> +

> diff --git 

> a/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-

> avoid-error.patch 

> b/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS-to-

> avoid-error.patch

> new file mode 100644

> index 0000000..5cb2a0a

> --- /dev/null

> +++ b/meta-networking/recipes-daemons/lldpad/lldpad/0002-Change-CFLAGS

> +++ -to-avoid-error.patch

> @@ -0,0 +1,25 @@

> +Subject: [PATCH] Change CFLAGS to avoid error Fix compile error like: 

> +warning: this statement may fall  through [-Wimplicit-fallthrough=]

> +

> +Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>

> +---

> + Makefile.am | 2 +-

> + 1 file changed, 1 insertion(+), 1 deletion(-)

> +

> +diff --git a/Makefile.am b/Makefile.am index 4889d32..321bd7c 100644

> +--- a/Makefile.am

> ++++ b/Makefile.am

> +@@ -16,7 +16,7 @@ ACLOCAL_AMFLAGS = -I m4

> + parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error

> + 

> + ## system requires a shared libconfig -AM_CFLAGS = -Wall -Werror 

> +-Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) $(LIBNL_CFLAGS)

> ++AM_CFLAGS = -Wall -Wno-error -Wextra -Wformat=2 $(LIBCONFIG_CFLAGS) 

> ++$(LIBNL_CFLAGS)

> + AM_LDFLAGS = $(LIBCONFIG_LIBS) $(LIBNL_LIBS)

> + 

> + ## header files to be installed, for programs using the client 

> +interface to lldpad

> +--

> +2.7.4

> +

> diff --git a/meta-networking/recipes-daemons/lldpad/lldpad_git.bb 

> b/meta-networking/recipes-daemons/lldpad/lldpad_git.bb

> new file mode 100644

> index 0000000..5203eb1

> --- /dev/null

> +++ b/meta-networking/recipes-daemons/lldpad/lldpad_git.bb

> @@ -0,0 +1,35 @@

> +SUMMARY = "Intel LLDP Agent"

> +DESCRIPTION = "\

> +This package contains the Linux user space daemon and configuration 

> +tool for \ Intel LLDP Agent with Enhanced Ethernet support for the Data Center."

> +

> +HOMEPAGE = "http://open-lldp.org/"

> +SECTION = "System Environment/Daemons"

> +LICENSE = "GPLv2"

> +

> +LIC_FILES_CHKSUM = "file://COPYING;md5=8c2bc283e65df398ced5f5b747e78162"

> +DEPENDS = "libconfig libnl readline"

> +

> +SRC_URI = "git://open-lldp.org/open-lldp.git \

> +           file://0001-fix-build-warnings.patch \

> +           file://0002-Change-CFLAGS-to-avoid-error.patch \

> +          "

> +

> +SRCREV = "2b7e05cff2b461efd0fb3e6e73b1bb0a23a330c1"

> +

> +PV = "1.0.1+git${SRCPV}"

> +S = "${WORKDIR}/git"

> +

> +inherit autotools-brokensep pkgconfig systemd

> +

> +do_configure_prepend () {

> +        ${S}/bootstrap.sh

> +}

> +

> +do_install_append () {

> +    install -m 0755 -d ${D}${systemd_unitdir}

> +    mv ${D}${prefix}${systemd_unitdir}/* ${D}${systemd_unitdir}/

> +    rmdir ${D}${prefix}${systemd_unitdir} }

> +

> +FILES_${PN} += "${systemd_unitdir}"

> --

> 2.7.4

> 

> 

> 

--
-Joe MacDonald.
:wq