X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fhowto%2Frte_flow.rst;h=c711521617838ea9e5a8d8eb34fe398012fd1976;hb=6844d146ff397d82526a8a39b550443937f7ac12;hp=caa4e1afd15be5ad06ec63e7650d6b0aeb0235d4;hpb=d80e42cce4c7017ed8c99dabb8ae444a492acc1c;p=dpdk.git diff --git a/doc/guides/howto/rte_flow.rst b/doc/guides/howto/rte_flow.rst index caa4e1afd1..c711521617 100644 --- a/doc/guides/howto/rte_flow.rst +++ b/doc/guides/howto/rte_flow.rst @@ -32,7 +32,7 @@ Code .. code-block:: c /* create the attribute structure */ - struct rte_flow_attr attr = {.ingress = 1}; + struct rte_flow_attr attr = { .ingress = 1 }; struct rte_flow_item pattern[MAX_PATTERN_IN_FLOW]; struct rte_flow_action actions[MAX_ACTIONS_IN_FLOW]; struct rte_flow_item_etc eth; @@ -62,8 +62,8 @@ Code actions[1].type = RTE_FLOW_ACTION_TYPE_END; /* validate and create the flow rule */ - if (!rte_flow_validate(port_id, &attr, pattern, actions, &error) - flow = rte_flow_create(port_id, &attr, pattern, actions, &error) + if (!rte_flow_validate(port_id, &attr, pattern, actions, &error)) + flow = rte_flow_create(port_id, &attr, pattern, actions, &error); Output ~~~~~~ @@ -120,7 +120,7 @@ clarity):: tpmd> flow create 0 ingress pattern eth / vlan / ipv4 dst spec 192.168.3.0 dst mask 255.255.255.0 / - end actions drop / end + end actions drop / end Code ~~~~ @@ -160,8 +160,8 @@ Code actions[1].type = RTE_FLOW_ACTION_TYPE_END; /* validate and create the flow rule */ - if (!rte_flow_validate(port_id, &attr, pattern, actions, &error) - flow = rte_flow_create(port_id, &attr, pattern, actions, &error) + if (!rte_flow_validate(port_id, &attr, pattern, actions, &error)) + flow = rte_flow_create(port_id, &attr, pattern, actions, &error); Output ~~~~~~ @@ -227,7 +227,7 @@ Code .. code-block:: c - struct rte_flow_attr attr = {.ingress = 1}; + struct rte_flow_attr attr = { .ingress = 1 }; struct rte_flow_item pattern[MAX_PATTERN_IN_FLOW]; struct rte_flow_action actions[MAX_ACTIONS_IN_FLOW]; struct rte_flow_item_etc eth; @@ -250,12 +250,12 @@ Code /* create the queue action */ actions[0].type = RTE_FLOW_ACTION_TYPE_QUEUE; - actions[0].conf = &queue + actions[0].conf = &queue; actions[1].type = RTE_FLOW_ACTION_TYPE_END; /* validate and create the flow rule */ - if (!rte_flow_validate(port_id, &attr, pattern, actions, &error) - flow = rte_flow_create(port_id, &attr, pattern, actions, &error) + if (!rte_flow_validate(port_id, &attr, pattern, actions, &error)) + flow = rte_flow_create(port_id, &attr, pattern, actions, &error); Output ~~~~~~