[PATCH iproute2 1/1] tc: Fix binding of gact action by index.

2019-06-06 Thread Roman Mashak
the order of keywords passed on the command line, we can teach gact to skip parsing arguments as soon as it sees 'gact' followed by 'index' keyword. Signed-off-by: Roman Mashak --- tc/m_gact.c | 4 1 file changed, 4 insertions(+) diff --git a/tc/m_gact.c b/tc/m_gact.

[PATCH net-next 2/2] tc-testing: updated skbedit action tests with batch create/delete

2019-07-12 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/skbedit.json | 47 ++ 1 file changed, 47 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/skbedit.json b/tools/testing/selftests/tc-testing/tc-tests/actions/skbedit.json

[PATCH net-next 1/2] net sched: update skbedit action for batched events operations

2019-07-12 Thread Roman Mashak
Add get_fill_size() routine used to calculate the action size when building a batch of events. Signed-off-by: Roman Mashak --- net/sched/act_skbedit.c | 12 1 file changed, 12 insertions(+) diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index 215a06705cef

[PATCH net-next v2 1/2] net sched: update skbedit action for batched events operations

2019-07-17 Thread Roman Mashak
Add get_fill_size() routine used to calculate the action size when building a batch of events. Fixes: ca9b0e27e ("pkt_action: add new action skbedit") Signed-off-by: Roman Mashak --- net/sched/act_skbedit.c | 12 1 file changed, 12 insertions(+) diff --git a

[PATCH net-next v2 2/2] tc-testing: updated skbedit action tests with batch create/delete

2019-07-17 Thread Roman Mashak
Update TDC tests with cases varifying ability of TC to install or delete batches of skbedit actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/skbedit.json | 47 ++ 1 file changed, 47 insertions(+) diff --git a/tools/testing/selftests/tc-testing

[PATCH net-next v2 0/2] Fix batched event generation for skbedit action

2019-07-17 Thread Roman Mashak
, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant skbedit test cases. v2: Added Fixes: tag Added cover letter with details on the patchset Roman Mashak (2): net sched: update skbedit action for batched events operations tc-testing: updated skbed

[PATCH net-next 1/1] tc-testing: added tdc tests for [b|p]fifo qdisc

2019-07-23 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../selftests/tc-testing/tc-tests/qdiscs/fifo.json | 304 + 1 file changed, 304 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs

Re: [PATCH net-next 1/2] net sched: update skbedit action for batched events operations

2019-07-25 Thread Roman Mashak
David Miller writes: > From: Roman Mashak > Date: Fri, 12 Jul 2019 18:21:59 -0400 > >> Add get_fill_size() routine used to calculate the action size >> when building a batch of events. >> >> Signed-off-by: Roman Mashak > > Please add an appropriate Fi

[PATCH net 1/2] net sched: update vlan action for batched events operations

2019-08-02 Thread Roman Mashak
Add get_fill_size() routine used to calculate the action size when building a batch of events. Fixes: c7e2b9689 ("sched: introduce vlan action") Signed-off-by: Roman Mashak --- net/sched/act_vlan.c | 9 + 1 file changed, 9 insertions(+) diff --git a/net/sched/act_vlan.c b

[PATCH net 2/2] tc-testing: updated vlan action tests with batch create/delete

2019-08-02 Thread Roman Mashak
Update TDC tests with cases varifying ability of TC to install or delete batches of vlan actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/vlan.json | 94 ++ 1 file changed, 94 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc

[PATCH net 0/2] Fix batched event generation for vlan action

2019-08-02 Thread Roman Mashak
ion size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant vlan test cases. Roman Mashak (2): net sched: update vlan action for batched events operations tc-testing: updated vlan action tests with batch create/delete

[PATCH net 0/2] Fix batched event generation for skbedit action

2019-08-07 Thread Roman Mashak
ack in tc_action_ops of skbedit action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant skbedit test cases. Roman Mashak (2): net sched: update skbedit action for batched events operations tc-testing: up

[PATCH net 2/2] tc-testing: updated skbedit action tests with batch create/delete

2019-08-07 Thread Roman Mashak
Update TDC tests with cases varifying ability of TC to install or delete batches of skbedit actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/skbedit.json | 47 ++ 1 file changed, 47 insertions(+) diff --git a/tools/testing/selftests/tc-testing

[PATCH net 1/2] net sched: update skbedit action for batched events operations

2019-08-07 Thread Roman Mashak
Add get_fill_size() routine used to calculate the action size when building a batch of events. Fixes: ca9b0e27e ("pkt_action: add new action skbedit") Signed-off-by: Roman Mashak --- net/sched/act_skbedit.c | 12 1 file changed, 12 insertions(+) diff --git a

[PATCH net-next 1/1] tc-testing: added tdc tests for matchall filter

2019-08-09 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/filters/matchall.json | 391 + 1 file changed, 391 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json diff --git a/tools/testing/selftests/tc-testing/tc-tests

Re: [PATCH iproute2-next 11/15] lib: Extract from iplink_vlan a helper to parse key:value arrays

2020-10-20 Thread Roman Mashak
Petr Machata writes: [...] > +static int parse_qos_mapping(__u32 key, char *value, void *data) > +{ > + struct nlmsghdr *n = data; > + struct ifla_vlan_qos_mapping m = { > + .from = key, > + }; > + > + if (get_u32(&m.to, value, 0)) > + return 1; > + > +

Re: [PATCH iproute2-next v2] iproute2: ss: add support to expose various inet sockopts

2020-08-19 Thread Roman Mashak
Wei Wang writes: > This commit adds support to expose the following inet socket options: > -- recverr > -- is_icsk > -- freebind > -- hdrincl > -- mc_loop > -- transparent > -- mc_all > -- nodefrag > -- bind_address_no_port > -- recverr_rfc4884 > -- defer_connect > with the option --inet-sockopt.

[PATCH net-next 1/1] tc-tests: updated fw with bind actions by reference use cases

2019-06-11 Thread Roman Mashak
Extended fw TDC tests with use cases where actions are pre-created and attached to a filter by reference, i.e. by action index. Signed-off-by: Roman Mashak --- .../selftests/tc-testing/tc-tests/filters/fw.json | 144 + 1 file changed, 144 insertions(+) diff --git a/tools

Re: [iproute2 net-next PATCH] ip: add a new parameter -Numeric

2019-06-12 Thread Roman Mashak
Hangbin Liu writes: > Add a new parameter '-Numeric' to show the number of protocol, scope, > dsfield, etc directly instead of converting it to human readable name. > Do the same on tc and ss. > > This patch is based on David Ahern's previous patch. > [...] It would be good idea to specify the

Re: [iproute2 net-next PATCH] ip: add a new parameter -Numeric

2019-06-14 Thread Roman Mashak
David Ahern writes: > On 6/12/19 10:01 AM, Roman Mashak wrote: >> Hangbin Liu writes: >> >>> Add a new parameter '-Numeric' to show the number of protocol, scope, >>> dsfield, etc directly instead of converting it to human readable name. >>

[PATCH net-next 1/1] tc-tests: added path to ip command in tdc

2019-06-15 Thread Roman Mashak
This macro $IP will be used in upcoming tc tests, which require to create interfaces etc. Signed-off-by: Roman Mashak --- tools/testing/selftests/tc-testing/tdc_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tdc_config.py b/tools/testing

[PATCH net-next 1/1] tc-tests: updated skbedit tests

2019-06-15 Thread Roman Mashak
- Added index upper bound test case - Added mark upper bound test case - Re-worded descriptions to few cases for clarity Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/skbedit.json | 62 ++ 1 file changed, 53 insertions(+), 9 deletions(-) diff --git a

[PATCH net-next 1/1] tc-testing: add ingress qdisc tests

2019-06-25 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/qdiscs/ingress.json| 102 + 1 file changed, 102 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/ingress.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs

[PATCH net-next 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing

2018-05-09 Thread Roman Mashak
rror. So checking flags should be done as early as possible, before idr lookups. Signed-off-by: Roman Mashak --- net/sched/act_skbedit.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index ddf69fc01bdf..6c88037faf51 10

[PATCH v2 net 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing

2018-05-11 Thread Roman Mashak
ncing it is an error as happens in tcf_idr_release, where refcnt is decremented. So in case of missing flags tcf_idr_release must be called only for existing actions. v2: - prepare patch for net tree Signed-off-by: Roman Mashak --- net/sched/act_skbedit.c | 3 ++- 1 file changed, 2 insertions(+), 1 d

[PATCH net 1/1] net sched actions: fix refcnt leak in skbmod

2018-05-11 Thread Roman Mashak
patch fixes this by calling tcf_idr_release() on existing actions. Fixes: 86da71b57383d ("net_sched: Introduce skbmod action") Signed-off-by: Roman Mashak --- net/sched/act_skbmod.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/sched/act_skbmod.c b

[PATCH iproute2 1/1] tc: return on invalid smac or dmac in ife action

2018-04-20 Thread Roman Mashak
Return on invalid smac/dmac and use invarg consistently for invalid arguments report. Signed-off-by: Roman Mashak --- tc/m_ife.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index d7e61703f666..ed0913a379aa 100644 --- a/tc/m_ife.c

[PATCH net-next 1/1] tc-testing: updated ife test cases

2018-04-20 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../selftests/tc-testing/tc-tests/actions/ife.json | 1036 +++- 1 file changed, 1024 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/ife.json b/tools/testing/selftests/tc-testing/tc-tests/actions

[PATCH iproute2 1/1] tc: print actual action for connmark action

2018-03-20 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_connmark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_connmark.c b/tc/m_connmark.c index 37d718541549..d5b140cbb7bd 100644 --- a/tc/m_connmark.c +++ b/tc/m_connmark.c @@ -121,7 +121,8 @@ static int print_connmark(struct

[PATCH iproute2 1/1] tc: print index, refcnt & bindcnt for nat action

2018-03-20 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_nat.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tc/m_nat.c b/tc/m_nat.c index 1e4ff51fe75a..f6e373957c1b 100644 --- a/tc/m_nat.c +++ b/tc/m_nat.c @@ -169,6 +169,9 @@ print_nat(struct action_util *au, FILE * f, struct rtattr *arg

[PATCH net-next 1/1] tc-testing: updated police, mirred, skbedit and skbmod with more tests

2018-03-21 Thread Roman Mashak
Added extra test cases for control actions (reclassify, pipe etc.), cookies, max index value and police args sanity check. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/mirred.json| 192 + .../tc-testing/tc-tests/actions/police.json| 144

[RESEND PATCH net-next 1/1] tc-testing: updated police, mirred, skbedit and skbmod with more tests

2018-03-22 Thread Roman Mashak
Added extra test cases for control actions (reclassify, pipe etc.), cookies, max index value and police args sanity check. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/mirred.json| 192 + .../tc-testing/tc-tests/actions/police.json| 144

Re: [RESEND PATCH net-next 1/1] tc-testing: updated police, mirred, skbedit and skbmod with more tests

2018-03-22 Thread Roman Mashak
David Miller writes: > From: Roman Mashak > Date: Thu, 22 Mar 2018 08:23:22 -0400 > >> diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json >> b/tools/testing/selftests/tc-testing/tc-tests/actions/skbmod.json >> index 90bba48c3f07..8aa5a88

[PATCH net-next 1/1] net sched actions: merge event notification routines

2018-03-22 Thread Roman Mashak
Collapse tca_get_notify(), tca_add_notify() and tca_del_notify() in a single function since they repeat the same code pattern. Signed-off-by: Roman Mashak --- net/sched/act_api.c | 111 1 file changed, 33 insertions(+), 78 deletions(-) diff

Re: [PATCH iproute2] ss: Fix rendering of continuous output (-E, --events)

2018-03-23 Thread Roman Mashak
Stefano Brivio writes: > Roman Mashak reported that ss currently shows no output when it > should continuously report information about terminated sockets > (-E, --events switch). > > This happens because I missed this case in 691bd854bf4a ("ss: > Buffer raw fields first

[RESEND PATCH net-next 1/1] tc-testing: updated police, mirred, skbedit and skbmod with more tests

2018-03-25 Thread Roman Mashak
Added extra test cases for control actions (reclassify, pipe etc.), cookies, max index value and police args sanity check. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/mirred.json| 192 + .../tc-testing/tc-tests/actions/police.json| 144

Re: [PATCH iproute2 1/1] tc: print index, refcnt & bindcnt for nat action

2018-03-27 Thread Roman Mashak
Stephen Hemminger writes: > On Tue, 20 Mar 2018 14:21:47 -0400 > Roman Mashak wrote: > >> Signed-off-by: Roman Mashak >> --- >> tc/m_nat.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/tc/m_nat.c b/tc/m_nat.c >> index 1e

Re: [PATCH v3 iproute2 1/1] tc: fix conversion types when printing actions unsigned values

2018-03-27 Thread Roman Mashak
Stephen Hemminger writes: > On Mon, 19 Mar 2018 17:05:41 -0400 > Roman Mashak wrote: > >> diff --git a/tc/m_gact.c b/tc/m_gact.c >> index 16c4413f4217..52022415db48 100644 >> --- a/tc/m_gact.c >> +++ b/tc/m_gact.c >> @@ -194,7 +194,7 @@ print_gact(

[PATCH iproute2-next 1/1] tc: enable json output for actions

2018-03-28 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_action.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tc/m_action.c b/tc/m_action.c index 6c3049c7db88..8891659ae15a 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -364,6 +364,7 @@ tc_print_action(FILE *f

[PATCH net-next 1/1] tc-testing: add connmark action tests

2018-03-29 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/connmark.json | 291 + 1 file changed, 291 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/connmark.json diff --git a/tools/testing/selftests/tc-testing/tc-tests

[PATCH net-next 0/2] Fix batched event generation for mirred action

2019-06-28 Thread Roman Mashak
h 1 adds callback in tc_action_ops of mirred action, which calculates the action size, and passes size to tcf_add_notify()/tcf_del_notify(). patch 2 updates the TDC test suite with relevant test cases. Roman Mashak (2): net sched: update mirred action for batched events operations tc-testing: updated

[PATCH net-next 1/2] net sched: update mirred action for batched events operations

2019-06-28 Thread Roman Mashak
Add get_fill_size() routine used to calculate the action size when building a batch of events. Signed-off-by: Roman Mashak --- net/sched/act_mirred.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index 58e7573dded4..2857c8dd4c04 100644

[PATCH net-next 2/2] tc-testing: updated mirred action tests with batch create/delete

2019-06-28 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/mirred.json| 94 ++ 1 file changed, 94 insertions(+) diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json b/tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json index

[PATCH net-next 1/1] tc-testing: added tdc tests for prio qdisc

2019-06-28 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../selftests/tc-testing/tc-tests/qdiscs/prio.json | 276 + 1 file changed, 276 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/prio.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs

[PATCH iproute2 1/2] tc: added mask parameter in skbedit action

2019-07-03 Thread Roman Mashak
Add 32-bit missing mask attribute in iproute2/tc, which has been long supported by the kernel side. Signed-off-by: Roman Mashak --- tc/m_skbedit.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c index

[PATCH iproute2 2/2] tc: document 'mask' parameter in skbedit man page

2019-07-03 Thread Roman Mashak
Signed-off-by: Roman Mashak --- man/man8/tc-skbedit.8 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man/man8/tc-skbedit.8 b/man/man8/tc-skbedit.8 index 2459198261e6..704f63bdb061 100644 --- a/man/man8/tc-skbedit.8 +++ b/man/man8/tc-skbedit.8 @@ -9,8 +9,7 @@ skbedit

Re: [PATCH net-next v6 5/5] selftests: tc-tests: actions: add MPLS tests

2019-07-05 Thread Roman Mashak
John Hurley writes: > Add a new series of selftests to verify the functionality of act_mpls in > TC. > > Signed-off-by: John Hurley > Reviewed-by: Simon Horman > Acked-by: Jakub Kicinski > --- > tools/testing/selftests/tc-testing/config | 1 + > .../tc-testing/tc-tests/actions/mpls

Re: [PATCH iproute2 1/2] tc: added mask parameter in skbedit action

2019-07-08 Thread Roman Mashak
Stephen Hemminger writes: > On Wed, 3 Jul 2019 19:05:31 -0400 > Roman Mashak wrote: > >> +if (tb[TCA_SKBEDIT_MASK]) { >> +print_uint(PRINT_ANY, "mask", "/0x%x", >> + rta_getattr_u32(tb[TCA_SKBEDIT_MASK])); >

[PATCH iproute2 v2 1/2] tc: added mask parameter in skbedit action

2019-07-08 Thread Roman Mashak
Add 32-bit missing mask attribute in iproute2/tc, which has been long supported by the kernel side. v2: print value in hex with print_hex() as suggested by Stephen Hemminger. Signed-off-by: Roman Mashak --- tc/m_skbedit.c | 30 ++ 1 file changed, 26 insertions(+), 4

[PATCH iproute2 v2 2/2] tc: document 'mask' parameter in skbedit man page

2019-07-08 Thread Roman Mashak
Signed-off-by: Roman Mashak --- man/man8/tc-skbedit.8 | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man/man8/tc-skbedit.8 b/man/man8/tc-skbedit.8 index 2459198261e6..704f63bdb061 100644 --- a/man/man8/tc-skbedit.8 +++ b/man/man8/tc-skbedit.8 @@ -9,8 +9,7 @@ skbedit

[PATCH net-next 1/1] tc-tests: updated skbedit tests

2019-07-11 Thread Roman Mashak
- Added mask upper bound test case - Added mask validation test case - Added mask replacement case Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/skbedit.json | 117 + 1 file changed, 117 insertions(+) diff --git a/tools/testing/selftests/tc-testing

Re: [PATCH iproute2 v2] m_mirred: don't bail if the control action is missing

2019-05-20 Thread Roman Mashak
On Mon, May 20, 2019 at 5:58 AM Paolo Abeni wrote: > > The mirred act admits an optional control action, defaulting > to TC_ACT_PIPE. The parsing code currently emits an error message > if the control action is not provided on the command line, even > if the command itself completes with no error.

[PATCH net-next 1/1] veth: tweak creation of veth device

2017-10-10 Thread Roman Mashak
link show dev veth0 5: veth0@veth1: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether f6:ef:8b:96:f4:ec brd ff:ff:ff:ff:ff:ff % Signed-off-by: Roman Mashak --- drivers/net/veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCH net-next 0/2] Fix IFE meta modules loading

2017-10-11 Thread Roman Mashak
Adjust module alias names of IFE meta modules and fix the bug that prevented auto-loading IFE modules in run-time. Roman Mashak (2): net sched actions: change IFE modules alias names net sched actions: fix module auto-loading include/net/tc_act/tc_ife.h | 2 +- net/sched/act_ife.c

[PATCH net-next 1/2] net sched actions: change IFE modules alias names

2017-10-11 Thread Roman Mashak
quot;net sched ife action: Introduce skb tcindex metadata encap decap") Signed-off-by: Roman Mashak --- include/net/tc_act/tc_ife.h | 2 +- net/sched/act_ife.c | 2 +- net/sched/act_meta_mark.c | 2 +- net/sched/act_meta_skbprio.c| 2 +- net/sched/act_meta_skbtcinde

[PATCH net-next 2/2] net sched actions: fix module auto-loading

2017-10-11 Thread Roman Mashak
Macro __stringify_1() can stringify a macro argument, however IFE_META_* are enums, so they never expand, however request_module expects an integer in IFE module name, so as a result it always fails to auto-load. Fixes: ef6980b6becb ("introduce IFE action") Signed-off-by: Roman Mashak

[PATCH net-next 1/1] bridge: return error code when deleting Vlan

2017-10-11 Thread Roman Mashak
Signed-off-by: Roman Mashak --- net/bridge/br_netlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index f0e8268..a1e1ca8 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -527,11 +527,11

[PATCH net-next v2 1/1] bridge: return error code when deleting Vlan

2017-10-12 Thread Roman Mashak
v2: Return err immediately if nbp_vlan_delete() fails (pointed by David Ahern) Signed-off-by: Roman Mashak --- net/bridge/br_netlink.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index f0e8268..1efdd48 100644

Re: [PATCH net-next 1/1] veth: tweak creation of veth device

2017-10-12 Thread Roman Mashak
gt;> Example: >> >> % ip link dev veth0 type veth >> RTNETLINK answers: File exists >> >> After fix: >> % ip link dev veth0 type veth >> % ip link show dev veth0 >> 5: veth0@veth1: mtu 1500 qdisc noop state DOWN mode >> DEFAULT group default

Re: [PATCH net-next v2 1/1] bridge: return error code when deleting Vlan

2017-10-12 Thread Roman Mashak
On Thu, Oct 12, 2017 at 10:19 AM, David Ahern wrote: > On 10/12/17 7:51 AM, Roman Mashak wrote: >> v2: >> Return err immediately if nbp_vlan_delete() fails (pointed by David Ahern) >> >> Signed-off-by: Roman Mashak >> --- >> net/bridge/br_netlink.c | 8 ++

Re: [PATCH net-next 0/2] Fix IFE meta modules loading

2017-10-12 Thread Roman Mashak
David Miller writes: > From: Roman Mashak > Date: Wed, 11 Oct 2017 10:50:28 -0400 > >> Adjust module alias names of IFE meta modules and fix the bug that >> prevented auto-loading IFE modules in run-time. > > Anyone using the existing alises will be broken by th

Re: [PATCH net-next v2 1/1] bridge: return error code when deleting Vlan

2017-10-13 Thread Roman Mashak
Nikolay Aleksandrov writes: [...] >>> Why do you want to return the error code here? Walking the code paths >>> seems like ENOENT or err from switchdev_port_obj_del are the 2 error >>> possibilities. >> >> For example, if you attempt to delete a non-existing vlan on a port, >> the current code

Re: [Patch net-next] net_sched: fix a compile warning in act_ife

2017-10-13 Thread Roman Mashak
_meta_id2name(u32 metaid) > ^~~~ Fair enough, thanks Cong! > Fixes: d3f24ba895f0 ("net sched actions: fix module auto-loading") > Cc: Roman Mashak > Signed-off-by: Cong Wang > --- > net/sched/act_ife.c | 2 ++ > 1 file changed, 2 insertions(+) > > d

[PATCH net 5/5] net sched actions: fix misleading text strings in pedit action

2018-06-19 Thread Roman Mashak
Change "tc filter pedit .." to "tc actions pedit .." in error messages to clearly refer to pedit action. Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sch

[PATCH net 1/5] net sched actions: fix coding style in pedit action

2018-06-19 Thread Roman Mashak
Fix coding style issues in tc pedit action detected by the checkpatch script. Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index

[PATCH net 2/5] net sched actions: fix coding style in pedit headers

2018-06-19 Thread Roman Mashak
Fix coding style issues in tc pedit headers detected by the checkpatch script. Signed-off-by: Roman Mashak --- include/net/tc_act/tc_pedit.h| 1 + include/uapi/linux/tc_act/tc_pedit.h | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/net/tc_act

[PATCH net 3/5] net sched actions: fix sparse warning

2018-06-19 Thread Roman Mashak
ned-off-by: Roman Mashak --- net/sched/act_pedit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index e4b29ee79ba8..9c2d8a31a5c5 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -290,7 +290,7 @@ static int

[PATCH net 4/5] net sched actions: use sizeof operator for buffer length

2018-06-19 Thread Roman Mashak
Replace constant integer with sizeof() to clearly indicate the destination buffer length in skb_header_pointer() calls. Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c

[PATCH net 0/5] net sched actions: code style cleanup and fixes

2018-06-19 Thread Roman Mashak
ator instead of magic number for buffer length Patch 5 fixes typos in diagnostics messages Roman Mashak (5): net sched actions: fix coding style in pedit action net sched actions: fix coding style in pedit headers net sched actions: fix sparse warning net sched actions: use sizeof operator

Re: [PATCH net 5/5] net sched actions: fix misleading text strings in pedit action

2018-06-19 Thread Roman Mashak
Stephen Hemminger writes: > On Tue, 19 Jun 2018 12:56:08 -0400 [...] >> @@ -326,12 +326,12 @@ static int tcf_pedit(struct sk_buff *skb, const struct >> tc_action *a, >> } >> >> if (offset % 4) { >> -pr_info("tc filter pedi

Re: [PATCH net 1/5] net sched actions: fix coding style in pedit action

2018-06-20 Thread Roman Mashak
Davide Caratti writes: > On Tue, 2018-06-19 at 12:56 -0400, Roman Mashak wrote: >> Fix coding style issues in tc pedit action detected by the >> checkpatch script. >> >> Signed-off-by: Roman Mashak > ... > >> --- >> @@ -316,16 +318,15 @@ static in

[PATCH v2 net-next 1/6] net sched actions: fix coding style in pedit action

2018-06-27 Thread Roman Mashak
Fix coding style issues in tc pedit action detected by the checkpatch script. Reviewed-by: Simon Horman Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched

[PATCH v2 net-next 0/6] net sched actions: code style cleanup and fixes

2018-06-27 Thread Roman Mashak
ator instead of magic number for buffer length Patch 5 fixes typos in diagnostics messages Patch 6 explicitly sets unsigned char for bitwise operation v2: - submit for net-next - added Reviewed-by tags - use u8* instead of char* as per Davide Caratti suggestion Roman Mashak (6): net s

[PATCH v2 net-next 6/6] net sched actions: avoid bitwise operation on signed value in pedit

2018-06-27 Thread Roman Mashak
Since char can be unsigned or signed, and bitwise operators may have implementation-dependent results when performed on signed operands, declare 'u8 *' operand instead. Suggested-by: Davide Caratti Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 2 +- 1 file changed, 1 inser

[PATCH v2 net-next 4/6] net sched actions: use sizeof operator for buffer length

2018-06-27 Thread Roman Mashak
Replace constant integer with sizeof() to clearly indicate the destination buffer length in skb_header_pointer() calls. Reviewed-by: Simon Horman Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sched/act_pedit.c

[PATCH v2 net-next 5/6] net sched actions: fix misleading text strings in pedit action

2018-06-27 Thread Roman Mashak
Change "tc filter pedit .." to "tc actions pedit .." in error messages to clearly refer to pedit action. Reviewed-by: Simon Horman Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/sch

[PATCH v2 net-next 2/6] net sched actions: fix coding style in pedit headers

2018-06-27 Thread Roman Mashak
Fix coding style issues in tc pedit headers detected by the checkpatch script. Reviewed-by: Simon Horman Signed-off-by: Roman Mashak --- include/net/tc_act/tc_pedit.h| 1 + include/uapi/linux/tc_act/tc_pedit.h | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH v2 net-next 3/6] net sched actions: fix sparse warning

2018-06-27 Thread Roman Mashak
eviewed-by: Simon Horman Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index e4b29ee79ba8..9c2d8a31a5c5 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c

[PATCH net-next 1/1] net sched actions: add extack messages in pedit action

2018-07-01 Thread Roman Mashak
Signed-off-by: Roman Mashak --- net/sched/act_pedit.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index ab151346d3d4..55bc96b610e8 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -144,8

Re: [PATCH iproute2-next] tc: m_tunnel_key: Add tunnel option support to act_tunnel_key

2018-07-06 Thread Roman Mashak
Jakub Kicinski writes: > From: Simon Horman > > Allow setting tunnel options using the act_tunnel_key action. > > Options are expressed as class:type:data and multiple options > may be listed using a comma delimiter. > > # ip link add name geneve0 type geneve dstport 0 external > # tc qdisc ad

[PATCH net-next 1/1] tc-testing: add csum tests

2018-03-08 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/csum.json | 410 + 1 file changed, 410 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/csum.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions

[PATCH v3 net-next 1/4] net sched actions: update Add/Delete action API with new argument

2018-03-08 Thread Roman Mashak
Introduce a new function argument to carry total attributes size for correct allocation of skb in event messages. Signed-off-by: Roman Mashak --- include/net/act_api.h | 3 ++- net/sched/act_api.c | 21 + net/sched/cls_api.c | 3 ++- 3 files changed, 17 insertions

[PATCH v3 net-next 4/4] net sched actions: implement get_fill_size routine in act_gact

2018-03-08 Thread Roman Mashak
Signed-off-by: Roman Mashak --- net/sched/act_gact.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index 74563254e676..88fbb8403565 100644 --- a/net/sched/act_gact.c +++ b/net/sched/act_gact.c @@ -217,6 +217,19 @@ static int

[PATCH v3 net-next 2/4] net sched actions: add new tc_action_ops callback

2018-03-08 Thread Roman Mashak
Add a new callback in tc_action_ops, it will be needed by the tc actions to compute its size when a ADD/DELETE notification message is constructed. This routine has to take into account optional/variable size TLVs specific per action. Signed-off-by: Roman Mashak --- include/net/act_api.h | 1

[PATCH v3 net-next 0/4] Fix event generation for actions batch Add/Delete mode

2018-03-08 Thread Roman Mashak
t;get_fill_size() isn't implemented. v2: Restructured patches to make them bisectable. Roman Mashak (4): net sched actions: update Add/Delete action API with new argument net sched actions: add new tc_action_ops callback net sched actions: calculate add/delete event message size

[PATCH v3 net-next 3/4] net sched actions: calculate add/delete event message size

2018-03-08 Thread Roman Mashak
message is being allocated and constructed. Signed-off-by: Roman Mashak --- net/sched/act_api.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 3de0e0610200..57cf37145282 100644 --- a/net/sched

[PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-09 Thread Roman Mashak
Add test cases to exercise code paths responsible for adding or deleting batch of TC actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/gact.json | 73 +- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/tc

[PATCH net-next 1/1] tc-testing: add TC vlan action tests

2018-03-09 Thread Roman Mashak
Signed-off-by: Roman Mashak Tested-by: Brenda J. Butler --- .../tc-testing/tc-tests/actions/vlan.json | 410 + 1 file changed, 410 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/vlan.json diff --git a/tools/testing/selftests

[PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-09 Thread Roman Mashak
Add test cases to exercise code paths responsible for adding or deleting batch of TC actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/gact.json | 73 +- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/tc

[PATCH iproute2 1/1] tc: fix output when printing flower's TOS or TTL

2018-03-10 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/f_flower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/f_flower.c b/tc/f_flower.c index 5a4ec832bc19..5cf19139dcae 100644 --- a/tc/f_flower.c +++ b/tc/f_flower.c @@ -1131,7 +1131,7 @@ static void flower_print_ip_attr(char *name

Re: [PATCH iproute2 1/1] tc: fix output when printing flower's TOS or TTL

2018-03-10 Thread Roman Mashak
Stephen Hemminger writes: > On Sat, 10 Mar 2018 08:31:26 -0500 > Roman Mashak wrote: > >> Signed-off-by: Roman Mashak >> --- >> tc/f_flower.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tc/f_flower.c b/tc/f_flower

Re: [PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-12 Thread Roman Mashak
David Miller writes: > From: Roman Mashak > Date: Fri, 9 Mar 2018 17:16:12 -0500 > >> Add test cases to exercise code paths responsible for adding or deleting >> batch of TC actions. >> >> Signed-off-by: Roman Mashak > > You submitted this patch twic

[RESEND PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-12 Thread Roman Mashak
Add test cases to exercise code paths responsible for adding or deleting batch of TC actions. Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/gact.json | 73 +- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/tc

Re: [PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-12 Thread Roman Mashak
David Miller writes: > From: Roman Mashak > Date: Mon, 12 Mar 2018 12:39:57 -0400 > >> David Miller writes: >> >>> From: Roman Mashak >>> Date: Fri, 9 Mar 2018 17:16:12 -0500 >>> >>>> Add test cases to exercise code paths

[RESEND PATCH net-next 1/1] tc-testing: add TC vlan action tests

2018-03-12 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/vlan.json | 410 + 1 file changed, 410 insertions(+) create mode 100644 tools/testing/selftests/tc-testing/tc-tests/actions/vlan.json diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions

[RESEND PATCH net-next 1/1] tc-testing: updated gact tests with batch test cases

2018-03-12 Thread Roman Mashak
Signed-off-by: Roman Mashak --- .../tc-testing/tc-tests/actions/gact.json | 73 +- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/gact.json b/tools/testing/selftests/tc-testing/tc-tests/actions

[PATCH net-next 1/1] net sched actions: return explicit error when tunnel_key mode is not specified

2018-03-12 Thread Roman Mashak
5 41 83 47 2c [ 35.837442] RIP: tcf_action_init+0x90/0x190 RSP: b8edc068b9a0 [ 35.838291] ---[ end trace a095c06ee4b97a26 ]--- Fixes: d0f6dd8a914f ("net/sched: Introduce act_tunnel_key") Signed-off-by: Roman Mashak --- net/sched/act_tunnel_key.c | 1 + 1 file changed, 1 inserti

[PATCH iproute2 1/1] tc: print actual action for sample action

2018-03-13 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_sample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tc/m_sample.c b/tc/m_sample.c index ff5ee6bd1ef6..d88846c63be3 100644 --- a/tc/m_sample.c +++ b/tc/m_sample.c @@ -163,6 +163,8 @@ static int print_sample(struct action_util *au, FILE *f, struct

[PATCH v2 net 1/1] net sched actions: return explicit error when tunnel_key mode is not specified

2018-03-13 Thread Roman Mashak
5 41 83 47 2c [ 35.837442] RIP: tcf_action_init+0x90/0x190 RSP: b8edc068b9a0 [ 35.838291] ---[ end trace a095c06ee4b97a26 ]--- v2: Submit for net tree Fixes: d0f6dd8a914f ("net/sched: Introduce act_tunnel_key") Signed-off-by: Roman Mashak Acked-by: Cong Wang --- net/sch

[PATCH iproute2 1/1] tc: use get_u32() in psample action to match types

2018-03-13 Thread Roman Mashak
Signed-off-by: Roman Mashak --- tc/m_sample.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tc/m_sample.c b/tc/m_sample.c index ff5ee6bd1ef6..dff986f5 100644 --- a/tc/m_sample.c +++ b/tc/m_sample.c @@ -65,7 +65,7 @@ static int parse_sample(struct action_util *a

  1   2   3   >