> -----Original Message-----
> From: Qiao, Wenjing <[email protected]>
> Sent: Thursday, November 2, 2023 4:51 PM
> To: Wu, Jingjing <[email protected]>; Xing, Beilei
> <[email protected]>;
> Zhang, Qi Z <[email protected]>
> Cc: [email protected]; Qiao, Wenjing <[email protected]>
> Subject: [PATCH v4] net/cpfl: support action prog
>
> From: Wenjing Qiao <[email protected]>
>
> Parse JSON file and generate rules that instruct PMD to map an
> RTE_FLOW_ACTION_TYPE_PROG to a low-level FXP representation, the
> matching follows below guidelines.
>
> Use rte_flow_action_prog->name to match the name of a P4 action type
> when provided in the JSON file. In cases where the JSON file lacks the P4
> action type's name but includes the P4 action type ID, PMD should attempt to
> convert rte_flow_action_prog->name into a
> uint32 value and then match it to the P4 action type ID.
>
> The same method applies when matching a rte_flow_action_prog_argument
> to a field of an action type.
>
> Here's an example to create a rule that matches an IPV4/TCP header and
> applies a VXLAN encapsulation which is represented by rte_flow_action_prog:
>
> flow create 0 ingress pattern eth src is 00:11:22:33:44:55 dst is
> 00:01:00:00:03:14 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / tcp src is
> 0x1451
> dst is 0x157c / end actions prog name vxlan_encap arguments src_addr
> 0xC0A80002 dst_addr 0xC0A80003 src_mac 0x000100000314 dst_mac
> 0x000600000314 src_port 0x1234 dst_port 0x4789 vni 0x000050 end /
> port_representor port_id 0 / end
>
> Signed-off-by: Wenjing Qiao <[email protected]>
Acked-by: Qi Zhang <[email protected]>
The CI build error in patchwork is covered by below fix
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
Applied to dpdk-next-net-intel.
Thanks
Qi