Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-17 Thread Jamal Hadi Salim
On 17-01-16 04:51 AM, Jiri Pirko wrote: Mon, Jan 16, 2017 at 08:54:18AM CET, pa...@mellanox.com wrote: I think we should do it in a generic way, for every classifier, right away. Same as Jamal is doing for actions. I think that first we should get Jamal's patch merged and then do the same

[PATCH net-next v4 0/2] Add support for tc cookies

2017-01-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Changes in v4: - move stylistic changes out into a separate patch (and add more stylistic changes) Changes in v3: - use TC_ prefix for the max size - move the cookie struct so visible only to kernel - remove unneeded void * cast Changes

[PATCH net-next v4 1/2] net sched actions: Add support for user cookies

2017-01-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The

[PATCH net-next v4 2/2] net sched: Trivial whitespace and stylistic changes

2017-01-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/net/act_api.h | 7 --- include/net/pkt_cls.h | 45 ++--- net/sched/act_api.c | 20 3 files changed, 30 inser

Re: [PATCH net-next v3 1/1] net sched actions: Add support for user cookies

2017-01-17 Thread Jamal Hadi Salim
On 17-01-16 02:46 PM, David Miller wrote: Jamal, please don't mix coding style and real changes. Have one patch that adds the user cookies and one that cleans up the coding style stuff. Thanks. I will separate those changes (gives me an opportunity to make more stylistic changes). Having

ANNOUNCE: Netdev 2.1 Call For Proposals Opened!

2017-01-16 Thread Jamal Hadi Salim
Folks, We are pleased to announce that the CFP for netdev 2.1 is now open. Netdev 2.1 is a community-driven conference geared towards Linux netheads. Linux kernel networking and user space utilization of the interfaces to the Linux kernel networking subsystem are the focus. If you are using

Re: [PATCH net-next v3 1/1] net sched actions: Add support for user cookies

2017-01-15 Thread Jamal Hadi Salim
On 17-01-15 10:01 AM, Jiri Pirko wrote: Sun, Jan 15, 2017 at 03:01:19PM CET, j...@mojatatu.com wrote: +cls_set_class(struct tcf_proto *tp, unsigned long *clp, ?? unsigned long cl) { unsigned long old_cl; - + ?? tcf_tree_lock(tp); old_cl =

[PATCH net 1/1] net sched actions: fix refcnt when GETing of action after bind

2017-01-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Demonstrating the issue: .. add a drop action $sudo $TC actions add action drop index 10 .. retrieve it $ sudo $TC -s actions get action gact index 10 action order 1: gact action drop random type none pass val 0 index

[PATCH net-next v3 0/1] Add support for tc cookies

2017-01-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Changes in v3: - use TC_ prefix for the max size - move the cookie struct so visible only to kernel - remove unneeded void * cast Changes in V2: -move from a union to a length-value representation Jamal Hadi Salim (1): net sched action

[PATCH net-next v3 1/1] net sched actions: Add support for user cookies

2017-01-15 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The

Re: [PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-15 Thread Jamal Hadi Salim
On 17-01-15 04:11 AM, Jiri Pirko wrote: Subject should contain "V2" Sat, Jan 14, 2017 at 10:52:44PM CET, j...@mojatatu.com wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg i

[PATCH resend iproute2 1/1] utils: make hex2mem available to all users

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> hex2mem() api is useful for parsing hexstrings which are then packed in a stream of chars. Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/utils.h | 1 + ip/ipl2tp.c | 25 - lib/util

Re: [PATCH iproute2 1/1] utils: make hex2mem available to all users

2017-01-14 Thread Jamal Hadi Salim
Sorry, messed up Stephen's address. Resending.. cheers, jamal On 17-01-14 05:04 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> hex2mem() api is useful for parsing hexstrings which are then packed in a stream of chars. Signed-off-by: Jamal Hadi Salim <j...@moj

[PATCH iproute2 1/1] utils: make hex2mem available to all users

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> hex2mem() api is useful for parsing hexstrings which are then packed in a stream of chars. Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/utils.h | 1 + ip/ipl2tp.c | 25 - lib/util

[PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-14 10:29 AM, Jiri Pirko wrote: Sat, Jan 14, 2017 at 04:03:17PM CET, j...@mojatatu.com wrote: Fair. So could this be done like IFLA_PHYS_SWITCH_ID and IFLA_PHYS_PORT_ID. They can have variable size, max is MAX_PHYS_ITEM_ID_LEN We can let user to pass arbitrary len up to 16 bytes.

Re: [PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jamal Hadi Salim
On 17-01-14 10:22 AM, Jiri Pirko wrote: .. create an accept action with cookie 0xA:0xa0a0a0a0a0a0a0 sudo $TC actions add action ok index 1 cookie 0xA 0xa0a0a0a0a0a0a0 2x 64bit values? Why can't this have variable length, according to what user needs: You can intepret it however you wish.

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-14 09:48 AM, Jiri Pirko wrote: Sat, Jan 14, 2017 at 01:56:35PM CET, j...@mojatatu.com wrote: I think the feature makes a lot of sense (as is the action variant). But can we make it: a) fixed size Can you elaborate on why is this needed? My experience with the action bits its

[PATCH net-next 1/1] net sched actions: Add support for user cookies

2017-01-14 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <h...@mojatatu.com> Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved serves as a correlator. The

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-03 07:22 AM, Paul Blakey wrote: I don't mind having it on TC level but I didn't want to intervene with all filters/TC. Please do make it for all classifiers. I described a use case for u32 where the cookie could be used to pretty print the output on a dump/get. cheers, jamal

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-14 Thread Jamal Hadi Salim
On 17-01-09 01:23 PM, John Fastabend wrote: On 17-01-08 09:19 AM, Jiri Pirko wrote: [..] This should never be interpreted by kernel. I think this would be good to make clear in the comment in the code. Ah OK I had assumed you would be pushing this via tc_cls_flower_offload into the driver

ANNOUNCE: Netdev 2.1 in Montreal

2017-01-13 Thread Jamal Hadi Salim
Folks, We are pleased to announce Netdev 2.1 (year 2, conference 1) in the beautiful city of Montreal, Canada on the 6th to 8th of April. The website is now online: http://www.netdevconf.org/2.1/ Netdev 2.1 will be held back to back with netconf2017.1 (http://vger.kernel.org/netconf2017.html)

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-03 Thread Jamal Hadi Salim
On 17-01-02 11:33 PM, John Fastabend wrote: On 17-01-02 05:22 PM, Jamal Hadi Salim wrote: [..] Like all cookie semantics it is for storing state. The receiver (kernel) is not just store it and not intepret it. The user when reading it back simplifies what they have to do for their processing

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-02 Thread Jamal Hadi Salim
On 17-01-02 05:58 PM, John Fastabend wrote: On 17-01-02 02:21 PM, Jamal Hadi Salim wrote: Well having the length value avoids ending up with cookie1, cookie2, ... values as folks push more and more data into the cookie. Unless there is good reason I dont see why it shouldnt be a fixed

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-02 Thread Jamal Hadi Salim
y is created * if it exists and is only bound to in a_o->init() then * ACT_P_CREATED is not returned (a zero is). commit 0a6fd6b024db77e3a460c22ab8a496a714bc71b7 Author: Jamal Hadi Salim <h...@mojatatu.com> Date: Fri Aug 12 06:10:46 2016 -0400 actions: add support for cook

Re: [PATCH net-next rfc 0/6] convert tc_verd to integer bitfields

2017-01-02 Thread Jamal Hadi Salim
And a happy new year netdev. No objections to new year resolution of slimming the skb. But: i am still concerned about the recursion that getting rid of some of these bits could embolden. i.e my suggestion was infact to restore some of those bits taken away by Florian after the ingress redirect

Re: [PATCH net-next] net/sched: cls_flower: Add user specified data

2017-01-02 Thread Jamal Hadi Salim
We have been using a cookie as well for actions (which we have been using but have been too lazy to submit so far). I am going to port it over to the newer kernels and post it. In our case that is intended to be opaque to the kernel i.e kernel never inteprets it; in that case it is similar to

Re: [PATCH]net:sched:release lock before tcf_dump_walker() normal return to avoid deadlock

2016-12-06 Thread Jamal Hadi Salim
On 16-12-06 12:36 AM, Feng Deng wrote: From: Feng Deng release lock before tcf_dump_walker() normal return to avoid deadlock /Scratching my head. I am probably missing something obvious. What are the condition under which this deadlock will happen? Do you have a testcase

Re: Let's do P4

2016-11-01 Thread Jamal Hadi Salim
I am in travel mode so havent read the huge blast of emails (and i am probably taking this email out of the already discussed topics). I will try to catchup later. Simple question (same chat I had with Prem at netdev1.2): What is it that can be expressed by P4 that cant be expressed with the

Re: Why do we need tasklet in IFB?

2016-11-01 Thread Jamal Hadi Salim
On 16-10-31 02:10 PM, David Miller wrote: From: Michael Ma Date: Mon, 31 Oct 2016 11:02:28 -0700 2016-10-28 14:52 GMT-07:00 Michael Ma : 2016-10-28 14:48 GMT-07:00 Stephen Hemminger : On Fri, 28 Oct 2016 14:45:07 -0700

Re: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit

2016-10-25 Thread Jamal Hadi Salim
On 16-10-25 06:34 AM, Marcelo Ricardo Leitner wrote: On Tue, Oct 25, 2016 at 05:05:41PM +0800, Xin Long wrote: in case [1], user can't see the ENOMEM, ENOMEM is more like Thing is, it may lead to duplicate messages in Application layer, as the msg that was errored out may have been actually

[PATCH v2 net 1/1] net sched filters: fix notification of filter delete with proper handle

2016-10-24 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Daniel says: While trying out [1][2], I noticed that tc monitor doesn't show the correct handle on delete: $ tc monitor qdisc clsact : dev eno1 parent :fff1 filter dev eno1 ingress protocol all pref 49152 bpf handle 0x2a [...] deleted

Re: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit

2016-10-24 Thread Jamal Hadi Salim
On 16-10-24 02:30 AM, Xin Long wrote: in case [1], user can't see the ENOMEM, ENOMEM is more like a internal err. Still not clear. Are you saying, say an old kernel like 3.11 would not return the user ENOMEN for the use case[1] you fixed? I am not talking post your fix. in case [2], user

Re: [PATCH net 1/1] net sched filters: fix notification of filter delete with proper handle

2016-10-24 Thread Jamal Hadi Salim
On 16-10-24 05:03 AM, Daniel Borkmann wrote: On 10/24/2016 10:48 AM, Jiri Pirko wrote: Mon, Oct 24, 2016 at 12:30:44AM CEST, dan...@iogearbox.net wrote: On 10/23/2016 05:35 PM, Jamal Hadi Salim wrote: From: Jamal Hadi Salim <j...@mojatatu.com> An actual commit message would b

Re: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit

2016-10-23 Thread Jamal Hadi Salim
On 16-10-23 02:20 PM, Xin Long wrote: This patch doesn't ignore all the ENOMEN cases, only after msg is enqueued in out queue/send queue, in the lower layer, when alloc new skb and copy data from old skb, if it fails to alloc new skb, sctp will ignore this ENOMEM, as this msg will be taken care

[PATCH net 1/1] net sched filters: fix notification of filter delete with proper handle

2016-10-23 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- net/sched/cls_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 2ee29a3..2b2a797 100644 --- a/net/sched/cls_api

Fwd: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit

2016-10-23 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> To: Xin Long <lucien@gmail.com> CC: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>, Vlad Yasevich <vyasev...@gmail.com>, dan...@iogearbox.net, ga...@mojatatu.com, Brenda Butler <b...@mojatatu.com>, David Miller &

Re: [PATCH net] sched, cls: don't dump kernel addr into tc monitors on delete event

2016-10-23 Thread Jamal Hadi Salim
On 16-10-18 07:14 PM, Cong Wang wrote: On Tue, Oct 18, 2016 at 2:21 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: I was sitting on this patch I was going to send ;-> Does this resolve it? Your patch makes more sense to me. Maybe we can remove the event != RTM_DELTFILTER special

Re: [PATCH net] sched, cls: don't dump kernel addr into tc monitors on delete event

2016-10-18 Thread Jamal Hadi Salim
On 16-10-18 05:59 PM, Daniel Borkmann wrote: Ahh sure, looks good to me. All other RTM_DELTFILTER events would be for the entire tcf_proto and 'enforced' destroy, so zero handle would indicate that then as opposed to a individual cls delete with non-zero handle. Seems fine. Ok, thanks. I will

Re: [PATCH net] sched, cls: don't dump kernel addr into tc monitors on delete event

2016-10-18 Thread Jamal Hadi Salim
On 16-10-18 04:18 PM, Daniel Borkmann wrote: While trying out [1][2], I noticed that tc monitor doesn't show the correct handle on delete: $ tc monitor qdisc clsact : dev eno1 parent :fff1 filter dev eno1 ingress protocol all pref 49152 bpf handle 0x2a [...] deleted filter dev

Re: [patch net-next RFC 4/6] Introduce sample tc action

2016-10-17 Thread Jamal Hadi Salim
Some comments: IIUC, the main struggle seems to be whether the redirect to dummy0 is useful or not? i.e instead of just letting the packets go up the stack on eth1? It seems like sflowd needs to read off eth1 via packet socket? To be backward compatible - supporting that approach seems sensible.

[PATCH iproute2 1/2] tc filters: display handle in events when a filter is deleted

2016-10-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> An event being displayed via "tc mon" should display the filter handle. The filter handle is a required parameter when deleting a filter and therefore the delete event should mimic/mirror the command sent. A simple test, run tc monit

[PATCH iproute2 2/2] tc filters: fix filters to display handle when deleted even when no option

2016-10-17 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Fix a few stylistic things that hurt my eyes while at it. Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/f_basic.c| 6 +++--- tc/f_bpf.c | 6 +++--- tc/f_cgroup.c | 7 +++ tc/f_flow.c | 4 ++-- tc/f_flo

Re: [patch net-next RFC 0/6] Add support for offloading packet-sampling

2016-10-13 Thread Jamal Hadi Salim
On 16-10-13 04:48 AM, Jiri Pirko wrote: Thu, Oct 13, 2016 at 09:29:57AM CEST, ro...@cumulusnetworks.com wrote: On 10/12/16, 5:41 AM, Jiri Pirko wrote: From: Jiri Pirko [..] we spoke with yotam about this at netdev1.2. and also remember speaking about this on our

Re: [patch net-next RFC 0/6] Add support for offloading packet-sampling

2016-10-13 Thread Jamal Hadi Salim
On 16-10-13 08:10 AM, Jiri Pirko wrote: Thu, Oct 13, 2016 at 01:49:07PM CEST, j...@mojatatu.com wrote: On 16-10-13 04:48 AM, Jiri Pirko wrote: [..] Roopa, did you mean eth1 as the new device or did you mean just in general config requiring a device to be specified or did you mean a new cpu

Re: [PATCH v4 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-10-13 Thread Jamal Hadi Salim
is to hand matching skbs into the rx processing of a specified device. Signed-off-by: Shmulik Ladkani <shmulik.ladk...@gmail.com> Tested-by: Jamal Hadi Salim <j...@mojatatu.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [PATCH v4 net-next 3/4] net/sched: tc_mirred: Rename public predicates 'is_tcf_mirred_redirect' and 'is_tcf_mirred_mirror'

2016-10-13 Thread Jamal Hadi Salim
Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [PATCH v4 net-next 2/4] net/sched: act_mirred: Refactor detection whether dev needs xmit at mac header

2016-10-13 Thread Jamal Hadi Salim
On 16-10-13 02:06 AM, Shmulik Ladkani wrote: Move detection logic that tests whether device expects skb data to point at mac_header upon xmit into a function. Signed-off-by: Shmulik Ladkani <shmulik.ladk...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com>

Re: [PATCH v4 net-next 1/4] net/sched: act_mirred: Rename tcfm_ok_push to tcfm_mac_header_xmit and make it a bool

2016-10-13 Thread Jamal Hadi Salim
of int). This allows to decouple the attribute from the action to be taken. Signed-off-by: Shmulik Ladkani <shmulik.ladk...@gmail.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> cheers, jamal

Re: [PATCH net] net_sched: do not broadcast RTM_GETTFILTER result

2016-10-13 Thread Jamal Hadi Salim
On 16-10-13 03:46 AM, Eric Dumazet wrote: On Wed, 2016-10-12 at 09:36 -0700, Cong Wang wrote: On Sun, Oct 9, 2016 at 8:25 PM, Eric Dumazet wrote: + if (unicast) + return netlink_unicast(net->rtnl, skb, portid, MSG_DONTWAIT); Nit: rtnl_unicast() is

Re: [PATCH iproute2 1/1] tc filters: add support to get individual filters by handle

2016-10-13 Thread Jamal Hadi Salim
On 16-10-12 12:46 PM, Cong Wang wrote: On Mon, Oct 10, 2016 at 9:45 AM, Jamal Hadi Salim <j...@mojatatu.com> wrote: tc/tc_filter.c | 185 + 1 file changed, 175 insertions(+), 10 deletions(-) Please update man/man8/tc.8 too, b

Re: [Patch net] net_sched: reorder pernet ops and act ops registrations

2016-10-12 Thread Jamal Hadi Salim
not ready so new actions still can't be created. Reported-by: Krister Johansen <k...@templeofstupid.com> Tested-by: Krister Johansen <k...@templeofstupid.com> Cc: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> Acked-by: Ja

[PATCH v2 iproute2 2/9] ife: print prio, mark and hash as unsigned

2016-10-11 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_ife.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index a5a7516..588ba

[PATCH v2 iproute2 6/9] actions: add skbmod action

2016-10-11 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

[PATCH v2 iproute2 9/9] man pages: add man page for skbmod action

2016-10-11 Thread Jamal Hadi Salim
From: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/Makefile b/man/man8/Makefile inde

[PATCH v2 iproute2 3/9] ife: improve help text

2016-10-11 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_ife.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index 588bad7..862461b 10064

[PATCH v2 iproute2 1/9] ife action: allow specifying index in hex

2016-10-11 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index 0219760..a5a7516 10064

[PATCH v2 iproute2 5/9] action gact: list pipe as a valid action

2016-10-11 Thread Jamal Hadi Salim
From: Craig Dillabaugh <cdill...@mojatatu.com> Signed-off-by: Craig Dillabaugh <cdill...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_gact.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tc/m_gact.c b/tc/m_gact.c inde

[PATCH v2 iproute2 4/9] actions ife: Introduce encoding and decoding of tcindex metadata

2016-10-11 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/linux/tc_act/tc_ife.h | 3 ++- tc/m_ife.c| 29 +++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/include/

[PATCH v2 iproute2 8/9] man pages: Add tc-ife to Makefile

2016-10-11 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/Makefile b/man/man8/Makefile index 9213769..4ad96ce 100644 --- a/man/man8/Makefile ++

[PATCH v2 iproute2 7/9] man pages: update ife action to include tcindex

2016-10-11 Thread Jamal Hadi Salim
From: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/tc-ife.8 | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/man/man8/tc-i

[PATCH v2 iproute2 0/9] Cleanup backlog

2016-10-11 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Variety of cleanup and new functionality I had sitting around on my private tree Craig Dillabaugh (1): action gact: list pipe as a valid action Jamal Hadi Salim (3): actions ife: Introduce encoding and decoding of tcindex metadata actions

[PATCH iproute2 1/1] tc filters: add support to get individual filters by handle

2016-10-10 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> sudo $TC filter add dev $ETH parent : prio 2 protocol ip \ u32 match u32 0 0 flowid 1:1 \ action ok sudo $TC filter add dev $ETH parent : prio 1 protocol ip \ u32 match ip protocol 1 0xff flowid 1:10 \ action ok now dump to see all rules

Re: [PATCH net] net_sched: do not broadcast RTM_GETTFILTER result

2016-10-10 Thread Jamal Hadi Salim
M_GETTFILTER when a single filter is queried, instead of dumping all filters. Signed-off-by: Eric Dumazet <eduma...@google.com> Acked-by: Jamal Hadi Salim <j...@mojatatu.com> I will send the iproute2 patch cheers, jamal

Re: [PATCH v3 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-10-08 Thread Jamal Hadi Salim
On 16-10-06 08:49 PM, Cong Wang wrote: On Thu, Oct 6, 2016 at 5:17 PM, Jamal Hadi Salim <j...@mojatatu.com> wrote: I dont believe we need to bother with the return code in this case. Why? For a quick example, STOLEN vs. SHOT: result = tc_classify(skb, filter, ,

Re: [PATCH v3 net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-10-06 Thread Jamal Hadi Salim
On 16-10-06 01:30 PM, Cong Wang wrote: On Thu, Oct 6, 2016 at 6:30 AM, Shmulik Ladkani wrote: Hi, On Mon, Oct 3, 2016 at 12:45 PM, Cong Wang wrote: On Thu, Sep 29, 2016 at 4:03 AM, Shmulik Ladkani wrote:

Re: [PATCH net] Panic when tc_lookup_action_n finds a partially initialized action.

2016-10-02 Thread Jamal Hadi Salim
On 16-10-01 11:13 PM, Krister Johansen wrote: A tc_action_ops structure is visibile as soon as it is placed in the act_base list. When tcf_regsiter_action adds an item to this list and drops act_mod_lock, registration is not complete until register_pernet_subsys() finishes. If two threads

[PATCH iproute2 9/9] man pages: add man page for skbmod action

2016-10-01 Thread Jamal Hadi Salim
From: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/Makefile| 2 +- man/man8/tc-skbmod.8 | 137 +++ 2 files changed, 13

[PATCH iproute2 6/9] actions: add skbmod action

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> This action is intended to be an upgrade from a usability perspective from pedit (as well as operational debugability). Compare this: sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \ u32 match ip protocol 1 0xff flowid 1:2 \ action

[PATCH iproute2 8/9] man pages: Add tc-ife to Makefile

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man8/Makefile b/man/man8/Makefile index 9213769..4ad96ce 100644 --- a/man/man8/Makefile ++

[PATCH iproute2 7/9] man pages: update ife action to include tcindex

2016-10-01 Thread Jamal Hadi Salim
From: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Lucas Bates <luc...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- man/man8/tc-ife.8 | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/man/man8/tc-i

[PATCH iproute2 5/9] action gact: list pipe as a valid action

2016-10-01 Thread Jamal Hadi Salim
From: Craig Dillabaugh <cdill...@mojatatu.com> Signed-off-by: Craig Dillabaugh <cdill...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_gact.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tc/m_gact.c b/tc/m_gact.c inde

[PATCH iproute2 4/9] actions ife: Introduce encoding and decoding of tcindex metadata

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- include/linux/tc_act/tc_ife.h | 3 ++- tc/m_ife.c| 29 +++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/include/

[PATCH iproute2 3/9] ife: improve help text

2016-10-01 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_ife.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index 588bad7..862461b 10064

[PATCH iproute2 1/9] ife action: allow specifying index in hex

2016-10-01 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_ife.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index 0219760..a5a7516 10064

[PATCH iproute2 2/9] ife: print prio, mark and hash as unsigned

2016-10-01 Thread Jamal Hadi Salim
From: Roman Mashak <m...@mojatatu.com> Signed-off-by: Roman Mashak <m...@mojatatu.com> Signed-off-by: Jamal Hadi Salim <j...@mojatatu.com> --- tc/m_ife.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tc/m_ife.c b/tc/m_ife.c index a5a7516..588ba

[PATCH iproute2 0/9] Cleanup backlog

2016-10-01 Thread Jamal Hadi Salim
From: Jamal Hadi Salim <j...@mojatatu.com> Variety of cleanup and new functionality I had sitting around on my private tree Craig Dillabaugh (1): action gact: list pipe as a valid action Jamal Hadi Salim (3): actions ife: Introduce encoding and decoding of tcindex metadata actions

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 08:45 AM, Cyrill Gorcunov wrote: Note: inet_diag somewhere has a netlink structure that has a hole. I pointed it out to Eric D. and he said we cant add it now because it would break ABI. Naming holes generated by a compiler for alignment sake should not break abi (because

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 08:27 AM, Jamal Hadi Salim wrote: On 16-09-28 08:16 AM, David Miller wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Date: Wed, 28 Sep 2016 08:09:28 -0400 On 16-09-28 08:07 AM, David Miller wrote: Right, it would be legal for an existing user to have code that expl

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 08:16 AM, David Miller wrote: From: Jamal Hadi Salim <j...@mojatatu.com> Date: Wed, 28 Sep 2016 08:09:28 -0400 On 16-09-28 08:07 AM, David Miller wrote: Right, it would be legal for an existing user to have code that explicitly initializes every member of the structure, inc

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 08:07 AM, David Miller wrote: Right, it would be legal for an existing user to have code that explicitly initializes every member of the structure, including 'pad'. So we have to keep that member around, at a minimum, for their sake. I think we need to start labelling any new pad

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 07:27 AM, Cyrill Gorcunov wrote: On Wed, Sep 28, 2016 at 07:06:26AM -0400, Jamal Hadi Salim wrote: This structure is uapi, so anyone has complete rights to reference @pad in the userspace programs. Sure it would be more clear to remove the @pad completely, but if we choose so I

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 06:51 AM, Cyrill Gorcunov wrote: On Wed, Sep 28, 2016 at 06:43:01AM -0400, Jamal Hadi Salim wrote: [..] I dont know how compilation will fail but you may be right with note: that is not how pads have been used in the past. They are supposed to cosmetic annotation which indicates

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 06:17 AM, Cyrill Gorcunov wrote: On Wed, Sep 28, 2016 at 06:08:00AM -0400, Jamal Hadi Salim wrote: ... @@ -38,7 +38,10 @@ struct inet_diag_req_v2 { __u8sdiag_family; __u8sdiag_protocol; __u8idiag_ext; - __u8pad; + union

Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets

2016-09-28 Thread Jamal Hadi Salim
On 16-09-28 05:03 AM, Cyrill Gorcunov wrote: In criu we are actively using diag interface to collect sockets present in the system when dumping applications. And while for unix, tcp, udp[lite], packet, netlink it works as expected, the raw sockets do not have. Thus add it. v2: - add missing

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-27 Thread Jamal Hadi Salim
On 16-09-27 04:07 AM, Shmulik Ladkani wrote: Hi David, On Tue, 27 Sep 2016 01:56:06 -0400 (EDT), da...@davemloft.net wrote: The discussion on this patch has ventured off into what to do about recursion. But it unclear to me where this specific patch, and this series, stands right now.

Re: [PATCH net v2 0/2] Fix tc-ife bugs

2016-09-26 Thread Jamal Hadi Salim
On 16-09-26 03:01 AM, Yotam Gigi wrote: -Original Message- From: Jamal Hadi Salim [mailto:j...@mojatatu.com] Sent: Monday, September 26, 2016 3:47 AM To: Yotam Gigi <yot...@mellanox.com>; Yotam Gigi <yotam...@gmail.com>; [..] Yes please - Add NLA_HDRLEN to the dlen o

Re: [PATCH net-next] net/sched: pkt_cls: change tc actions order to be as the user sets

2016-09-26 Thread Jamal Hadi Salim
On 16-09-25 10:08 AM, Hadar Hen Zion wrote: Currently the created tc actions list is reversed against the order set by the user. Change the actions list order to be the same as was set by the user. Signed-off-by: Hadar Hen Zion <had...@mellanox.com> Acked-by: Jamal Hadi Sa

Re: [PATCH net-next] net/sched: pkt_cls: change tc actions order to be as the user sets

2016-09-26 Thread Jamal Hadi Salim
On 16-09-26 02:02 AM, Hadar Hen Zion wrote: On Mon, Sep 26, 2016 at 7:31 AM, Cong Wang wrote: The reason is we use action->order as an nested attribute, so the order in the list doesn't matter, only action->order itself matters. The order in the list matters for

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 09:35 PM, Florian Westphal wrote: Jamal Hadi Salim <j...@mojatatu.com> wrote: Realize didnt respond to this. Seems very simple to fix: if skb->dev->ifindex and m->tcfm_dev->ifindex are the same, then you can drop the packet. Yes, but I think we get same

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 02:31 PM, Florian Westphal wrote: Shmulik Ladkani wrote: We can later address any loop-detection improvements in mirred. WDYT? You can address this after fixing infamous spinlock recursion hard lockup (which has existed forever): tc qdisc add dev eth0

Re: [PATCH net v2 0/2] Fix tc-ife bugs

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 07:17 PM, Jamal Hadi Salim wrote: [..] Do you prefer that I will fix the encode side to encode the whole tlv header size instead of fixing the decode side? Yes please - Add NLA_HDRLEN to the dlen on the encode you showed above. And the correct commit it fixes

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 02:33 PM, Florian Westphal wrote: Daniel Borkmann wrote: [..] Why not just reuse xmit_recursion, which is what we did in tc cls_bpf programs f.e. see __bpf_tx_skb()? Would be a pity to waste 3 bits on this in the skb. +1, don't (yet) understand why a

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 01:33 PM, Shmulik Ladkani wrote: On Sun, 25 Sep 2016 09:05:08 -0400 Jamal Hadi Salim <j...@mojatatu.com> wrote: On 16-09-23 11:40 AM, Shmulik Ladkani wrote: [off topic] I think this is still on topic! Sorry, wasn't too clear on that. What I meant is that _existing_ &

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 12:26 PM, Daniel Borkmann wrote: On 09/25/2016 03:05 PM, Jamal Hadi Salim wrote: [..] MAX_RED_LOOP (stands for "Maximum Redirect loop") still exists in current code. The idea above was that we would increment the rttl counter once and if we saw it again upto MAX_R

Re: [PATCH net v2 0/2] Fix tc-ife bugs

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 11:55 AM, Yotam Gigi wrote: -Original Message- From: Jamal Hadi Salim [mailto:j...@mojatatu.com] Sent: Sunday, September 25, 2016 4:46 PM To: Yotam Gigi <yotam...@gmail.com>; da...@davemloft.net; netdev@vger.kernel.org; Yotam Gigi <yot...@mellanox.com> Subject: Re

Re: [PATCH net-next] net/sched: pkt_cls: change tc actions order to be as the user sets

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 10:08 AM, Hadar Hen Zion wrote: Currently the created tc actions list is reversed against the order set by the user. Change the actions list order to be the same as was set by the user. Did something break? It seems to matter most for dumping. But even that didnt breaking.

Re: [PATCH net v2 0/2] Fix tc-ife bugs

2016-09-25 Thread Jamal Hadi Salim
On 16-09-25 08:31 AM, Yotam Gigi wrote: This patch-set contains two bugfixes in the tc-ife action, one fixing some random behaviour in encode side, and one fixing the decode side packet parsing logic. Yotam Gigi (2): act_ife: Fix external mac header on encode act_ife: Fix false parsing on

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-24 08:07 PM, Cong Wang wrote: On Thu, Sep 22, 2016 at 10:11 PM, Shmulik Ladkani One problem to use your code for us is that, the RX side of veth is inside containers, not visible to outside, perhaps we need some more parameter to tell the netns before the device name/index?

Re: [PATCH net-next 4/4] net/sched: act_mirred: Implement ingress actions

2016-09-25 Thread Jamal Hadi Salim
On 16-09-23 11:40 AM, Shmulik Ladkani wrote: On Fri, 23 Sep 2016 08:48:33 -0400 Jamal Hadi Salim <j...@mojatatu.com> wrote: Even today, one may create loops using existing 'egress redirect', e.g. this rediculously errorneous construct: # ip l add v0 type veth peer name v0p # tc filt

<    1   2   3   4   5   6   7   8   9   10   >