On Fri, Dec 12, 2014 at 11:40:06AM +0900, Simon Horman wrote: > On Thu, Dec 11, 2014 at 09:48:15AM -0800, Ben Pfaff wrote: > > On Wed, Nov 19, 2014 at 09:44:54AM +0900, Simon Horman wrote: > > > The fields field is an ofp_match structure which includes the fields which > > > should be used as inputs to bucket selection. ofp_match is described in > > > Open Flow 1.4 section 7.2.2 Flow Match Structures. > > > > > > Fields must not be specified unless the group selection_method is non-zero > > > length. > > > > > > The pre-requisites for fields specified must be satisfied in the match for > > > any flow that uses the group. > > > > > > Masking is allowed but not required for fields whose TLVs allow masking. > > > > > > The fields may for example be used as the fields that are hashed > > > by a hash group selection method. > > > > OK, this explains a little bit about 'fields' (my question on one of the > > patches) but I don't think it cleared up my questions. Can you give > > some examples of 'fields'? > > I expected some feedback regarding the implementation of fields but not > regarding their purpose. I apologise for not explaining things more > clearly. > > The idea of fields is to describe the input to the selection method. > So if the selection method is a hash and fields is eth_dst then > the value of eth_dst would be the only input from the headers > of the packet to the hash. i.e. hash(flow.eth_dst). > > The idea behind allowing masks of the fields is to allow part of > a field to form the input to the hash. For example the top 32 > bits of the eth_dst, or the top 3 octets of an IPv4 address. > > e.g. hash(flow.eth_dst & 0xff:ff:ff:ff:00:00) > > > At the risk of repeating the above unnecessarily, there is an example > buried in the test that is included patch 9 which adds a hash selection > method. It sets up a group where the selection method will be a hash of the > eth_dst. > > > group_id=1234,type=select,selection_method=hash,fields=eth_dst=ff:ff:ff:ff:ff:ff,bucket=output:10,bucket=output:11
Oh, I understood that much. The part I didn't understand was what actually went in the data structure, e.g. was it a mask etc. Anyway, discussion elsewhere has already cleared that up for me, so no need to go on here. Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev