Hi, Harry, Welcome!
Please see my reply inlined: >-----Original Message----- >From: ovs-dev-boun...@openvswitch.org [mailto:ovs-dev-boun...@openvswitch.org] >On Behalf Of Van Haaren, Harry >Sent: Friday, May 18, 2018 3:10 AM >To: ovs-dev@openvswitch.org >Subject: [ovs-dev] dpcls: Miniflow match of packet and subtable > >Hi, > >My first post to OvS list - a quick hello! You may have seen me on the DPDK >mailing list, where I send most of my patches. I'm looking >forward to working with yee folks of the OvS community :) > >I've been looking at optimizing the datapath classifier, and stumbled into a >few concepts that I don't think I understand correctly. I've a >question below, any input or suggestions where to investigate next welcome! > >When matching the miniflows between packets and subtables, I believe a packet >cannot match a subtable if the packet does not have >at least the miniflow bits set that the subtable miniflow has. >Eg: >o subtable matches on nw_src (bit 63 of mf) >o The packet miniflow does NOT have bit 63 set >o Is it possible for this to packet to match the subtable? If yes, how? > [Wang, Yipeng] If the subtable mask set the nw_src to be "cared (meaning 1s in mask)", then incoming packets should consider these bits as "cared" during subtable lookup. Even if the packet has those bits as all 0s, it does not mean these bits are not "cared". It is still possible that this key matches one of the rules in this subtable. For example the rule in the table has nw_src as 0, e.g., an IP address of 0.0.0.0. Then a packet with IP of 0.0.0.0 could match it. >In the context of netdev_flow_key_hash_in_mask(), the mf_get_next_in_map() >returns a zero value (uint64_t) which is added into >the hash if the bits isn't set in the packet. It seems like this is not >required, as it doesn't add entropy to the hash itself. (It does change >the hash, as it jumbles around the existing set bits..) > >If we could remove these zero hashes from occurring, we could potentially >speed up the core of the dpcls_lookup(). Has anybody >looked at this before? Am I mistaken in how the bits in the miniflow and >wildcarding takes place? [Wang, Yipeng] You need to hash on those zeroes to find the correct rules. For example the rules in the subtable may also have all those bits as zeroes, and when you insert the rule, you insert with the hash that consider those zeroes. If you don't hash those bits of the packets, you may miss the rule. We have been working on dpcls_lookup optimization for some time. I believe you might be aware of our DFC/CD patch (https://mail.openvswitch.org/pipermail/ovs-dev/2018-May/346986.html) which is to reduce the subtable count during lookup. Thanks Yipeng _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev