On 7 April 2017 at 06:12, Roi Dayan <[email protected]> wrote:
> From: Paul Blakey <[email protected]>
>
> 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 <[email protected]>
> Reviewed-by: Roi Dayan <[email protected]>
> Reviewed-by: Simon Horman <[email protected]>
> ---

<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'?
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to