X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=doc%2Fguides%2Fhowto%2Frte_flow.rst;h=27d4f28f7732a49b3bae8a815f126af5b40da169;hb=5158260917a0588052500af4e011b6cd77143c1c;hp=c711521617838ea9e5a8d8eb34fe398012fd1976;hpb=1334586b669c1d27aec2bffd0b1ed9f542cd7d19;p=dpdk.git diff --git a/doc/guides/howto/rte_flow.rst b/doc/guides/howto/rte_flow.rst index c711521617..27d4f28f77 100644 --- a/doc/guides/howto/rte_flow.rst +++ b/doc/guides/howto/rte_flow.rst @@ -8,7 +8,7 @@ This document demonstrates some concrete examples for programming flow rules with the ``rte_flow`` APIs. * Detail of the rte_flow APIs can be found in the following link: - :ref:`Generic flow API ` . + :doc:`../prog_guide/rte_flow`. * Details of the TestPMD commands to set the flow rules can be found in the following link: :ref:`TestPMD Flow rules ` @@ -23,7 +23,7 @@ In this example we will create a simple rule that drops packets whose IPv4 destination equals 192.168.3.2. This code is equivalent to the following testpmd command (wrapped for clarity):: - tpmd> flow create 0 ingress pattern eth / vlan / + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 dst is 192.168.3.2 / end actions drop / end Code @@ -35,7 +35,7 @@ Code 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; + struct rte_flow_item_eth eth; struct rte_flow_item_vlan vlan; struct rte_flow_item_ipv4 ipv4; struct rte_flow *flow; @@ -45,7 +45,7 @@ Code pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH; pattern[0].spec = ð - /* set the vlan to pas all packets */ + /* set the vlan to pass all packets */ pattern[1] = RTE_FLOW_ITEM_TYPE_VLAN; pattern[1].spec = &vlan; @@ -55,7 +55,7 @@ Code pattern[2].spec = &ipv4; /* end the pattern array */ - pattern[3].type = RTE_FLOW_ITEM)TYPE_END; + pattern[3].type = RTE_FLOW_ITEM_TYPE_END; /* create the drop action */ actions[0].type = RTE_FLOW_ACTION_TYPE_DROP; @@ -118,7 +118,7 @@ a mask. This code is equivalent to the following testpmd command (wrapped for clarity):: - tpmd> flow create 0 ingress pattern eth / vlan / + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 dst spec 192.168.3.0 dst mask 255.255.255.0 / end actions drop / end @@ -130,7 +130,7 @@ Code 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; + struct rte_flow_item_eth eth; struct rte_flow_item_vlan vlan; struct rte_flow_item_ipv4 ipv4; struct rte_flow_item_ipv4 ipv4_mask; @@ -141,7 +141,7 @@ Code pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH; pattern[0].spec = ð - /* set the vlan to pas all packets */ + /* set the vlan to pass all packets */ pattern[1] = RTE_FLOW_ITEM_TYPE_VLAN; pattern[1].spec = &vlan; @@ -153,7 +153,7 @@ Code pattern[2].mask = &ipv4_mask; /* end the pattern array */ - pattern[3].type = RTE_FLOW_ITEM)TYPE_END; + pattern[3].type = RTE_FLOW_ITEM_TYPE_END; /* create the drop action */ actions[0].type = RTE_FLOW_ACTION_TYPE_DROP; @@ -219,7 +219,7 @@ In this example we will create a rule that routes all vlan id 123 to queue 3. This code is equivalent to the following testpmd command (wrapped for clarity):: - tpmd> flow create 0 ingress pattern eth / vlan vid spec 123 / + testpmd> flow create 0 ingress pattern eth / vlan vid spec 123 / end actions queue index 3 / end Code @@ -230,7 +230,7 @@ Code 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; + struct rte_flow_item_eth eth; struct rte_flow_item_vlan vlan; struct rte_flow_action_queue queue = { .index = 3 }; struct rte_flow *flow; @@ -246,7 +246,7 @@ Code pattern[1].spec = &vlan; /* end the pattern array */ - pattern[2].type = RTE_FLOW_ITEM)TYPE_END; + pattern[2].type = RTE_FLOW_ITEM_TYPE_END; /* create the queue action */ actions[0].type = RTE_FLOW_ACTION_TYPE_QUEUE;