Re: iproute2: fix build on glibc < 2.21 / uClibc

2018-10-28 Thread Petr Vorel
Subject: [iproute] utils.h: provide fallback CLOCK_TAI definition In-Reply-To: <20181027153102.32302-1-pe...@korsgaard.com> To: Stephen Hemminger , Vinicius Costa Gomes Cc: netdev@vger.kernel.org, Peter Korsgaard From: Petr Vorel List-Id: > q_{etf,taprio}.c uses CLOCK_TAI, wh

Re: [PATCH iproute2 1/1] DEBUG: Fix make check when need build generate_nlmsg

2018-10-22 Thread Petr Vorel
Hi Stephen, > Applied, it seem to have gotten lost somewhere between my laptop and the repo. Thanks a lot for merging :). There is a patchset "Minor shell code cleanup", which has state Accepted, but not in git https://patchwork.ozlabs.org/project/netdev/list/?series=67063=* Did they got lost as

Re: [PATCH iproute2 1/1] DEBUG: Fix make check when need build generate_nlmsg

2018-10-20 Thread Petr Vorel
emove LDLIBS entirely (as > required -lmnl flag was specified in 5dc2204c ("testsuite: add libmnl"). > Fixes: 8804a8c0 ("Makefile: Add check target") > Signed-off-by: Petr Vorel > --- > Hi Stephen, > I'm sorry for this regression. > Kind regards, >

[PATCH iproute2 1/1] DEBUG: Fix make check when need build generate_nlmsg

2018-09-25 Thread Petr Vorel
t;). Fixes: 8804a8c0 ("Makefile: Add check target") Signed-off-by: Petr Vorel --- Hi Stephen, I'm sorry for this regression. Kind regards, Petr --- testsuite/tools/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/tools/Makefile b/testsuite/tools/Ma

[PATCH iproute2 4/7] configure: Remove non-posix shell expansion

2018-09-22 Thread Petr Vorel
+ change shebang to /bin/sh Signed-off-by: Petr Vorel --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 34325f99..8f4a7f1e 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/sh # SPDX-License-Identifier

[PATCH iproute2 5/7] configure: Code cleanup

2018-09-22 Thread Petr Vorel
Signed-off-by: Petr Vorel --- configure | 65 +++ 1 file changed, 18 insertions(+), 47 deletions(-) diff --git a/configure b/configure index 8f4a7f1e..86c4cf58 100755 --- a/configure +++ b/configure @@ -32,9 +32,7 @@ int main(int argc, char

[PATCH iproute2 2/7] tests: Use /bin/sh shebang

2018-09-22 Thread Petr Vorel
Bashisms for both tests were removed in ecd44e68 ("tests: Remove bashisms (s/source/.)"), so no need to use bash shebang. + remove trailing whitespace. Signed-off-by: Petr Vorel --- testsuite/tests/tc/cls-testbed.t | 4 ++-- testsuite/tests/tc/dsmark.t | 2 +- 2 files

[PATCH iproute2 6/7] examples: Remove dhcp-client-script

2018-09-22 Thread Petr Vorel
This script is obsolete. Signed-off-by: Petr Vorel --- examples/dhcp-client-script | 446 1 file changed, 446 deletions(-) delete mode 100644 examples/dhcp-client-script diff --git a/examples/dhcp-client-script b/examples/dhcp-client-script deleted file

[PATCH iproute2 1/7] man: rtpr: Rename s/bash/shell/

2018-09-22 Thread Petr Vorel
ip/rtpr mentioned in man as bash script is actually posix shell script (doesn't require to use bash). Signed-off-by: Petr Vorel --- man/man8/rtpr.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/rtpr.8 b/man/man8/rtpr.8 index 1b04a821..87f291ab 100644 --- a/man

[PATCH iproute2 7/7] examples: Remove cbq.init-v0.7.3

2018-09-22 Thread Petr Vorel
This script is obsolete. Signed-off-by: Petr Vorel --- examples/cbq.init-v0.7.3 | 983 --- 1 file changed, 983 deletions(-) delete mode 100644 examples/cbq.init-v0.7.3 diff --git a/examples/cbq.init-v0.7.3 b/examples/cbq.init-v0.7.3 deleted file mode 100644

[PATCH iproute2 0/7] Minor shell code cleanup

2018-09-22 Thread Petr Vorel
Hi, this patchset does minor cleanup in shell scripts: * remove bashisms * use /bin/sh shebang * remove obsolete code from examples * remove unused code Kind regards, Petr Petr Vorel (7): man: rtpr: Rename s/bash/shell/ tests: Use /bin/sh shebang configure: Remove unused function

[PATCH iproute2 3/7] configure: Remove unused function check_prog()

2018-09-22 Thread Petr Vorel
Signed-off-by: Petr Vorel --- configure | 6 -- 1 file changed, 6 deletions(-) diff --git a/configure b/configure index 5ef5cd4c..34325f99 100755 --- a/configure +++ b/configure @@ -11,12 +11,6 @@ CONFIG=config.mk TMPDIR=$(mktemp -d config.XX) trap 'status=$?; rm -rf $TMPDIR; exit

[PATCH iproute2 1/1] Makefile: Add check target

2018-09-21 Thread Petr Vorel
Signed-off-by: Petr Vorel --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 25de3893..b7488add 100644 --- a/Makefile +++ b/Makefile @@ -77,6 +77,7 @@ help: @echo " clean - remove products of build" @echo &

[PATCH iproute2 v2 0/3] testsuite: make alltests fixes

2018-09-19 Thread Petr Vorel
Hi, here are simply fixes to restore 'make alltests'. Currently it does not run. Kind regards, Petr Petr Vorel (3): testsuite: Fix missing generate_nlmsg testsuite: Generate generate_nlmsg when needed testsuite: Warn about empty $(IPVERS) testsuite/Makefile | 21 ++--- 1

[PATCH iproute2 v2 1/3] testsuite: Fix missing generate_nlmsg

2018-09-19 Thread Petr Vorel
Commit ad23e152 caused generate_nlmsg to be always missing: $ make alltests make: ./tools/generate_nlmsg: Command not found Create testclean: to remove only results directory. Fixes: ad23e152 testsuite: remove all temp files and implement make clean Signed-off-by: Petr Vorel --- testsuite

[PATCH iproute2 v2 3/3] testsuite: Warn about empty $(IPVERS)

2018-09-19 Thread Petr Vorel
alltests target requires having symlink created by configure target (default target). Without that there is no test being run. Signed-off-by: Petr Vorel --- testsuite/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testsuite/Makefile b/testsuite/Makefile index 1c2467f5..b3aebec1

[PATCH iproute2 v2 2/3] testsuite: Generate generate_nlmsg when needed

2018-09-19 Thread Petr Vorel
Commit 886f2c43 added generate_nlmsg.c. Running alltests target, which uses the binary required to run 'make -C tools' before. Fixes: 886f2c43 testsuite: Generate nlmsg blob at runtime Signed-off-by: Petr Vorel --- testsuite/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

Re: [PATCH iproute2] ip maddr: fix filtering by device

2017-10-19 Thread Petr Vorel
ma.name. > > Fixes: 530903dd9003 ("ip: fix igmp parsing when iface is long") > > Signed-off-by: Michal Kubecek <mkube...@suse.cz> > Acked-by: Phil Sutter <p...@nwl.cc> Acked-by: Petr Vorel <pvo...@suse.cz> Thanks for fixing, Michal. Petr

Re: [PATCH] tests: Remove bashisms (s/source/.)

2017-10-15 Thread Petr Vorel
Hi Mark, > > --- a/testsuite/tests/ip/route/add_default_route.t > > +++ b/testsuite/tests/ip/route/add_default_route.t > > @@ -1,6 +1,6 @@ > > -#!/bin/sh > > +#!/bin/bash > Funny - ^^^ choosing bash explicitly while > removing the bashism? Eh, this is really silly, sorry. I've sent a

[PATCH iproute2 1/1] tests: Revert back /bin/sh in shebang

2017-10-15 Thread Petr Vorel
This was added by mistake in commit ecd44e68 ("tests: Remove bashisms (s/source/.)") Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- testsuite/tests/ip/route/add_default_route.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/tests/ip/route/add

[PATCH iproute2 v2 2/4] color: Fix another ip segfault when using --color switch

2017-10-13 Thread Petr Vorel
s removing it and restoring "magic" offset + 7. Reproduce with: $ ip -c a Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- include/color.h | 1 - lib/color.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/color.h b/include/color.h index

[PATCH iproute2 v2 4/4] color: Rename enum

2017-10-13 Thread Petr Vorel
COLOR_NONE is more descriptive than COLOR_CLEAR. Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- include/color.h | 2 +- include/json_print.h | 2 +- lib/color.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/color.h b/include/color.h

[PATCH iproute2 v2 3/4] color: Cleanup code to remove "magic" offset + 7

2017-10-13 Thread Petr Vorel
Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- lib/color.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/color.c b/lib/color.c index 05afcb21..497f5e1b 100644 --- a/lib/color.c +++ b/lib/color.c @@ -45,8 +45,8 @@ static const char * const color

[PATCH iproute2 v2 1/4] color: Fix ip segfault when using --color switch

2017-10-13 Thread Petr Vorel
; is used to ask for color set suitable for dark background. Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- include/json_print.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/json_print.h b/include/json_print.h index b6ce1f9f..596af35a 100644 ---

[PATCH iproute2 v2 0/4] Fix ip segfault when using --color switch

2017-10-13 Thread Petr Vorel
Hi Stephen, I cleanup code not to use magic offsets. I kept it in separate commits, as it's clearer what happened. Petr Vorel (4): color: Fix ip segfault when using --color switch color: Fix another ip segfault when using --color switch color: Cleanup code to remove "magic"

[PATCH] tests: Remove bashisms (s/source/.)

2017-10-08 Thread Petr Vorel
Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- testsuite/tests/ip/link/new_link.t| 2 +- testsuite/tests/ip/link/show_dev_wo_vf_rate.t | 2 +- testsuite/tests/ip/netns/set_nsid.t | 2 +- testsuite/tests/ip/netns/set_nsid_batch.t | 2 +- testsuite/tests/ip

[PATCH iproute2 1/1] color: Fix ip segfault in color_fprintf() when using --color switch

2017-10-08 Thread Petr Vorel
r color set suitable for light background, COLORFGBG="15;0" is used to ask for color set suitable for dark background. Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- include/json_print.h | 2 +- lib/color.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-

Re: [PATCH net] r8152: fix the list rx_done may be used without initialization

2017-03-14 Thread Petr Vorel
Hi Hayes, > The list rx_done would be initialized when the linking on occurs. > Therefore, if a napi is scheduled without any linking on before, > the following kernel panic would happen. > BUG: unable to handle kernel NULL pointer dereference at 008 > IP: []

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Petr Vorel
> > > Unfortunately this doesn't work. Code in r8152.c doesn't use > > > local_bh_enable()/local_bh_disable(). I tried to lock it with > > > spin_lock_bh()/spin_unlock_bh() and with mutex_lock()/mutex_unlock() > > > but neither work. > > The local_bh_disable() / local_bh_enable() definitely is

Re: [PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Petr Vorel
Hi Eric, > > The proper work around is to enclose the napi_schedule() in a > > local_bh_enable()/local_bh_disable() pair. > Something like : > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -3703,8 +3703,10 @@ static int rtl8152_resume(struct usb_interface *intf) >

[PATCH 1/1] r8152: fix NULL pointer dereference in r8152_poll

2017-03-13 Thread Petr Vorel
89b4cf067 PUD 898ff2067 PMD 0 Oops: 0002 [#1] PREEMPT SMP Signed-off-by: Petr Vorel <petr.vo...@gmail.com> --- NOTE: This is just a workaround, I suppose, there is better way how to fix that (which allows keeping scheduling the napi for rx after napi_enable()). --- drivers/net/usb/r8152

[iproute PATCH v3 1/1] color: use "light" colors for dark background

2017-03-01 Thread Petr Vorel
COLORFGBG environment variable is used to detect dark background. Idea and a bit of code is borrowed from Vim, thanks. Signed-off-by: Petr Vorel <pvo...@suse.cz> --- Changes v2->v3: remove unnecessary cast. --- include/color.h | 1 + lib/color.c

[iproute PATCH v2 1/1] color: use "light" colors for dark background

2017-02-27 Thread Petr Vorel
COLORFGBG environment variable is used to detect dark background. Idea and a bit of code is borrowed from Vim, thanks. Signed-off-by: Petr Vorel <pvo...@suse.cz> --- Changes v1->V2: * Rename function and enum values * Add missing bold white enum + it's code. --- include/color.h |

Re: [PATCH 1/1] color: use "light" colors for dark background

2017-02-27 Thread Petr Vorel
Hi, > Yea, I admit, the original color palette is kind of horrendous. I > wouldn't say the current colors are suitable for a light background > either. > I propose you just replace the current colors with their bold > variants, and leave the background hue guessing out all together. That > would

Re: [PATCH 1/1] color: use "light" colors for dark background

2017-02-27 Thread Petr Vorel
Hi, > This really needs to be standardized with some convention. So that ls, grep, > git > all behave the same and done by some standard library. > The current method is hack that keeps on growing. It would be easier, if the code could be adapted by some broadly used library, than start new

[PATCH 1/1] color: use "light" colors for dark background

2017-02-24 Thread Petr Vorel
COLORFGBG environment variable is used to detect dark background. Idea and a bit of code is borrowed from Vim, thanks. Signed-off-by: Petr Vorel <pvo...@suse.cz> --- Colors are nice, but the ones chosen aren't suitable for dark background. COLORFGBG environment variable is used in some lib

Re: [PATCH 1/1] ip: fix igmp parsing when iface is long

2017-01-17 Thread Petr Vorel
Hi, > Entries with long vhost names in /proc/net/igmp have no whitespace > between name and colon, so sscanf() adds it to vhost and > 'ip maddr show iface' doesn't include inet result. Bug was also reported to bugzilla (https://bugzilla.kernel.org/show_bug.cgi?id=192741), with updated comment

[PATCH 1/1] ip: fix igmp parsing when iface is long

2017-01-16 Thread Petr Vorel
Entries with long vhost names in /proc/net/igmp have no whitespace between name and colon, so sscanf() adds it to vhost and 'ip maddr show iface' doesn't include inet result. Signed-off-by: Petr Vorel <pvo...@suse.cz> --- ip/ipmaddr.c | 6 +- 1 file changed, 5 insertions(+), 1 de