On 14/04/2017 03:55, Joe Stringer wrote:
On 7 April 2017 at 06:12, Roi Dayan <r...@mellanox.com> wrote:
From: Paul Blakey <pa...@mellanox.com>
Flows offloaded to tc are identified by priority
and handle pair while OVS flows are identified by ufid.
Added a hash map to convert between the two for later
retrieval and deleting of offloaded flows.
Signed-off-by: Paul Blakey <pa...@mellanox.com>
Reviewed-by: Roi Dayan <r...@mellanox.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
<snip>
+/* Add ufid to ufid_tc hashmap and prio/handle/ifindex to tc_ufid hashmap.
+ * If those exists already they will be replaced. */
+static void
+add_ufid_tc_mapping(const ovs_u128 *ufid, int prio, int handle,
+ struct netdev *netdev, int ifindex)
+{
+ size_t hash = hash_bytes(ufid, sizeof *ufid, 0);
+ size_t hash2 = hash_int(hash_int(prio, handle), ifindex);
+ struct ufid_to_tc_data *new_data = xzalloc(sizeof *new_data);
+ struct ufid_to_tc_data *new_data2 = xzalloc(sizeof *new_data2);
Is there a particular reason for duplicating this twice? Can we just
have two hmap nodes in 'struct ufid_to_tc_data'?
yes. thanks.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev