netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/3] minor improvements to makefile, devlink
@ 2024-07-03 13:15 Przemek Kitszel
  2024-07-03 13:15 ` [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example Przemek Kitszel
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Przemek Kitszel @ 2024-07-03 13:15 UTC (permalink / raw)
  To: Stephen Hemminger, David Ahern
  Cc: netdev, Tony Nguyen, Lukasz Czapnik, Przemek Kitszel

Three minor improvements: better error messages from devlink app,
fix to one example in the man page of devlink-resource,
and better build experience for single-app focused devs.

Przemek Kitszel (3):
  man: devlink-resource: add missing words in the example
  devlink: print missing params even if an unknown one is present
  Makefile: support building from subdirectories

 Makefile                    | 45 -------------------------------------
 common.mk                   | 43 +++++++++++++++++++++++++++++++++++
 devlink/devlink.c           | 27 +++++++++++++++-------
 configure                   |  3 +++
 man/man8/devlink-resource.8 |  2 +-
 5 files changed, 66 insertions(+), 54 deletions(-)
 create mode 100644 common.mk


base-commit: 357808abd3a67bcf4d1444a25268c45dda62e87f
-- 
2.39.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example
  2024-07-03 13:15 [PATCH iproute2-next 0/3] minor improvements to makefile, devlink Przemek Kitszel
@ 2024-07-03 13:15 ` Przemek Kitszel
  2024-07-04 13:31   ` Michal Kubiak
  2024-07-03 13:15 ` [PATCH iproute2-next 2/3] devlink: print missing params even if an unknown one is present Przemek Kitszel
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Przemek Kitszel @ 2024-07-03 13:15 UTC (permalink / raw)
  To: Stephen Hemminger, David Ahern
  Cc: netdev, Tony Nguyen, Lukasz Czapnik, Przemek Kitszel

Add missing "size" and "path" words in the example, as the current example
is incorrect and will be rejected by the command.

The keywords were missing from very inception of devlink-resource man page

Fixes: 58b48c5d75e2 ("devlink: Update man pages and add resource man")
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 man/man8/devlink-resource.8 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/man8/devlink-resource.8 b/man/man8/devlink-resource.8
index 8c3158076a92..c4f6918c9b03 100644
--- a/man/man8/devlink-resource.8
+++ b/man/man8/devlink-resource.8
@@ -63,7 +63,7 @@ devlink resource show pci/0000:01:00.0
 Shows the resources of the specified devlink device.
 .RE
 .PP
-devlink resource set pci/0000:01:00.0 /kvd/linear 98304
+devlink resource set pci/0000:01:00.0 path /kvd/linear size 98304
 .RS 4
 Sets the size of the specified resource for the specified devlink device.
 .RE
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH iproute2-next 2/3] devlink: print missing params even if an unknown one is present
  2024-07-03 13:15 [PATCH iproute2-next 0/3] minor improvements to makefile, devlink Przemek Kitszel
  2024-07-03 13:15 ` [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example Przemek Kitszel
@ 2024-07-03 13:15 ` Przemek Kitszel
  2024-07-04 13:33   ` Michal Kubiak
  2024-07-03 13:15 ` [PATCH iproute2-next 3/3] Makefile: support building from subdirectories Przemek Kitszel
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Przemek Kitszel @ 2024-07-03 13:15 UTC (permalink / raw)
  To: Stephen Hemminger, David Ahern
  Cc: netdev, Tony Nguyen, Lukasz Czapnik, Przemek Kitszel,
	Maciej Fijalkowski

Print all of the missing parameters, also in the presence of unknown ones.

Take for example a correct command:
    $ devlink resource set pci/0000:01:00.0 path /kvd/linear size 98304
And remove the "size" keyword:
    $ devlink resource set pci/0000:01:00.0 path /kvd/linear 98304
That yields output:
    Resource size expected.
    Unknown option "98304"

Prior to the patch only the last line of output was present. And if user
would forgot also the "path" keyword, there will be additional line:
    Resource path expected.
in the stderr.

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 devlink/devlink.c | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 57bcc9658bdb..9907712e3ad0 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -1680,26 +1680,28 @@ static const struct dl_args_metadata dl_args_required[] = {
 static int dl_args_finding_required_validate(uint64_t o_required,
 					     uint64_t o_found)
 {
-	uint64_t o_flag;
-	int i;
+	uint64_t o_flag, o_missing = 0;
+	int i, err = 0;
 
 	for (i = 0; i < ARRAY_SIZE(dl_args_required); i++) {
 		o_flag = dl_args_required[i].o_flag;
 		if ((o_required & o_flag) && !(o_found & o_flag)) {
+			o_missing |= o_flag;
 			pr_err("%s\n", dl_args_required[i].err_msg);
-			return -ENOENT;
+			err = -ENOENT;
 		}
 	}
-	if (o_required & ~o_found) {
+	if (o_required & ~(o_found | o_missing)) {
 		pr_err("BUG: unknown argument required but not found\n");
 		return -EINVAL;
 	}
-	return 0;
+	return err;
 }
 
 static int dl_argv_parse(struct dl *dl, uint64_t o_required,
 			 uint64_t o_optional)
 {
+	const char *unknown_option = NULL;
 	struct dl_opts *opts = &dl->opts;
 	uint64_t o_all = o_required | o_optional;
 	char *str = dl_argv_next(dl);
@@ -2313,8 +2315,9 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
 			o_found |= DL_OPT_PORT_FN_MAX_IO_EQS;
 
 		} else {
-			pr_err("Unknown option \"%s\"\n", dl_argv(dl));
-			return -EINVAL;
+			if (!unknown_option)
+				unknown_option = dl_argv(dl);
+			dl_arg_inc(dl);
 		}
 	}
 
@@ -2325,7 +2328,15 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
 
 	opts->present = o_found;
 
-	return dl_args_finding_required_validate(o_required, o_found);
+	err = dl_args_finding_required_validate(o_required, o_found);
+
+	if (unknown_option) {
+		pr_err("Unknown option \"%s\"\n", unknown_option);
+		if (!err)
+			return -EINVAL;
+	}
+
+	return err;
 }
 
 static int dl_argv_dry_parse(struct dl *dl, uint64_t o_required,
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH iproute2-next 3/3] Makefile: support building from subdirectories
  2024-07-03 13:15 [PATCH iproute2-next 0/3] minor improvements to makefile, devlink Przemek Kitszel
  2024-07-03 13:15 ` [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example Przemek Kitszel
  2024-07-03 13:15 ` [PATCH iproute2-next 2/3] devlink: print missing params even if an unknown one is present Przemek Kitszel
@ 2024-07-03 13:15 ` Przemek Kitszel
  2024-07-03 15:16   ` Stephen Hemminger
  2024-07-07 16:48   ` David Ahern
  2024-07-07 16:50 ` [PATCH iproute2-next 0/3] minor improvements to makefile, devlink patchwork-bot+netdevbpf
  2024-07-08 22:30 ` patchwork-bot+netdevbpf
  4 siblings, 2 replies; 11+ messages in thread
From: Przemek Kitszel @ 2024-07-03 13:15 UTC (permalink / raw)
  To: Stephen Hemminger, David Ahern
  Cc: netdev, Tony Nguyen, Lukasz Czapnik, Przemek Kitszel

Support building also from subdirectories, like: `make -C devlink` or
`cd devlink; make`.

Extract common defines and include flags to a new file (common.mk) which
will be included from subdir makefiles via the generated config.mk file.

Note that the current, toplevel-issued, `make` still works as before.
Note that `./configure && make` is still required once after the fresh
checkout.

Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
---
 Makefile  | 45 ---------------------------------------------
 common.mk | 43 +++++++++++++++++++++++++++++++++++++++++++
 configure |  3 +++
 3 files changed, 46 insertions(+), 45 deletions(-)
 create mode 100644 common.mk

diff --git a/Makefile b/Makefile
index 2b2c3dec927e..1915b8191d3e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 # Top level Makefile for iproute2
 
--include config.mk
-
 ifeq ("$(origin V)", "command line")
 VERBOSE = $(V)
 endif
@@ -14,37 +12,6 @@ ifeq ($(VERBOSE),0)
 MAKEFLAGS += --no-print-directory
 endif
 
-PREFIX?=/usr
-SBINDIR?=/sbin
-NETNS_RUN_DIR?=/var/run/netns
-NETNS_ETC_DIR?=/etc/netns
-DATADIR?=$(PREFIX)/share
-HDRDIR?=$(PREFIX)/include/iproute2
-CONF_ETC_DIR?=/etc/iproute2
-CONF_USR_DIR?=$(DATADIR)/iproute2
-DOCDIR?=$(DATADIR)/doc/iproute2
-MANDIR?=$(DATADIR)/man
-ARPDDIR?=/var/lib/arpd
-KERNEL_INCLUDE?=/usr/include
-BASH_COMPDIR?=$(DATADIR)/bash-completion/completions
-
-# Path to db_185.h include
-DBM_INCLUDE:=$(DESTDIR)/usr/include
-
-SHARED_LIBS = y
-
-DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
-ifneq ($(SHARED_LIBS),y)
-DEFINES+= -DNO_SHARED_LIBS
-endif
-
-DEFINES+=-DCONF_USR_DIR=\"$(CONF_USR_DIR)\" \
-         -DCONF_ETC_DIR=\"$(CONF_ETC_DIR)\" \
-         -DNETNS_RUN_DIR=\"$(NETNS_RUN_DIR)\" \
-         -DNETNS_ETC_DIR=\"$(NETNS_ETC_DIR)\" \
-         -DARPDDIR=\"$(ARPDDIR)\" \
-         -DCONF_COLOR=$(CONF_COLOR)
-
 #options for AX.25
 ADDLIB+=ax25_ntop.o
 
@@ -59,24 +26,12 @@ ADDLIB+=netrom_ntop.o
 
 CC := gcc
 HOSTCC ?= $(CC)
-DEFINES += -D_GNU_SOURCE
-# Turn on transparent support for LFS
-DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-CCOPTS = -O2 -pipe
-WFLAGS := -Wall -Wstrict-prototypes  -Wmissing-prototypes
-WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
-
-CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
-YACCFLAGS = -d -t -v
 
 SUBDIRS=lib ip tc bridge misc netem genl man
 ifeq ($(HAVE_MNL),y)
 SUBDIRS += tipc devlink rdma dcb vdpa
 endif
 
-LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
-LDLIBS += $(LIBNETLINK)
-
 all: config.mk
 	@set -e; \
 	for i in $(SUBDIRS); \
diff --git a/common.mk b/common.mk
new file mode 100644
index 000000000000..de26322322d6
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,43 @@
+PREFIX?=/usr
+SBINDIR?=/sbin
+NETNS_RUN_DIR?=/var/run/netns
+NETNS_ETC_DIR?=/etc/netns
+DATADIR?=$(PREFIX)/share
+HDRDIR?=$(PREFIX)/include/iproute2
+CONF_ETC_DIR?=/etc/iproute2
+CONF_USR_DIR?=$(DATADIR)/iproute2
+DOCDIR?=$(DATADIR)/doc/iproute2
+MANDIR?=$(DATADIR)/man
+ARPDDIR?=/var/lib/arpd
+KERNEL_INCLUDE?=/usr/include
+BASH_COMPDIR?=$(DATADIR)/bash-completion/completions
+
+# Path to db_185.h include
+DBM_INCLUDE:=$(DESTDIR)/usr/include
+
+SHARED_LIBS = y
+
+DEFINES= -DRESOLVE_HOSTNAMES -DLIBDIR=\"$(LIBDIR)\"
+ifneq ($(SHARED_LIBS),y)
+DEFINES+= -DNO_SHARED_LIBS
+endif
+
+DEFINES+=-DCONF_USR_DIR=\"$(CONF_USR_DIR)\" \
+         -DCONF_ETC_DIR=\"$(CONF_ETC_DIR)\" \
+         -DNETNS_RUN_DIR=\"$(NETNS_RUN_DIR)\" \
+         -DNETNS_ETC_DIR=\"$(NETNS_ETC_DIR)\" \
+         -DARPDDIR=\"$(ARPDDIR)\" \
+         -DCONF_COLOR=$(CONF_COLOR)
+
+DEFINES += -D_GNU_SOURCE
+# Turn on transparent support for LFS
+DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+CCOPTS = -O2 -pipe
+WFLAGS := -Wall -Wstrict-prototypes  -Wmissing-prototypes
+WFLAGS += -Wmissing-declarations -Wold-style-definition -Wformat=2
+
+CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
+YACCFLAGS = -d -t -v
+
+LIBNETLINK=../lib/libutil.a ../lib/libnetlink.a
+LDLIBS += $(LIBNETLINK)
diff --git a/configure b/configure
index 928048b3d8c0..978f787ce4d3 100755
--- a/configure
+++ b/configure
@@ -615,6 +615,9 @@ check_cap
 echo -n "color output: "
 check_color
 
+# must be after check_color
+echo "include ../common.mk" >> $CONFIG
+
 echo >> $CONFIG
 echo "%.o: %.c" >> $CONFIG
 echo '	$(QUIET_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c -o $@ $<' >> $CONFIG
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 3/3] Makefile: support building from subdirectories
  2024-07-03 13:15 ` [PATCH iproute2-next 3/3] Makefile: support building from subdirectories Przemek Kitszel
@ 2024-07-03 15:16   ` Stephen Hemminger
  2024-07-03 15:28     ` Przemek Kitszel
  2024-07-07 16:48   ` David Ahern
  1 sibling, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2024-07-03 15:16 UTC (permalink / raw)
  To: Przemek Kitszel; +Cc: David Ahern, netdev, Tony Nguyen, Lukasz Czapnik

On Wed,  3 Jul 2024 15:15:21 +0200
Przemek Kitszel <przemyslaw.kitszel@intel.com> wrote:

> Support building also from subdirectories, like: `make -C devlink` or
> `cd devlink; make`.
> 
> Extract common defines and include flags to a new file (common.mk) which
> will be included from subdir makefiles via the generated config.mk file.
> 
> Note that the current, toplevel-issued, `make` still works as before.
> Note that `./configure && make` is still required once after the fresh
> checkout.
> 
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

Not sure if this really needed, it impacts more than devlink.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 3/3] Makefile: support building from subdirectories
  2024-07-03 15:16   ` Stephen Hemminger
@ 2024-07-03 15:28     ` Przemek Kitszel
  0 siblings, 0 replies; 11+ messages in thread
From: Przemek Kitszel @ 2024-07-03 15:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Ahern, netdev, Tony Nguyen, Lukasz Czapnik

On 7/3/24 17:16, Stephen Hemminger wrote:
> On Wed,  3 Jul 2024 15:15:21 +0200
> Przemek Kitszel <przemyslaw.kitszel@intel.com> wrote:
> 
>> Support building also from subdirectories, like: `make -C devlink` or
>> `cd devlink; make`.
>>
>> Extract common defines and include flags to a new file (common.mk) which
>> will be included from subdir makefiles via the generated config.mk file.
>>
>> Note that the current, toplevel-issued, `make` still works as before.
>> Note that `./configure && make` is still required once after the fresh
>> checkout.

[1]
This last "Note" could be fixed too to have proper dependencies
(in example of devlink, lib should be build first for example), and it
works now only thanks to serialized builds in terms of SUBDIRS in top
level Makefile.

>>
>> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> 
> Not sure if this really needed, it impacts more than devlink.

devlink is just an example here

This patch makes my development easier but it is not fixing [1]
above, so it's just a shortcut. You could drop this patch, let
me know if you will be interested in extending it to have [1] fixed.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example
  2024-07-03 13:15 ` [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example Przemek Kitszel
@ 2024-07-04 13:31   ` Michal Kubiak
  0 siblings, 0 replies; 11+ messages in thread
From: Michal Kubiak @ 2024-07-04 13:31 UTC (permalink / raw)
  To: Przemek Kitszel
  Cc: Stephen Hemminger, David Ahern, netdev, Tony Nguyen,
	Lukasz Czapnik

On Wed, Jul 03, 2024 at 03:15:19PM +0200, Przemek Kitszel wrote:
> Add missing "size" and "path" words in the example, as the current example
> is incorrect and will be rejected by the command.
> 
> The keywords were missing from very inception of devlink-resource man page
> 
> Fixes: 58b48c5d75e2 ("devlink: Update man pages and add resource man")
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---
>  man/man8/devlink-resource.8 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man/man8/devlink-resource.8 b/man/man8/devlink-resource.8
> index 8c3158076a92..c4f6918c9b03 100644
> --- a/man/man8/devlink-resource.8
> +++ b/man/man8/devlink-resource.8
> @@ -63,7 +63,7 @@ devlink resource show pci/0000:01:00.0
>  Shows the resources of the specified devlink device.
>  .RE
>  .PP
> -devlink resource set pci/0000:01:00.0 /kvd/linear 98304
> +devlink resource set pci/0000:01:00.0 path /kvd/linear size 98304
>  .RS 4
>  Sets the size of the specified resource for the specified devlink device.
>  .RE
> -- 
> 2.39.3
> 
> 

Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 2/3] devlink: print missing params even if an unknown one is present
  2024-07-03 13:15 ` [PATCH iproute2-next 2/3] devlink: print missing params even if an unknown one is present Przemek Kitszel
@ 2024-07-04 13:33   ` Michal Kubiak
  0 siblings, 0 replies; 11+ messages in thread
From: Michal Kubiak @ 2024-07-04 13:33 UTC (permalink / raw)
  To: Przemek Kitszel
  Cc: Stephen Hemminger, David Ahern, netdev, Tony Nguyen,
	Lukasz Czapnik, Maciej Fijalkowski

On Wed, Jul 03, 2024 at 03:15:20PM +0200, Przemek Kitszel wrote:
> Print all of the missing parameters, also in the presence of unknown ones.
> 
> Take for example a correct command:
>     $ devlink resource set pci/0000:01:00.0 path /kvd/linear size 98304
> And remove the "size" keyword:
>     $ devlink resource set pci/0000:01:00.0 path /kvd/linear 98304
> That yields output:
>     Resource size expected.
>     Unknown option "98304"
> 
> Prior to the patch only the last line of output was present. And if user
> would forgot also the "path" keyword, there will be additional line:
>     Resource path expected.
> in the stderr.
> 
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> ---
>  devlink/devlink.c | 27 +++++++++++++++++++--------
>  1 file changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/devlink/devlink.c b/devlink/devlink.c
> index 57bcc9658bdb..9907712e3ad0 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -1680,26 +1680,28 @@ static const struct dl_args_metadata dl_args_required[] = {
>  static int dl_args_finding_required_validate(uint64_t o_required,
>  					     uint64_t o_found)
>  {
> -	uint64_t o_flag;
> -	int i;
> +	uint64_t o_flag, o_missing = 0;
> +	int i, err = 0;
>  
>  	for (i = 0; i < ARRAY_SIZE(dl_args_required); i++) {
>  		o_flag = dl_args_required[i].o_flag;
>  		if ((o_required & o_flag) && !(o_found & o_flag)) {
> +			o_missing |= o_flag;
>  			pr_err("%s\n", dl_args_required[i].err_msg);
> -			return -ENOENT;
> +			err = -ENOENT;
>  		}
>  	}
> -	if (o_required & ~o_found) {
> +	if (o_required & ~(o_found | o_missing)) {
>  		pr_err("BUG: unknown argument required but not found\n");
>  		return -EINVAL;
>  	}
> -	return 0;
> +	return err;
>  }
>  
>  static int dl_argv_parse(struct dl *dl, uint64_t o_required,
>  			 uint64_t o_optional)
>  {
> +	const char *unknown_option = NULL;
>  	struct dl_opts *opts = &dl->opts;
>  	uint64_t o_all = o_required | o_optional;
>  	char *str = dl_argv_next(dl);
> @@ -2313,8 +2315,9 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
>  			o_found |= DL_OPT_PORT_FN_MAX_IO_EQS;
>  
>  		} else {
> -			pr_err("Unknown option \"%s\"\n", dl_argv(dl));
> -			return -EINVAL;
> +			if (!unknown_option)
> +				unknown_option = dl_argv(dl);
> +			dl_arg_inc(dl);
>  		}
>  	}
>  
> @@ -2325,7 +2328,15 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
>  
>  	opts->present = o_found;
>  
> -	return dl_args_finding_required_validate(o_required, o_found);
> +	err = dl_args_finding_required_validate(o_required, o_found);
> +
> +	if (unknown_option) {
> +		pr_err("Unknown option \"%s\"\n", unknown_option);
> +		if (!err)
> +			return -EINVAL;
> +	}
> +
> +	return err;
>  }
>  
>  static int dl_argv_dry_parse(struct dl *dl, uint64_t o_required,
> -- 
> 2.39.3
> 
> 

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 3/3] Makefile: support building from subdirectories
  2024-07-03 13:15 ` [PATCH iproute2-next 3/3] Makefile: support building from subdirectories Przemek Kitszel
  2024-07-03 15:16   ` Stephen Hemminger
@ 2024-07-07 16:48   ` David Ahern
  1 sibling, 0 replies; 11+ messages in thread
From: David Ahern @ 2024-07-07 16:48 UTC (permalink / raw)
  To: Przemek Kitszel, Stephen Hemminger; +Cc: netdev, Tony Nguyen, Lukasz Czapnik

On 7/3/24 7:15 AM, Przemek Kitszel wrote:
> Support building also from subdirectories, like: `make -C devlink` or
> `cd devlink; make`.
> 
> Extract common defines and include flags to a new file (common.mk) which
> will be included from subdir makefiles via the generated config.mk file.
> 
> Note that the current, toplevel-issued, `make` still works as before.
> Note that `./configure && make` is still required once after the fresh
> checkout.
> 

That is a very disruptive requirement - e.g., someone running git bisect.

Even after a configure, I get build failures:

    LINK     rtmon
/usr/bin/ld: ../lib/libutil.a(utils.o): in function `drop_cap':
utils.c:(.text+0x2c6a): undefined reference to `cap_get_proc'
/usr/bin/ld: utils.c:(.text+0x2c89): undefined reference to `cap_get_flag'
/usr/bin/ld: utils.c:(.text+0x2c9d): undefined reference to `cap_clear'
/usr/bin/ld: utils.c:(.text+0x2ca9): undefined reference to `cap_set_proc'
/usr/bin/ld: utils.c:(.text+0x2cb5): undefined reference to `cap_free'
/usr/bin/ld: ../lib/libnetlink.a(libnetlink.o): in function `err_attr_cb':
libnetlink.c:(.text+0x1a): undefined reference to `mnl_attr_type_valid'
/usr/bin/ld: libnetlink.c:(.text+0x26): undefined reference to
`mnl_attr_get_type'
/usr/bin/ld: libnetlink.c:(.text+0x40): undefined reference to
`mnl_attr_validate'
/usr/bin/ld: ../lib/libnetlink.a(libnetlink.o): in function
`nl_dump_ext_ack':
libnetlink.c:(.text+0x2f5): undefined reference to `mnl_nlmsg_get_payload'
/usr/bin/ld: libnetlink.c:(.text+0x323): undefined reference to
`mnl_attr_parse'
/usr/bin/ld: libnetlink.c:(.text+0x366): undefined reference to
`mnl_attr_get_str'
/usr/bin/ld: libnetlink.c:(.text+0x37e): undefined reference to
`mnl_attr_get_u32'
/usr/bin/ld: libnetlink.c:(.text+0x3a7): undefined reference to
`mnl_attr_get_u32'
/usr/bin/ld: libnetlink.c:(.text+0x3e5): undefined reference to
`mnl_nlmsg_get_payload_len'
/usr/bin/ld: ../lib/libnetlink.a(libnetlink.o): in function
`nl_dump_ext_ack_done':
libnetlink.c:(.text+0x8e4): undefined reference to `mnl_attr_parse'
/usr/bin/ld: libnetlink.c:(.text+0x8f8): undefined reference to
`mnl_attr_get_str'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:32: rtmon] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:36: all] Error 2

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 0/3] minor improvements to makefile, devlink
  2024-07-03 13:15 [PATCH iproute2-next 0/3] minor improvements to makefile, devlink Przemek Kitszel
                   ` (2 preceding siblings ...)
  2024-07-03 13:15 ` [PATCH iproute2-next 3/3] Makefile: support building from subdirectories Przemek Kitszel
@ 2024-07-07 16:50 ` patchwork-bot+netdevbpf
  2024-07-08 22:30 ` patchwork-bot+netdevbpf
  4 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-07 16:50 UTC (permalink / raw)
  To: Przemek Kitszel
  Cc: stephen, dsahern, netdev, anthony.l.nguyen, lukasz.czapnik

Hello:

This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:

On Wed,  3 Jul 2024 15:15:18 +0200 you wrote:
> Three minor improvements: better error messages from devlink app,
> fix to one example in the man page of devlink-resource,
> and better build experience for single-app focused devs.
> 
> Przemek Kitszel (3):
>   man: devlink-resource: add missing words in the example
>   devlink: print missing params even if an unknown one is present
>   Makefile: support building from subdirectories
> 
> [...]

Here is the summary with links:
  - [iproute2-next,1/3] man: devlink-resource: add missing words in the example
    (no matching commit)
  - [iproute2-next,2/3] devlink: print missing params even if an unknown one is present
    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=77241a525bdc
  - [iproute2-next,3/3] Makefile: support building from subdirectories
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH iproute2-next 0/3] minor improvements to makefile, devlink
  2024-07-03 13:15 [PATCH iproute2-next 0/3] minor improvements to makefile, devlink Przemek Kitszel
                   ` (3 preceding siblings ...)
  2024-07-07 16:50 ` [PATCH iproute2-next 0/3] minor improvements to makefile, devlink patchwork-bot+netdevbpf
@ 2024-07-08 22:30 ` patchwork-bot+netdevbpf
  4 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-08 22:30 UTC (permalink / raw)
  To: Przemek Kitszel
  Cc: stephen, dsahern, netdev, anthony.l.nguyen, lukasz.czapnik

Hello:

This series was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Wed,  3 Jul 2024 15:15:18 +0200 you wrote:
> Three minor improvements: better error messages from devlink app,
> fix to one example in the man page of devlink-resource,
> and better build experience for single-app focused devs.
> 
> Przemek Kitszel (3):
>   man: devlink-resource: add missing words in the example
>   devlink: print missing params even if an unknown one is present
>   Makefile: support building from subdirectories
> 
> [...]

Here is the summary with links:
  - [iproute2-next,1/3] man: devlink-resource: add missing words in the example
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=830f490e92df
  - [iproute2-next,2/3] devlink: print missing params even if an unknown one is present
    (no matching commit)
  - [iproute2-next,3/3] Makefile: support building from subdirectories
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-08 22:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 13:15 [PATCH iproute2-next 0/3] minor improvements to makefile, devlink Przemek Kitszel
2024-07-03 13:15 ` [PATCH iproute2-next 1/3] man: devlink-resource: add missing words in the example Przemek Kitszel
2024-07-04 13:31   ` Michal Kubiak
2024-07-03 13:15 ` [PATCH iproute2-next 2/3] devlink: print missing params even if an unknown one is present Przemek Kitszel
2024-07-04 13:33   ` Michal Kubiak
2024-07-03 13:15 ` [PATCH iproute2-next 3/3] Makefile: support building from subdirectories Przemek Kitszel
2024-07-03 15:16   ` Stephen Hemminger
2024-07-03 15:28     ` Przemek Kitszel
2024-07-07 16:48   ` David Ahern
2024-07-07 16:50 ` [PATCH iproute2-next 0/3] minor improvements to makefile, devlink patchwork-bot+netdevbpf
2024-07-08 22:30 ` patchwork-bot+netdevbpf

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).