[PATCH V2 2/2] app/testpmd: assign custom ID to flow rules

Ferruh Yigit ferruh.yigit at amd.com
Fri Jun 30 12:21:20 CEST 2023


On 6/2/2023 9:19 PM, Ferruh Yigit wrote:
> On 3/16/2023 2:19 PM, Gregory Etelson wrote:
>> From: Eli Britstein <elibr at nvidia.com>
>>
>> Upon creation of a flow, testpmd assigns it a flow ID. Later, the
>> flow ID is used for flow operations (query, destroy, dump).
>>
>> The testpmd application allows to manage flow rules with its IDs.
>> The flow ID is known only when the flow is created.
>> In order to prepare a complete sequence of testpmd commands to
>> copy/paste, the flow IDs must be predictable.
>>
>> Allow the user to provide an assigned ID.
>>
>> Example:
>> testpmd> flow create 0 ingress user_id 0x1234 pattern eth / end actions
>> count / drop / end
>> Flow rule #0 created, user-id 0x1234
>>
>> testpmd> flow query 0 0x1234 count user_id
>>
>> testpmd> flow dump 0 user_id rule 0x1234
>>
>> testpmd> flow destroy 0 rule 0x1234 user_id
>> Flow rule #0 destroyed, user-id 0x1234
>>
>> Here, "user_id" is a flag that signifies the "rule" ID is the user-id.
>>
>> The motivation is from OVS. OVS dumps its "rte_flow_create" calls to the
>> log in testpmd commands syntax. As the flow ID testpmd would assign is
>> unkwon, it cannot log valid "flow destroy" commands.
>>
>> With this enhancement, valid testpmd commands can be created in a
>> log to copy/paste to testpmd.
>> The application's flows sequence can then be played back in
>> testpmd, to enable enhanced dpdk debug capabilities of the
>> applications's flows in a controlled environment of testpmd
>> rather than a dynamic, more difficult to debug environment of the
>> application.
>>
>> Signed-off-by: Eli Britstein <elibr at nvidia.com>
>> ---
>>  app/test-pmd/cmdline_flow.c                 | 72 +++++++++++++++++++--
>>  app/test-pmd/config.c                       | 34 +++++++---
>>  app/test-pmd/testpmd.h                      | 12 ++--
>>  doc/guides/testpmd_app_ug/testpmd_funcs.rst | 33 +++++++---
>>  4 files changed, 121 insertions(+), 30 deletions(-)
>>
> 
> Hi Ori,
> 
> Can you please help reviewing this patch?
> 

Reminder for review.



More information about the dev mailing list