Re: [PATCH 1/2 net-next] net/mlx5e: TC: Fix IS_ERR() vs NULL checks

2020-09-28 Thread Ariel Levkovich
On Sep 28, 2020, at 13:42, Dan Carpenter wrote: > > The mlx5_tc_ct_init() function doesn't return error pointers it returns > NULL. Also we need to set the error codes on this path. > > Fixes: aedd133d17bc ("net/mlx5e: Support CT offload for tc nic flows") > Signed-off-by: Dan Carpenter > ---

[PATCH net-next v4 2/2] net/sched: cls_flower: Add hash info to flow classification

2020-07-22 Thread Ariel Levkovich
Adding new cls flower keys for hash value and hash mask and dissect the hash info from the skb into the flow key towards flow classication. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 3 +++ net/sched/cls_flower.c | 16 2

[PATCH net-next v4 1/2] net/flow_dissector: add packet hash dissection

2020-07-22 Thread Ariel Levkovich
Retreive a hash value from the SKB and store it in the dissector key for future matching. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/linux/skbuff.h | 4 include/net/flow_dissector.h | 9 + net/core/flow_dissector.c| 17 + 3 files

[PATCH net-next v4 0/2] TC datapath hash api

2020-07-22 Thread Ariel Levkovich
hash setting code leaving only the classidication parts. Setting the hash will be possible via existing tc action bpf. v2 -> v3: *Split hash algorithm option into 2 different actions. Asym_l4 available via act_skbedit and bpf via new act_hash. Ariel Levkovich (2): net/flow_dissector:

Re: [PATCH net-next v3 2/4] net/sched: Introduce action hash

2020-07-16 Thread Ariel Levkovich
On 7/15/20 2:49 PM, Daniel Borkmann wrote: On 7/15/20 3:30 PM, Ariel Levkovich wrote: On 7/15/20 2:12 AM, Cong Wang wrote: On Mon, Jul 13, 2020 at 8:17 PM Ariel Levkovich wrote: On 7/13/20 6:04 PM, Cong Wang wrote: On Sat, Jul 11, 2020 at 2:28 PM Ariel Levkovich wrote: Allow user to set a

Re: [PATCH net-next v3 1/4] net/sched: Add skb->hash field editing via act_skbedit

2020-07-15 Thread Ariel Levkovich
On 7/13/20 1:11 PM, Davide Caratti wrote: On Sun, 2020-07-12 at 00:28 +0300, Ariel Levkovich wrote: Extend act_skbedit api to allow writing into skb->hash field. [...] Usage example: $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 0 proto ip \ flower ip_proto tcp \ action skbedit h

Re: [PATCH net-next v3 2/4] net/sched: Introduce action hash

2020-07-15 Thread Ariel Levkovich
On 7/15/20 2:12 AM, Cong Wang wrote: On Mon, Jul 13, 2020 at 8:17 PM Ariel Levkovich wrote: On 7/13/20 6:04 PM, Cong Wang wrote: On Sat, Jul 11, 2020 at 2:28 PM Ariel Levkovich wrote: Allow user to set a packet's hash value using a bpf program. The user provided BPF program is requir

Re: [PATCH net-next v3 2/4] net/sched: Introduce action hash

2020-07-13 Thread Ariel Levkovich
On 7/13/20 6:04 PM, Cong Wang wrote: On Sat, Jul 11, 2020 at 2:28 PM Ariel Levkovich wrote: Allow user to set a packet's hash value using a bpf program. The user provided BPF program is required to compute and return a hash value for the packet which is then stored in skb->hash. Can

[PATCH net-next v3 2/4] net/sched: Introduce action hash

2020-07-11 Thread Ariel Levkovich
s action only supports bpf option now. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/net/act_api.h | 2 + include/net/tc_act/tc_hash.h| 20 ++ include/uapi/linux/pkt_cls.h| 1 + include/uapi/linux/tc_act/tc_hash.h | 25

[PATCH net-next v3 3/4] net/flow_dissector: add packet hash dissection

2020-07-11 Thread Ariel Levkovich
Retreive a hash value from the SKB and store it in the dissector key for future matching. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/linux/skbuff.h | 4 include/net/flow_dissector.h | 9 + net/core/flow_dissector.c| 17 + 3 files

[PATCH net-next v3 1/4] net/sched: Add skb->hash field editing via act_skbedit

2020-07-11 Thread Ariel Levkovich
n place using the kernel implementation of the Jenkins hash algorithm. Usage example: $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 0 proto ip \ flower ip_proto tcp \ action skbedit hash asym_l4 basis 5 \ action goto chain 2 Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- i

[PATCH net-next v3 0/4] ] TC datapath hash api

2020-07-11 Thread Ariel Levkovich
act_skbedit and bpf via new act_hash. Ariel Levkovich (4): net/sched: Add skb->hash field editing via act_skbedit net/sched: Introduce action hash net/flow_dissector: add packet hash dissection net/sched: cls_flower: Add hash info to flow classification include/linux/skbuff.h

[PATCH net-next v3 4/4] net/sched: cls_flower: Add hash info to flow classification

2020-07-11 Thread Ariel Levkovich
Adding new cls flower keys for hash value and hash mask and dissect the hash info from the skb into the flow key towards flow classication. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 3 +++ net/sched/cls_flower.c | 16 2

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-09 Thread Ariel Levkovich
Not sure it was sent so trying again... On 7/5/20 8:28 PM, Cong Wang wrote: On Sun, Jul 5, 2020 at 2:50 PM Jamal Hadi Salim wrote: BTW, nothing in skbedit is against computing what the new metadata should be. Yup. IMO: A good arguement to not make it part of skbedit is if it adds unnecessa

Re: [PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-05 Thread Ariel Levkovich
ink we should have support via flower. This is the HW offload path eventually. Regards, Ariel cheers, jamal On 2020-07-01 2:47 p.m., Ariel Levkovich wrote: Supporting datapath hash allows user to set up rules that provide load balancing of traffic across multiple vports and for ECMP p

[PATCH net-next v2 0/3] ] TC datapath hash api

2020-07-01 Thread Ariel Levkovich
rio 1 chain 2 proto ip \ flower hash 0x0/0xf \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower hash 0x1/0xf \ action mirred egress redirect dev ens1f0_2 Ariel Levkovich (3): net/sched: Introduce action hash net/flow_dissector

[PATCH net-next v2 1/3] net/sched: Introduce action hash

2020-07-01 Thread Ariel Levkovich
irred egress redirect dev ens1f0_2 v1 -> v2: *Handle egress case for bpf hash properly. *Check for valid bpf fd before referencing it. *Fixed missing unlocking of tcf_lock. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/net/act_api.h | 2 + incl

[PATCH net-next v2 2/3] net/flow_dissector: add packet hash dissection

2020-07-01 Thread Ariel Levkovich
Retreive a hash value from the SKB and store it in the dissector key for future matching. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/linux/skbuff.h | 4 include/net/flow_dissector.h | 9 + net/core/flow_dissector.c| 17 + 3 files

[PATCH net-next v2 3/3] net/sched: cls_flower: Add hash info to flow classification

2020-07-01 Thread Ariel Levkovich
Adding new cls flower keys for hash value and hash mask and dissect the hash info from the skb into the flow key towards flow classication. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 3 +++ net/sched/cls_flower.c | 16 2

Re: [PATCH net-next 1/3] net/sched: Introduce action hash

2020-06-19 Thread Ariel Levkovich
On 6/19/20 12:13 PM, Davide Caratti wrote: hello Ariel, (I'm doing a resend because I suspect that my original reply was dropped somewhere). Thanks for your patch! some comments/questions below: On Fri, 2020-06-19 at 01:15 +0300, Ariel Levkovich wrote: Allow setting a hash value to a p

[PATCH net-next 3/3] net/sched: cls_flower: Add hash info to flow classification

2020-06-18 Thread Ariel Levkovich
Adding new cls flower keys for hash value and hash mask and dissect the hash info from the skb into the flow key towards flow classication. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/uapi/linux/pkt_cls.h | 3 +++ net/sched/cls_flower.c | 16 2

[PATCH net-next 1/3] net/sched: Introduce action hash

2020-06-18 Thread Ariel Levkovich
irred egress redirect dev ens1f0_2 Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/net/act_api.h | 2 + include/net/tc_act/tc_hash.h| 22 ++ include/uapi/linux/pkt_cls.h| 1 + include/uapi/linux/tc_act/tc_hash.h | 32 +++ net/sched/Kconfig

[PATCH net-next 2/3] net/flow_dissector: add packet hash dissection

2020-06-18 Thread Ariel Levkovich
Retreive a hash value from the SKB and store it in the dissector key for future matching. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko --- include/linux/skbuff.h | 4 include/net/flow_dissector.h | 9 + net/core/flow_dissector.c| 17 + 3 files

[PATCH net-next 0/3] TC datapath hash api

2020-06-18 Thread Ariel Levkovich
rio 1 chain 2 proto ip \ flower hash 0x0/0xf \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower hash 0x1/0xf \ action mirred egress redirect dev ens1f0_2 Ariel Levkovich (3): net/sched: Introduce action hash net/flow_dissector

Re: BPF for hash calculation

2020-05-19 Thread Ariel Levkovich
On May 19, 2020, at 22:13, Ariel Levkovich wrote: > > Hi Daniel, Aleksei > > I’m working on a feature to add support for datapath hash actions and > matching via TC API. > > One of the options we want to offer users there is to provide their own hash > calculation fu

[PATCH net-next 1/2] net: bonding: Inherit MPLS features from slave devices

2019-06-03 Thread Ariel Levkovich
interface. The patch add the inheritance of the MPLS features from the slave devices with a similar logic to setting the bonding device's VLAN and encapsulation features. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek Signed-off-by: Ariel Levkovich --- drivers/net/bond

[PATCH net-next 2/2] net: vlan: Inherit MPLS features from parent device

2019-06-03 Thread Ariel Levkovich
TSO to be performed on MPLS tagged packets. Signed-off-by: Ariel Levkovich --- net/8021q/vlan_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index f044ae5..585e73d 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -582,6 +582,7 @@

[PATCH net-next 0/2] Support MPLS features in bonding and vlan net devices

2019-06-03 Thread Ariel Levkovich
nning via VLAN or bonding interface. The patches introduce changes to the initialization steps of the VLAN and bonding netdevices to inherit the MPLS features from lower netdevices to allow the HW offloads. Ariel Levkovich (2): net: bonding: Inherit MPLS features from slave devices net: vlan: In

[PATCH RFC 2/2] net: vlan: Inherit MPLS features from parent device

2019-05-24 Thread Ariel Levkovich
TSO to be performed on MPLS tagged packets. Signed-off-by: Ariel Levkovich --- net/8021q/vlan_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index f044ae5..585e73d 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -582,6 +582,7 @@

[PATCH RFC 0/2] Support MPLS features in bonding and vlan net devices

2019-05-24 Thread Ariel Levkovich
nning via VLAN or bonding interface. The patches introduce changes to the initialization steps of the VLAN and bonding netdevices to inherit the MPLS features from lower netdevices to allow the HW offloads. Ariel Levkovich (2): net: bonding: Inherit MPLS features from slave devices net: vlan: In

[PATCH RFC 1/2] net: bonding: Inherit MPLS features from slave devices

2019-05-24 Thread Ariel Levkovich
interface. The patch add the inheritance of the MPLS features from the slave devices with a similar logic to setting the bonding device's VLAN and encapsulation features. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek Signed-off-by: Ariel Levkovich --- drivers/net/bond

RE: [PATCH net-next 6/9] net/mlx4_en: Adding support of turning off link autonegotiation via ethtool

2017-01-16 Thread Ariel Levkovich
+ MLX4_PTYS_AN_DISABLE_CAP = 1 << 5, It's there. Best Regards, Ariel Levkovich Staff Engineer, SW Mellanox Technologies Beit Mellanox, Yokneam, P.O.Box 586, Israel 20692 Office: +972-74723-7652, Mobile: +972-52-3947-704 www.mellanox.com Follow us on Facebook