All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Simon Horman <simon.horman@netronome.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>, Phil Sutter <phil@nwl.cc>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [RFC] iproute: Add support for extended ack to rtnl_talk
Date: Mon, 7 Aug 2017 10:48:23 -0600	[thread overview]
Message-ID: <8e8bc709-55b0-e207-b4bf-605bdf2ba323@gmail.com> (raw)
In-Reply-To: <20170804094729.00548085@xeon-e3>

On 8/4/17 10:47 AM, Stephen Hemminger wrote:
> I will put in the libmnl version. If it doesn't work because no one sent
> me test cases, then fine. send a patch for that.

This commit:

commit b6432e68ac2f1f6b4ea50aa0d6d47e72c445c71c
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Fri Aug 4 09:52:15 2017 -0700

    iproute: Add support for extended ack to rtnl_talk


Does not work. Seems like you pushed the RFC commit which was known to
be incomplete.


First, the Config is HAVE_MNL not HAVE_LIBMNL which is in lib/libnetlink.c.

Second, changing that to HAVE_MNL does not work -- something is not
getting passed in correctly. Just remove the semicolon on the else path:

+#else
+/* No extended error ack without libmnl */
+static int nl_dump_ext_err(const struct nlmsghdr *nlh, nl_ext_ack_fn_t
errfn)
+{
+       return 0;
+}
+#endif

and you will see that HAVE_MNL is never defined.

Third, force that path to build and you get:

ip
    LINK     ip
../lib/libnetlink.a(libnetlink.o): In function `err_attr_cb':
libnetlink.c:(.text+0x10): undefined reference to `mnl_attr_type_valid'
libnetlink.c:(.text+0x1c): undefined reference to `mnl_attr_get_type'
libnetlink.c:(.text+0x34): undefined reference to `mnl_attr_validate'
../lib/libnetlink.a(libnetlink.o): In function `__rtnl_talk':
libnetlink.c:(.text+0x408): undefined reference to `mnl_nlmsg_get_payload'
libnetlink.c:(.text+0x42c): undefined reference to
`mnl_nlmsg_get_payload_len'
libnetlink.c:(.text+0x445): undefined reference to `mnl_attr_parse'
libnetlink.c:(.text+0x454): undefined reference to `mnl_attr_get_str'
libnetlink.c:(.text+0x46a): undefined reference to `mnl_attr_get_u32'
collect2: error: ld returned 1 exit status
Makefile:29: recipe for target 'ip' failed
make[1]: *** [ip] Error 1
Makefile:66: recipe for target 'all' failed
make: *** [all] Error 2


as I mentioned in a past response the libmnl dependency can not be
placed on libutil.a -- because it is an archive. That means each and
every command that uses libutil.a needs to inherit the libmnl dependency.

  reply	other threads:[~2017-08-07 16:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 23:56 [RFC] iproute: Add support for extended ack to rtnl_talk Stephen Hemminger
2017-05-04  9:36 ` Daniel Borkmann
2017-05-04 14:27   ` David Ahern
2017-05-04 14:41     ` David Miller
2017-05-04 15:50       ` Jamal Hadi Salim
2017-05-04 16:43       ` Stephen Hemminger
2017-05-04 20:43         ` Phil Sutter
2017-05-14  1:29           ` David Ahern
2017-05-16 16:36             ` Stephen Hemminger
2017-05-18 10:02               ` Daniel Borkmann
2017-05-18 14:55                 ` Stephen Hemminger
2017-05-19  4:24                 ` David Ahern
2017-08-03 20:26                   ` David Ahern
2017-08-04 11:31                     ` Simon Horman
2017-08-04 16:47                       ` Stephen Hemminger
2017-08-07 16:48                         ` David Ahern [this message]
2017-08-07 18:06                           ` Stephen Hemminger
2017-08-07 18:09                             ` David Ahern
2017-08-07 18:45                               ` David Miller
2017-08-07 19:12                                 ` Stephen Hemminger
2017-08-07 20:26                                   ` David Miller
2017-08-07 21:21                                     ` Stephen Hemminger
2017-05-04 14:37   ` Leon Romanovsky
2017-05-04 16:45     ` Stephen Hemminger
2017-05-04 17:55       ` Leon Romanovsky
2017-05-06 10:36         ` Jiri Pirko
2017-05-04 16:42   ` Stephen Hemminger

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=8e8bc709-55b0-e207-b4bf-605bdf2ba323@gmail.com \
    --to=dsahern@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    --cc=simon.horman@netronome.com \
    --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 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.