[ovs-dev] [PATCH v3 03/10] tc: Introduce tcf_id to specify a tc filter

Paul Blakey paulb at mellanox.com
Mon Dec 9 15:09:37 UTC 2019


On 12/3/2019 3:45 PM, Roi Dayan wrote:
> @@ -1428,38 +1419,35 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match,
>           }
>       }
>   
> -    block_id = get_block_id_from_netdev(netdev);

Accidentally removed this line, will post V4 soon with this fix.

There is nothing else pending so I welcome more replies :)

> -    handle = get_ufid_tc_mapping(ufid, &prio, NULL);
> -    if (handle && prio) {
> -        VLOG_DBG_RL(&rl, "updating old handle: %d prio: %d", handle, prio);
> -        del_filter_and_ufid_mapping(ifindex, prio, handle, block_id, ufid,
> -                                    hook);
> -    }
> -
> -    if (!prio) {
> -        prio = get_prio_for_tc_flower(&flower);
> -        if (prio == 0) {
> -            VLOG_ERR_RL(&rl, "couldn't get tc prio: %s", ovs_strerror(ENOSPC));
> -            return ENOSPC;
> -        }
> +    if (get_ufid_tc_mapping(ufid, &id) == 0) {
> +        VLOG_DBG_RL(&rl, "updating old handle: %d prio: %d",
> +                    id.handle, id.prio);
> +        del_filter_and_ufid_mapping(&id, ufid);
> +    }
> +
> +    prio = get_prio_for_tc_flower(&flower);
> +    if (prio == 0) {
> +        VLOG_ERR_RL(&rl, "couldn't get tc prio: %s", ovs_strerror(ENOSPC));
> +        return ENOSPC;
>       }
>   
>       flower.act_cookie.data = ufid;
>       flower.act_cookie.len = sizeof *ufid;
>   
> -    err = tc_replace_flower(ifindex, prio, handle, &flower, block_id, hook);
> +    id = tc_make_tcf_id(ifindex, block_id, prio, hook);
> +    err = tc_replace_flower(&id, &flower);


More information about the dev mailing list