Discussion:
[ovs-dev] How do we set fields for selection_method=hash?
Yang, Yi Y
2017-03-14 06:32:30 UTC
Permalink
Hi, Simon

I notice you Netronome implemented selection_method support in ovs, now I just want to use the specified match fields as hash input, I checked ovs-ofctl man pages, for such use case, I must use "selection_method=hash fields=...", I'm not sure how I set fields I want, can you help give an example? We don't use IP 5 tuple for this, because they are almost same for our use case, it will be great if we can use a match field we can set as hash input. Thank you in advance.
Simon Horman
2017-03-20 13:27:39 UTC
Permalink
Post by Yang, Yi Y
Hi, Simon
I notice you Netronome implemented selection_method support in ovs, now I
just want to use the specified match fields as hash input, I checked
ovs-ofctl man pages, for such use case, I must use "selection_method=hash
fields=...", I'm not sure how I set fields I want, can you help give an
example? We don't use IP 5 tuple for this, because they are almost same
for our use case, it will be great if we can use a match field we can set
as hash input. Thank you in advance.
Hi,

its a while since I have used the code in question but I believe you can
use something like this:

type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst)

Where I believe fields can include any of the fields documented in
ovs-fields(7).
Yang, Yi Y
2017-03-20 13:36:27 UTC
Permalink
Thanks Simon, I know how I can use it correctly from tests/ofproto.at, but it requires OpenFlow 1.5. I tried a new field I added, it is ok. This is really a good feature:-)

-----Original Message-----
From: Simon Horman [mailto:***@netronome.com]
Sent: Monday, March 20, 2017 9:28 PM
To: Yang, Yi Y <***@intel.com>
Cc: ovs-***@openvswitch.org
Subject: Re: How do we set fields for selection_method=hash?
Post by Yang, Yi Y
Hi, Simon
I notice you Netronome implemented selection_method support in ovs,
now I just want to use the specified match fields as hash input, I
checked ovs-ofctl man pages, for such use case, I must use
"selection_method=hash fields=...", I'm not sure how I set fields I
want, can you help give an example? We don't use IP 5 tuple for this,
because they are almost same for our use case, it will be great if we
can use a match field we can set as hash input. Thank you in advance.
Hi,

its a while since I have used the code in question but I believe you can use something like this:

type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst)

Where I believe fields can include any of the fields documented in ovs-fields(7).
Simon Horman
2017-03-20 13:37:37 UTC
Permalink
Thanks,

I was pretty pleased with the design :)
Post by Yang, Yi Y
Thanks Simon, I know how I can use it correctly from tests/ofproto.at, but it requires OpenFlow 1.5. I tried a new field I added, it is ok. This is really a good feature:-)
-----Original Message-----
Sent: Monday, March 20, 2017 9:28 PM
Subject: Re: How do we set fields for selection_method=hash?
Post by Yang, Yi Y
Hi, Simon
I notice you Netronome implemented selection_method support in ovs,
now I just want to use the specified match fields as hash input, I
checked ovs-ofctl man pages, for such use case, I must use
"selection_method=hash fields=...", I'm not sure how I set fields I
want, can you help give an example? We don't use IP 5 tuple for this,
because they are almost same for our use case, it will be great if we
can use a match field we can set as hash input. Thank you in advance.
Hi,
type=select,selection_method=hash,fields(eth_dst,ip_dst,tcp_dst)
Where I believe fields can include any of the fields documented in ovs-fields(7).
Loading...