]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/examples/qos_meter/rte_policer.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
6 #include "rte_policer.h"
9 rte_phb_config(struct rte_phb
*phb_table
, uint32_t phb_table_index
,
10 enum rte_color pre_meter
, enum rte_color post_meter
, enum rte_phb_action action
)
12 struct rte_phb
*phb
= NULL
;
14 /* User argument checking */
15 if (phb_table
== NULL
) {
19 if ((pre_meter
> RTE_COLOR_RED
) || (post_meter
> RTE_COLOR_RED
) || (pre_meter
> post_meter
)) {
23 /* Set action in PHB table entry */
24 phb
= &phb_table
[phb_table_index
];
25 phb
->actions
[pre_meter
][post_meter
] = action
;