Hi, I am facing some issues w.r.t hashing when FLOW_SIG_SIZE > 130. What I did was to move around members of struct flow such that FLOW_SIG_SIZE = (112 + FLOW_N_REGS * 4). Note that struct flow is not packed so depending on where members are added, due to padding size can increase. The easier way to achieve this is to add two bytes to struct flow, pack it and change related code in line number 98, 99 and 100 in lib/flow.h and then compile and load ovs-switch. What happens with the changes is that none of the flows extracted from the packet match the rules and all packets are dropped.
Why am I doing this? I have added 4 bytes for mpls to update mpls label and traffic class extracted from the packet into struct flow. After I added it and changed other related code as mentioned earlier, behavior of flow matching is pretty unpredictable based on where the new variable is placed in the structure. I looked closely hash_bytes function but didn't find anything suspicious. I have tested it on x86 and x86_64 and it's the same behavior. Since the reserved field is used to get full struct flow size to be 64 bits aligned, I believe it can be changed based on FLOW_SIG_SIZE and it doesn't have any other inherent meaning and since it is not used for calculating hash I believe changing reserved size should be ok. Secondly, any other changes I need to do or areas of code to look at to fix this problem? Thanks Ravi
test_mpls_diffs
Description: test_mpls_diffs
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev