MCPcopy Create free account
hub / github.com/F-Stack/f-stack / convert_rules

Function convert_rules

dpdk/app/test/test_acl.c:786–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784}
785
786static int
787convert_rules(struct rte_acl_ctx *acx,
788 void (*convert)(const struct rte_acl_ipv4vlan_rule *,
789 struct acl_ipv4vlan_rule *),
790 const struct rte_acl_ipv4vlan_rule *rules, uint32_t num)
791{
792 int32_t rc;
793 uint32_t i;
794 struct acl_ipv4vlan_rule r;
795
796 for (i = 0; i != num; i++) {
797 convert(rules + i, &r);
798 rc = rte_acl_add_rules(acx, (struct rte_acl_rule *)&r, 1);
799 if (rc != 0) {
800 printf("Line %i: Adding rule %u to ACL context "
801 "failed with error code: %d\n",
802 __LINE__, i, rc);
803 return rc;
804 }
805 }
806
807 return 0;
808}
809
810static void
811convert_config(struct rte_acl_config *cfg)

Callers 1

test_convert_rulesFunction · 0.85

Calls 2

rte_acl_add_rulesFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected