Skip to content

Commit

Permalink
api: cls: remove capability field
Browse files Browse the repository at this point in the history
Remove `available_pmr_terms` as obsolete and unused.

Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
  • Loading branch information
TuomasTaipale committed Dec 12, 2023
1 parent c8a8648 commit ed51d5e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion example/sysinfo/odp_sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,6 @@ int main(int argc, char **argv)
printf(" max_pmr: %u\n", cls_capa.max_pmr);
printf(" max_pmr_per_cos: %u\n", cls_capa.max_pmr_per_cos);
printf(" max_terms_per_pmr: %u\n", cls_capa.max_terms_per_pmr);
printf(" available_pmr_terms: %u\n", cls_capa.available_pmr_terms);
printf(" max_cos: %u\n", cls_capa.max_cos);
printf(" max_hash_queues: %u\n", cls_capa.max_hash_queues);
printf(" hash_protocols: 0x%x\n", cls_capa.hash_protocols.all_bits);
Expand Down
3 changes: 0 additions & 3 deletions include/odp/api/spec/classification.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,6 @@ typedef struct odp_cls_capability_t {
/** Maximum number of terms per composite PMR */
uint32_t max_terms_per_pmr;

/** Number of PMR terms available for use now */
uint32_t available_pmr_terms;

/** Maximum number of CoS supported */
uint32_t max_cos;

Expand Down
8 changes: 0 additions & 8 deletions platform/linux-generic/odp_classification.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,10 @@ void odp_cls_pmr_param_init(odp_pmr_param_t *param)

int odp_cls_capability(odp_cls_capability_t *capability)
{
uint32_t count = 0;

memset(capability, 0, sizeof(odp_cls_capability_t));

for (int i = 0; i < CLS_PMR_MAX_ENTRY; i++)
if (!pmr_tbl->pmr[i].valid)
count++;

capability->max_pmr = CLS_PMR_MAX_ENTRY;
capability->max_pmr_per_cos = CLS_PMR_PER_COS_MAX;
capability->max_terms_per_pmr = CLS_PMRTERM_MAX;
capability->available_pmr_terms = count;
capability->max_cos = CLS_COS_MAX_ENTRY;
capability->max_cos_stats = capability->max_cos;
capability->pmr_range_supported = false;
Expand Down

0 comments on commit ed51d5e

Please sign in to comment.