using rcu_read_lock() after calling dst_neigh_lookup

2017-01-10 Thread Hadar Hen Zion
Hi Dave, Drivers which are calling dst_neigh_lookup() are also using rcu_read_lock() before accessing the neigh pointer (and asking it's ll address data and its validity state). You can find the same behavior in: drivers/infiniband/core/addr.c, drivers/infiniband/hw/i40iw/i40iw_cm.c, driver

[PATCH iproute2 0/2] Fix the usage of TC tunnel key

2016-12-22 Thread Hadar Hen Zion
Add dest UDP port parameter to the usage of tc tunnle key action and classifcation. Hadar Hen Zion (2): tc/cls_flower: Add to the usage encapsulation dest UDP port tc/m_tunnel_key: Add to the usage encapsulation dest UDP port tc/f_flower.c | 5 +++-- tc/m_tunnel_key.c | 2 +- 2 files

[PATCH iproute2 2/2] tc/m_tunnel_key: Add to the usage encapsulation dest UDP port

2016-12-22 Thread Hadar Hen Zion
tunnel key set parameters includes also dest UDP port, add it to the usage. Fixes: 449c709c3868 ("tc/m_tunnel_key: Add dest UDP port to tunnel key action") Signed-off-by: Hadar Hen Zion Reported-by: Simon Horman --- tc/m_tunnel_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH iproute2 1/2] tc/cls_flower: Add to the usage encapsulation dest UDP port

2016-12-22 Thread Hadar Hen Zion
Encapsulation dest UDP port is part of the classifier matching parameters, add it to the usage. Fixes: 41aa17ff4668 ("tc/cls_flower: Add dest UDP port to tunnel params") Signed-off-by: Hadar Hen Zion Reported-by: Simon Horman --- tc/f_flower.c | 5 +++-- 1 file changed, 3 insert

Re: [PATCH iproute2 2/2] tc/m_tunnel_key: Add dest UDP port to tunnel key action

2016-12-18 Thread Hadar Hen Zion
On 12/15/2016 3:53 PM, Simon Horman wrote: On Thu, Dec 15, 2016 at 02:03:36PM +0100, Simon Horman wrote: On Tue, Dec 13, 2016 at 10:07:47AM +0200, Hadar Hen Zion wrote: Enhance tunnel key action parameters by adding destination UDP port. Signed-off-by: Hadar Hen Zion Reviewed-by: Roi Dayan

[PATCH iproute2 0/2] Add dest UDP port to IP tunnel parameters

2016-12-13 Thread Hadar Hen Zion
Enhance IP tunnel key classification and action parameters by adding destination UDP port. Thanks, Hadar Hadar Hen Zion (2): tc/cls_flower: Add dest UDP port to tunnel params tc/m_tunnel_key: Add dest UDP port to tunnel key action man/man8/tc-flower.8 | 8 +++- man/man8/tc

[PATCH iproute2 2/2] tc/m_tunnel_key: Add dest UDP port to tunnel key action

2016-12-13 Thread Hadar Hen Zion
Enhance tunnel key action parameters by adding destination UDP port. Signed-off-by: Hadar Hen Zion Reviewed-by: Roi Dayan --- man/man8/tc-tunnel_key.8 | 6 ++ tc/m_tunnel_key.c| 32 2 files changed, 38 insertions(+) diff --git a/man/man8/tc

[PATCH iproute2 1/2] tc/cls_flower: Add dest UDP port to tunnel params

2016-12-13 Thread Hadar Hen Zion
Enhance IP tunnel parameters by adding destination UDP port. Signed-off-by: Hadar Hen Zion Reviewed-by: Roi Dayan --- man/man8/tc-flower.8 | 8 +++- tc/f_flower.c| 25 + 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-flower.8 b

Re: [Patch net-next] act_mirred: fix a typo in get_dev

2016-12-04 Thread Hadar Hen Zion
On 12/3/2016 8:36 PM, Cong Wang wrote: Cc: Hadar Hen Zion Cc: Jiri Pirko Signed-off-by: Cong Wang --- net/sched/act_mirred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c index bb09ba3..2d9fa6e 100644 --- a/net/sched

[PATCH net-next] net/sched: cls_flower: Set the filter Hardware device for all use-cases

2016-12-04 Thread Hadar Hen Zion
this pointer is used by dump stats and destroy filter for each flower rule (offloaded or not). Fixes: 7091d8c7055d ('net/sched: cls_flower: Add offload support using egress Hardware device') Signed-off-by: Hadar Hen Zion Reported-by: Simon Horman --- net/sched/cls_flower.c | 5 - 1

[PATCH net-next V2 6/8] net/mlx5e: Bring back representor's ndos that were accidentally removed

2016-12-01 Thread Hadar Hen Zion
The VF Representor udp tunnel ndo entries were removed by mistake, return them. Fixes: 370bad0f9a52 ('net/mlx5e: Support HW (offloaded) and SW counters for SRIOV switchdev mode') Signed-off-by: Hadar Hen Zion --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 1 file

[PATCH net-next V2 5/8] net/sched: cls_flower: Add offload support using egress Hardware device

2016-12-01 Thread Hadar Hen Zion
offloading driver using 'egress_device' flag added to tc_to_netdev struct which is provided to the offloading driver. Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 2 ++ net/sched/cls_api.c

[PATCH net-next V2 2/8] net/sched: cls_flower: Try to offload only if skip_hw flag isn't set

2016-12-01 Thread Hadar Hen Zion
d-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- net/sched/cls_flower.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index e8dd09a..5e70f65 100644 --- a/net/sched/cls_flower.c +++ b/net/

[PATCH net-next V2 8/8] net/mlx5e: Support adding ingress tc rule when egress device flag is set

2016-12-01 Thread Hadar Hen Zion
eswitch should be found. Currently, we use this resolution between the mirred device and the uplink on the same eswitch to offload vxlan shared device decap rules. Signed-off-by: Hadar Hen Zion --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 8 1 file changed, 8 insertions

[PATCH net-next V2 3/8] net/sched: cls_flower: Provide a filter to replace/destroy hardware filter functions

2016-12-01 Thread Hadar Hen Zion
Instead of providing many arguments to fl_hw_{replace/destroy}_filter functions, just provide cls_fl_filter struct that includes all the relevant args. This patches doesn't add any new functionality. Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- net/sched/cls_flower.c

[PATCH net-next V2 4/8] net/sched: act_mirred: Add new tc_action_ops get_dev()

2016-12-01 Thread Hadar Hen Zion
Adding support to a new tc_action_ops. get_dev is a general option which allows to get the underline device when trying to offload a tc rule. In case of mirred action the returned device is the mirred (egress) device. Signed-off-by: Hadar Hen Zion Reviewed-by: Jiri Pirko --- include/net

[PATCH net-next V2 0/8] Offloading tc rules using underline Hardware device

2016-12-01 Thread Hadar Hen Zion
this case ndo_setup_tc is called with the mirred (egress) device. The last three patchs are adding mlx5e support to offload rules using the new "egress_device" flag. Thanks, Hadar Changes from v0: - check if CONFIG_NET_CLS_ACT is defined befor calling tc_action_ops get_dev() Hadar Hen Zion (

[PATCH net-next V2 7/8] net/mlx5e: Save the represntor netdevice as part of the representor

2016-12-01 Thread Hadar Hen Zion
Replace the representor private data to a net_device pointer holding the representor netdevice, instead of void pointer holding mlx5e_priv. It will be used by a new eswitch service function, returning the uplink representor netdevice. Signed-off-by: Hadar Hen Zion --- drivers/net/ethernet

[PATCH net-next V2 1/8] net/sched: Add separate check for skip_hw flag

2016-12-01 Thread Hadar Hen Zion
Creating a difference between two possible cases: 1. Not offloading tc rule since the user sets 'skip_hw' flag. 2. Not offloading tc rule since the device doesn't support offloading. This patch doesn't add any new functionality. Signed-off-by: Hadar Hen Zion Rev

[PATCH net-next 5/8] net/sched: cls_flower: Add offload support using egress Hardware device

2016-11-30 Thread Hadar Hen Zion
offloading driver using 'egress_device' flag added to tc_to_netdev struct which is provided to the offloading driver. Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- include/linux/netdevice.h | 1 + include/net/pkt_cls.h | 2 ++ net/sched/cls_api.c

[PATCH net-next 8/8] net/mlx5e: Support adding ingress tc rule when egress device flag is set

2016-11-30 Thread Hadar Hen Zion
eswitch should be found. Currently, we use this resolution between the mirred device and the uplink on the same eswitch to offload vxlan shared device decap rules. Signed-off-by: Hadar Hen Zion --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 8 1 file changed, 8 insertions

[PATCH net-next 6/8] net/mlx5e: Bring back representor's ndos that were accidentally removed

2016-11-30 Thread Hadar Hen Zion
The VF Representor udp tunnel ndo entries were removed by mistake, return them. Fixes: 370bad0f9a52 ('net/mlx5e: Support HW (offloaded) and SW counters for SRIOV switchdev mode') Signed-off-by: Hadar Hen Zion --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 1 file

[PATCH net-next 1/8] net/sched: Add separate check for skip_hw flag

2016-11-30 Thread Hadar Hen Zion
Creating a difference between two possible cases: 1. Not offloading tc rule since the user sets 'skip_hw' flag. 2. Not offloading tc rule since the device doesn't support offloading. This patch doesn't add any new functionality. Signed-off-by: Hadar Hen Zion Rev

[PATCH net-next 2/8] net/sched: cls_flower: Try to offload only if skip_hw flag isn't set

2016-11-30 Thread Hadar Hen Zion
d-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- net/sched/cls_flower.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index e8dd09a..5e70f65 100644 --- a/net/sched/cls_flower.c +++ b/net/

[PATCH net-next 7/8] net/mlx5e: Save the represntor netdevice as part of the representor

2016-11-30 Thread Hadar Hen Zion
Replace the representor private data to a net_device pointer holding the representor netdevice, instead of void pointer holding mlx5e_priv. It will be used by a new eswitch service function, returning the uplink representor netdevice. Signed-off-by: Hadar Hen Zion --- drivers/net/ethernet

[PATCH net-next 4/8] net/sched: act_mirred: Add new tc_action_ops get_dev()

2016-11-30 Thread Hadar Hen Zion
Adding support to a new tc_action_ops. get_dev is a general option which allows to get the underline device when trying to offload a tc rule. In case of mirred action the returned device is the mirred (egress) device. Signed-off-by: Hadar Hen Zion Reviewed-by: Jiri Pirko --- include/net

[PATCH net-next 3/8] net/sched: cls_flower: Provide a filter to replace/destroy hardware filter functions

2016-11-30 Thread Hadar Hen Zion
Instead of providing many arguments to fl_hw_{replace/destroy}_filter functions, just provide cls_fl_filter struct that includes all the relevant args. This patches doesn't add any new functionality. Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- net/sched/cls_flower.c

[PATCH net-next 0/8] Offloading tc rules using underline Hardware device

2016-11-30 Thread Hadar Hen Zion
this case ndo_setup_tc is called with the mirred (egress) device. The last three patchs are adding mlx5e support to offload rules using the new "egress_device" flag. Thanks, Hadar Hadar Hen Zion (8): net/sched: Add separate check for skip_hw flag net/sched: cls_flower: Try to offload only i

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

2016-09-27 Thread Hadar Hen Zion
On Tue, Sep 27, 2016 at 11:09 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. > > This patch doesn't affect dump actions behavior. > For

[PATCH net-next] net/sched: cls_flower: Use a proper mask value for enc key id parameter

2016-09-27 Thread Hadar Hen Zion
The current code use the encapsulation key id value as the mask of that parameter which is wrong. Fix that by using a full mask. Fixes: bc3103f1ed40 ('net/sched: cls_flower: Classify packet in ip tunnels') Signed-off-by: Hadar Hen Zion --- net/sched/cls_flower.c | 4 ++-- 1 file

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

2016-09-27 Thread Hadar Hen Zion
Signed-off-by: Hadar Hen Zion Acked-by: Jamal Hadi Salim --- include/net/pkt_cls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 5ccaa4b..767b03a 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h @@ -123,7 +12

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

2016-09-27 Thread Hadar Hen Zion
On Mon, Sep 26, 2016 at 11:34 PM, Cong Wang wrote: > On Sun, Sep 25, 2016 at 11:02 PM, Hadar Hen Zion > wrote: >> On Mon, Sep 26, 2016 at 7:31 AM, Cong Wang wrote: >>> On Sun, Sep 25, 2016 at 7:39 AM, Jamal Hadi Salim wrote: >>>> On 16-09-

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

2016-09-25 Thread Hadar Hen Zion
On Mon, Sep 26, 2016 at 7:31 AM, Cong Wang wrote: > On Sun, Sep 25, 2016 at 7:39 AM, Jamal Hadi Salim wrote: >> 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. >>

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

2016-09-25 Thread Hadar Hen Zion
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 --- include/net/pkt_cls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net

[PATCH net-next] net/sched: act_tunnel_key: Remove rcu_read_lock protection

2016-09-12 Thread Hadar Hen Zion
ms while those functions are executed. Fixes: 54d94fd89d90 ('net/sched: Introduce act_tunnel_key') Signed-off-by: Hadar Hen Zion --- net/sched/act_tunnel_key.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_

[PATCH net-next V7 3/4] net/sched: cls_flower: Classify packet in ip tunnels

2016-09-08 Thread Hadar Hen Zion
enc_dst_ip 11.11.0.1 \ enc_key_id 11 \ dst_ip 11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko ---

Re: [PATCH net-next V6 4/4] net/sched: Introduce act_tunnel_key

2016-09-08 Thread Hadar Hen Zion
On Wed, Sep 7, 2016 at 7:27 PM, Cong Wang wrote: > On Wed, Sep 7, 2016 at 1:08 AM, Hadar Hen Zion wrote: >> +struct tcf_tunnel_key_params { >> + struct rcu_head rcu; >> + int tcft_action; >> + int

[PATCH net-next V7 1/4] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-09-08 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani Acked-by: Jiri Benc Acked-by: Jiri Pirko --- drivers/net/vxlan.c | 4 ++-- include/net/ip_tunnels.h | 19 +++ include/net/vxlan.h | 18 -- net/ipv4/ip_gre.c| 23 ++- 4 files

[PATCH net-next V7 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-09-08 Thread Hadar Hen Zion
From: Amir Vadai Extract __ip_tun_set_dst() and __ipv6_tun_set_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Reviewed-by: Shmulik Ladkani --- include/net/dst_metadata.h

[PATCH net-next V7 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-09-08 Thread Hadar Hen Zion
Hi, This patchset introduces ip tunnel manipulation support using the TC subsystem. In the decap flow, it enables the user to redirect packets from a shared tunnel device and classify by outer and inner headers. The outer headers are extracted from the metadata and used by the flower filter. A ne

[PATCH net-next V7 4/4] net/sched: Introduce act_tunnel_key

2016-09-08 Thread Hadar Hen Zion
ip parent : \ flower \ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Reviewed-by: Shmulik La

Re: [PATCH net-next V6 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-09-07 Thread Hadar Hen Zion
On Thu, Sep 8, 2016 at 3:32 AM, David Miller wrote: > From: Hadar Hen Zion > Date: Wed, 7 Sep 2016 11:08:02 +0300 > >> This patchset introduces ip tunnel manipulation support using the TC >> subsystem. > > Please address the feedback given by Eric Dumazet for patch #

[PATCH net-next V6 4/4] net/sched: Introduce act_tunnel_key

2016-09-07 Thread Hadar Hen Zion
ip parent : \ flower \ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkan

[PATCH net-next V6 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-09-07 Thread Hadar Hen Zion
From: Amir Vadai Extract __ip_tun_set_dst() and __ipv6_tun_set_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Reviewed-by: Shmulik Ladkani --- include/net/dst_metadata.h

[PATCH net-next V6 1/4] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-09-07 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani Acked-by: Jiri Benc Acked-by: Jiri Pirko --- drivers/net/vxlan.c | 4 ++-- include/net/ip_tunnels.h | 19 +++ include/net/vxlan.h | 18 -- net/ipv4/ip_gre.c| 23 ++- 4 files

[PATCH net-next V6 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-09-07 Thread Hadar Hen Zion
Hi, This patchset introduces ip tunnel manipulation support using the TC subsystem. In the decap flow, it enables the user to redirect packets from a shared tunnel device and classify by outer and inner headers. The outer headers are extracted from the metadata and used by the flower filter. A ne

[PATCH net-next V6 3/4] net/sched: cls_flower: Classify packet in ip tunnels

2016-09-07 Thread Hadar Hen Zion
1 \ enc_key_id 11 \ dst_ip 11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- include/

Re: [PATCH net-next V5 4/4] net/sched: Introduce act_tunnel_key

2016-09-06 Thread Hadar Hen Zion
On Tue, Sep 6, 2016 at 5:11 PM, Eric Dumazet wrote: > On Sun, 2016-09-04 at 13:55 +0300, Hadar Hen Zion wrote: >> From: Amir Vadai > > ... > >> +struct tcf_tunnel_key_params { >> + struct rcu_head rcu; >> + int

Re: [PATCH net-next V5 4/4] net/sched: Introduce act_tunnel_key

2016-09-06 Thread Hadar Hen Zion
On Tue, Sep 6, 2016 at 1:49 PM, Jamal Hadi Salim wrote: > On 16-09-04 06:55 AM, Hadar Hen Zion wrote: >> >> From: Amir Vadai >> >> This action could be used before redirecting packets to a shared tunnel >> device, or when redirecting packets arriving from a suc

Re: [PATCH net-next V5 4/4] net/sched: Introduce act_tunnel_key

2016-09-04 Thread Hadar Hen Zion
On Sun, Sep 4, 2016 at 9:19 PM, Rosen, Rami wrote: > Hi, Hadar, > >>For example, the following flower filter will forward all ICMP packets >>destined to 11.11.11.2 >through the shared vxlan device 'vxlan0'. Before >>redirecting, a metadata for the vxlan tunnel >is created using the tunnel_key >

Re: [PATCH net-next V5 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-09-04 Thread Hadar Hen Zion
On Sun, Sep 4, 2016 at 2:14 PM, Sergei Shtylyov wrote: > Hello. > > > On 9/4/2016 1:55 PM, Hadar Hen Zion wrote: > >> From: Amir Vadai >> >> Extract __ip_tun_set_dst() and __ipv6_tun_set_dst() out of >> ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used wi

[PATCH net-next V5 3/4] net/sched: cls_flower: Classify packet in ip tunnels

2016-09-04 Thread Hadar Hen Zion
1 \ enc_key_id 11 \ dst_ip 11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- include/

[PATCH net-next V5 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-09-04 Thread Hadar Hen Zion
Hi, This patchset introduces ip tunnel manipulation support using the TC subsystem. In the decap flow, it enables the user to redirect packets from a shared tunnel device and classify by outer and inner headers. The outer headers are extracted from the metadata and used by the flower filter. A ne

[PATCH net-next V5 4/4] net/sched: Introduce act_tunnel_key

2016-09-04 Thread Hadar Hen Zion
ip parent : \ flower \ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/net/tc_act/

[PATCH net-next V5 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-09-04 Thread Hadar Hen Zion
From: Amir Vadai Extract __ip_tun_set_dst() and __ipv6_tun_set_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko Reviewed-by: Shmulik Ladkani --- include/net/dst_metadata.h

[PATCH net-next V5 1/4] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-09-04 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani Acked-by: Jiri Benc Acked-by: Jiri Pirko --- drivers/net/vxlan.c | 4 ++-- include/net/ip_tunnels.h | 19 +++ include/net/vxlan.h | 18 -- net/ipv4/ip_gre.c| 23 ++- 4 files

Re: [PATCH net-next V4 4/4] net/sched: Introduce act_tunnel_key

2016-09-01 Thread Hadar Hen Zion
On Thu, Sep 1, 2016 at 4:16 PM, Eric Dumazet wrote: > On Thu, 2016-09-01 at 12:28 +0300, Hadar Hen Zion wrote: > >> >> As you suggested above, I can do it by adding "int action" to struct >> tcf_tunnel_key_paramse. >> But, it means that act_tunnel_key wou

Re: [PATCH net-next V4 4/4] net/sched: Introduce act_tunnel_key

2016-09-01 Thread Hadar Hen Zion
On Wed, Aug 31, 2016 at 8:44 PM, Shmulik Ladkani wrote: > Hi, > > On Wed, 31 Aug 2016 15:46:24 +0300 Hadar Hen Zion wrote: >> +static int tunnel_key_init(struct net *net, struct nlattr *nla, >> +struct nlattr *est, struct tc_action **a, >> +

Re: [PATCH net-next V4 4/4] net/sched: Introduce act_tunnel_key

2016-09-01 Thread Hadar Hen Zion
On Wed, Aug 31, 2016 at 9:39 PM, Eric Dumazet wrote: > On Wed, Aug 31, 2016 at 5:46 AM, Hadar Hen Zion wrote: >> >> From: Amir Vadai >> >> This action could be used before redirecting packets to a shared tunnel >> device, or when redirecting pack

[PATCH iproute2 V2 0/2] tc: flower, m_vlan: Introduce vlan tag support

2016-08-31 Thread Hadar Hen Zion
push action. Changes from v1: - Remove VLAN_PRIO_MASK and VLAN_VID_MASK defines from tc_vlan.h file Hadar Hen Zion (2): tc: flower: Introduce vlan support tc: m_vlan: Add priority option to push vlan action man/man8/tc-flower.8 | 25 - man/man8/tc-vlan.8 | 5 tc

[PATCH iproute2 V2 2/2] tc: m_vlan: Add priority option to push vlan action

2016-08-31 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- man/man8/tc-vlan.8 | 5 + tc/m_vlan.c| 22 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/man/man8/tc-vlan.8 b/man/man8/tc-vlan.8 index 4bfd72b..4d0c5c8 100644 --- a/man/man8/tc-vlan.8 +++ b/man

[PATCH iproute2 V2 1/2] tc: flower: Introduce vlan support

2016-08-31 Thread Hadar Hen Zion
\ indev ens4f0 \ vlan_ethtype ipv4 \ vlan_id 100 \ vlan_prio 3 \ action vlan pop Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- man/man8/tc-flower.8 | 25 - tc/f_flower.c| 78

[PATCH net-next V4 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-08-31 Thread Hadar Hen Zion
From: Amir Vadai Extract __ip_tun_set_dst() and __ipv6_tun_set_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/net/dst_metadata.h | 45 - 1

[PATCH net-next V4 1/4] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-08-31 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani Acked-by: Jiri Benc --- drivers/net/vxlan.c | 4 ++-- include/net/ip_tunnels.h | 19 +++ include/net/vxlan.h | 18 -- net/ipv4/ip_gre.c| 23 ++- 4 files changed, 23

[PATCH net-next V4 4/4] net/sched: Introduce act_tunnel_key

2016-08-31 Thread Hadar Hen Zion
ip parent : \ flower \ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set \ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/net/tc_act/

[PATCH net-next V4 3/4] net/sched: cls_flower: Classify packet in ip tunnels

2016-08-31 Thread Hadar Hen Zion
1 \ enc_key_id 11 \ dst_ip 11.11.11.1 \ action tunnel_key release \ action mirred egress redirect dev vnet0 The action tunnel_key, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/uapi/linux/pkt_cls.h |

[PATCH net-next V4 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-08-31 Thread Hadar Hen Zion
Hi, This patchset introduces ip tunnel manipulation support using the TC subsystem. In the decap flow, it enables the user to redirect packets from a shared tunnel device and classify by outer and inner headers. The outer headers are extracted from the metadata and used by the flower filter. A ne

[PATCH net-next V3 1/4] net/ip_tunnels: Introduce tunnel_id_to_key32() and key32_to_tunnel_id()

2016-08-25 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion Reviewed-by: Shmulik Ladkani --- drivers/net/vxlan.c | 4 ++-- include/net/ip_tunnels.h | 19 +++ include/net/vxlan.h | 18 -- net/ipv4/ip_gre.c| 23 ++- 4 files changed, 23 insertions(+), 41 deletions

[PATCH net-next V3 4/4] net/sched: Introduce act_tunnel_key

2016-08-25 Thread Hadar Hen Zion
ip parent : \ flower \ ip_proto 1 \ dst_ip 11.11.11.2 \ action tunnel_key set\ src_ip 11.11.0.1 \ dst_ip 11.11.0.2 \ id 11 \ action mirred egress redirect dev vxlan0 Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/net/tc_act/

[PATCH net-next V3 2/4] net/dst: Utility functions to build dst_metadata without supplying an skb

2016-08-25 Thread Hadar Hen Zion
From: Amir Vadai Extract _ip_tun_rx_dst() and _ipv6_tun_rx_dst() out of ip_tun_rx_dst() and ipv6_tun_rx_dst(), to be used without supplying an skb. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/net/dst_metadata.h | 45 - 1

[PATCH net-next V3 3/4] net/sched: cls_flower: Classify packet in ip tunnels

2016-08-25 Thread Hadar Hen Zion
1 \ enc_key_id 11 \ dst_ip 11.11.11.1 \ action iptunnel decap \ action mirred egress redirect dev vnet0 The action iptunnel, will be introduced in the next patch in this series. Signed-off-by: Amir Vadai Signed-off-by: Hadar Hen Zion --- include/uapi/linux/pkt_cls.h |

[PATCH net-next V3 0/4] net/sched: ip tunnel metadata set/release/classify by using TC

2016-08-25 Thread Hadar Hen Zion
Hi, This patchset introduces ip tunnel manipulation support using the TC subsystem. In the decap flow, it enables the user to redirect packets from a shared tunnel device and classify by outer and inner headers. The outer headers are extracted from the metadata and used by the flower filter. A ne

[PATCH iproute2 2/2] tc: m_vlan: Add priority option to push vlan action

2016-08-22 Thread Hadar Hen Zion
-off-by: Hadar Hen Zion --- include/linux/tc_act/tc_vlan.h | 1 + man/man8/tc-vlan.8 | 5 + tc/m_vlan.c| 22 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/include/linux/tc_act/tc_vlan.h b/include/linux/tc_act/tc_vlan.h

[PATCH iproute2 1/2] tc: flower: Introduce vlan support

2016-08-22 Thread Hadar Hen Zion
\ indev ens4f0 \ vlan_ethtype ipv4 \ vlan_id 100 \ vlan_prio 3 \ action vlan pop Signed-off-by: Hadar Hen Zion --- include/linux/pkt_cls.h| 5 +++ include/linux/tc_act/tc_vlan.h | 3 ++ man/man8/tc-flower.8 | 25

[PATCH iproute2 0/2] tc: flower, m_vlan: Introduce vlan tag support

2016-08-22 Thread Hadar Hen Zion
second patch adds support for vlan priority to the current vlan push action. Hadar Hen Zion (2): tc: flower: Introduce vlan support tc: m_vlan: Add priority option to push vlan action include/linux/pkt_cls.h| 5 +++ include/linux/tc_act/tc_vlan.h | 4 +++ man/man8/tc-flower.8

Re: [PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Hadar Hen Zion
>>>>get the vlan info from skb->data. The flow_dissector correctly skips >>>>any number of vlans and stores only the first level vlan. >>>> >>>>Fixes: 0744dd00c1b1 ('net: introduce skb_flow_dissect()') >>>>Signed-off-by: H

Re: [PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Hadar Hen Zion
PS >>flow for example), or in case of skb with multiple vlans (e.g. 802.1ad), >>get the vlan info from skb->data. The flow_dissector correctly skips >>any number of vlans and stores only the first level vlan. >> >>Fixes: 0744dd00c1b1 (&

[PATCH net-next V2 0/5] net_sched, flow_dissector, flower: Introduce vlan tag support

2016-08-17 Thread Hadar Hen Zion
flow_dissector_key_vlan - change flow_label field in struct flow_dissector_key_tags form 20 bits field to u32 - Remove 'if (v->tcfv_push_prio)' check from tcf_vlan_dump function - Add support to un-stripped vlan skb and skb with multipale vlans in __skb_flow_dissect Hadar Hen Zion

[PATCH net-next V2 4/5] net_sched: flower: Add vlan support

2016-08-17 Thread Hadar Hen Zion
\ indev ens4f0 \ vlan_ethtype ipv4 \ vlan_id 100 \ vlan_prio 3 \ action vlan pop Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 3 ++ net/sched/cls_flower.c | 70

[PATCH net-next V2 5/5] net_sched: act_vlan: Add priority option

2016-08-17 Thread Hadar Hen Zion
priority 5 Signed-off-by: Hadar Hen Zion Acked-by: Jiri Pirko --- include/net/tc_act/tc_vlan.h| 1 + include/uapi/linux/tc_act/tc_vlan.h | 1 + net/sched/act_vlan.c| 13 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/net/tc_act

[PATCH net-next V2 2/5] flow_dissector: Get vlan priority in addition to vlan id

2016-08-17 Thread Hadar Hen Zion
d-off-by: Hadar Hen Zion --- include/linux/if_vlan.h | 1 + include/net/flow_dissector.h | 12 +--- net/core/flow_dissector.c| 25 - 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a5

[PATCH net-next V2 3/5] net_sched: flower: Avoid dissection of unmasked keys

2016-08-17 Thread Hadar Hen Zion
section in __skb_flow_dissect. This patch checks explicitly the mask of each key and "used_keys" will be set accordingly. Fixes: 77b9900ef53a ('tc: introduce Flower classifier') Signed-off-by: Hadar Hen Zion Signed-off-by: Jiri Pirko --- net/sched/cls_flower.c | 28 +-

[PATCH net-next V2 1/5] flow_dissector: For stripped vlan, get vlan info from skb->vlan_tci

2016-08-17 Thread Hadar Hen Zion
he first level vlan. Fixes: 0744dd00c1b1 ('net: introduce skb_flow_dissect()') Signed-off-by: Hadar Hen Zion --- net/core/flow_dissector.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/net/core/flow_dissector.c b/net/core/flow_diss

Re: [PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data

2016-08-15 Thread Hadar Hen Zion
On Mon, Aug 15, 2016 at 5:38 AM, Toshiaki Makita wrote: > On 16/08/14 (日) 23:58, Hadar Hen Zion wrote: >> >> On Fri, Aug 12, 2016 at 9:36 AM, Toshiaki Makita >> wrote: >>> >>> On 2016/08/10 22:32, Hadar Hen Zion wrote: >>>> >>>> Ea

Re: [PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data

2016-08-14 Thread Hadar Hen Zion
On Fri, Aug 12, 2016 at 9:36 AM, Toshiaki Makita wrote: > On 2016/08/10 22:32, Hadar Hen Zion wrote: >> Early in the datapath skb_vlan_untag function is called, stripped >> the vlan from the skb and set skb->vlan_tci and skb->vlan_proto fields. >> >> The curre

Re: [PATCH net-next 2/4] flow_dissector: Get vlan priority in addition to vlan id

2016-08-11 Thread Hadar Hen Zion
On Thu, Aug 11, 2016 at 12:58 AM, kbuild test robot wrote: > Hi Hadar, > > [auto build test ERROR on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Hadar-Hen-Zion/flow_dissector-Get-vlan-info-from-skb-vlan_tci-instead-of-skb-data/20160811-042500 &g

[PATCH net-next 1/4] flow_dissector: Get vlan info from skb->vlan_tci instead of skb->data

2016-08-10 Thread Hadar Hen Zion
n the skb, fix that. Fixes: 0744dd00c1b1 ('net: introduce skb_flow_dissect()') Signed-off-by: Hadar Hen Zion --- net/core/flow_dissector.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 61ad43f..

[PATCH net-next 3/4] net_sched: flower: Add vlan support

2016-08-10 Thread Hadar Hen Zion
\ indev ens4f0 \ vlan_ethtype ipv4 \ vlan_id 100 \ vlan_prio 3 \ action vlan pop Signed-off-by: Hadar Hen Zion --- include/uapi/linux/pkt_cls.h | 3 ++ net/sched/cls_flower.c | 69

[PATCH net-next 0/4] net_sched, flow_dissector, flower: Introduce vlan tag support

2016-08-10 Thread Hadar Hen Zion
skb->data. - The second patch adds support for vlan priority. The third patch adds vlan tag support to the flower classifier, user space patches will be sent later to complete it. The last patch adds vlan priority to act vlan since only vlan id is currently supported. Hadar Hen Z

[PATCH net-next 2/4] flow_dissector: Get vlan priority in addition to vlan id

2016-08-10 Thread Hadar Hen Zion
d-off-by: Hadar Hen Zion --- include/linux/if_vlan.h | 1 + include/net/flow_dissector.h | 11 --- net/core/flow_dissector.c| 15 +-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index a5f6ce6..49

[PATCH net-next 4/4] net_sched: act_vlan: Add priority option

2016-08-10 Thread Hadar Hen Zion
priority 5 Signed-off-by: Hadar Hen Zion --- include/net/tc_act/tc_vlan.h| 1 + include/uapi/linux/tc_act/tc_vlan.h | 1 + net/sched/act_vlan.c| 13 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/net/tc_act/tc_vlan.h b/include/net/tc_act

flow_dissector: Get vlan priority in addition to vlan id

2016-08-07 Thread Hadar Hen Zion
Hi Tom and Jiri, I would like to add vlan priority to __skb_flow_dissect. In the current vlan tag implementation there isn't any room left to vlan priority next to the vlan id. struct flow_dissector_key_tags { u32 vlan_id:12, flow_label:20

Re: [PATCH net-next V2 0/2] Mellanox 100G mlx5 minimum inline header mode

2016-07-26 Thread Hadar Hen Zion
On Tue, Jul 26, 2016 at 3:54 AM, David Miller wrote: > From: Saeed Mahameed > Date: Sun, 24 Jul 2016 16:12:38 +0300 > >> This small series from Hadar adds the support for minimum inline >> header mode query in mlx5e NIC driver. >> >> Today on TX the driver copies to the HW descriptor only up to L

Re: [PATCH net-next V2 0/2] Mellanox 100G mlx5 minimum inline header mode

2016-07-26 Thread Hadar Hen Zion
In the default case eth_get_headlen() won't be called, it will happen only if PF administrator changes the mode from default to L4. In L4 mode, we need to copy all the packet headers including L4, do you know of a better/cheaper way for doing that? Thanks, Hadar On Tue, Jul 26, 2016 at 3:54 AM,

[PATCH ethtool V3 1/2] ethtool: Add copybreak support

2015-06-11 Thread Hadar Hen Zion
" Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> Signed-off-by: Hadar Hen Zion --- ethtool-copy.h | 1 + ethtool.c | 227 + 2 files changed, 228 insertions(+) diff --git a/ethtool-copy.h b/ethtool-copy.h index d2

[PATCH ethtool V3 0/2] Add copybreak support

2015-06-11 Thread Hadar Hen Zion
Hi Ben, This series add support for setting/getting driver's tx/rx_copybreak value. Copybreak is handled through a new ethtool tunable interface. The kernel support will be avilable from kernel 4.2, commit "net/ethtool: Add current supported tunable options". The series was originally sent by G

[PATCH ethtool V3 2/2] ethtool.8.in: Add man page for tunable copybreak

2015-06-11 Thread Hadar Hen Zion
From: Govindarajulu Varadarajan <_gov...@gmx.com> Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> Signed-off-by: Hadar Hen Zion --- ethtool.8.in | 20 1 file changed, 20 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index ae56293..eae630e

[PATCH net-next V1] net/ethtool: Add current supported tunable options

2015-06-11 Thread Hadar Hen Zion
Add strings array of the current supported tunable options. Signed-off-by: Hadar Hen Zion Reviewed-by: Amir Vadai --- Changes from V0: - s/ETHTOOL_TUNABLE_COUNT/__ETHTOOL_TUNABLE_COUNT/ include/uapi/linux/ethtool.h | 6 ++ net/core/ethtool.c | 12 2 files changed

[PATCH net-next] net/ethtool: Add current supported tunable options

2015-06-09 Thread Hadar Hen Zion
Add strings array of the current supported tunable options. Signed-off-by: Hadar Hen Zion Reviewed-by: Amir Vadai --- include/uapi/linux/ethtool.h | 6 ++ net/core/ethtool.c | 12 2 files changed, 18 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include