[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200724.152345.2053253632022349577.davem@davemloft.net>
Date: Fri, 24 Jul 2020 15:23:45 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: lariel@...lanox.com
Cc: netdev@...r.kernel.org, jiri@...lanox.com, kuba@...nel.org,
jhs@...atatu.com, xiyou.wangcong@...il.com, ast@...nel.org,
daniel@...earbox.net
Subject: Re: [PATCH net-next v4 0/2] TC datapath hash api
From: Ariel Levkovich <lariel@...lanox.com>
Date: Thu, 23 Jul 2020 01:02:59 +0300
> Hash based packet classification allows user to set up rules that
> provide load balancing of traffic across multiple vports and
> for ECMP path selection while keeping the number of rule at minimum.
>
> Instead of matching on exact flow spec, which requires a rule per
> flow, user can define rules based on a their hash value and distribute
> the flows to different buckets. The number of rules
> in this case will be constant and equal to the number of buckets.
>
> The series introduces an extention to the cls flower classifier
> and allows user to add rules that match on the hash value that
> is stored in skb->hash while assuming the value was set prior to
> the classification.
>
> Setting the skb->hash can be done in various ways and is not defined
> in this series - for example:
> 1. By the device driver upon processing an rx packet.
> 2. Using tc action bpf with a program which computes and sets the
> skb->hash value.
>
> $ tc filter add dev ens1f0_0 ingress \
> prio 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
>
> v3 -> v4:
> *Drop 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.
Series applied, thank you.
Powered by blists - more mailing lists