From: "Li, Tao" <tao.li06@sap.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: Failed to generalize modify_field action template for IPv6 src address using the Async API
Date: Tue, 13 Aug 2024 12:13:52 +0000 [thread overview]
Message-ID: <AM0PR02MB5796C9AE81F8FBA480C7A4EB80862@AM0PR02MB5796.eurprd02.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3344 bytes --]
Hello All,
I am using the async API to install flow rules to perform modify_field action to change content of packets’ headers, especially the src address in a IPv6 header. But I am facing the issue of being unable to generalize the action template for this purpose. The testpmd commands used to modify the src IPv6 address of an incoming packet from PF0, then forward it to a VM are as follows. These commands are inspired by the synchronous examples from [1].
<Command to start test-pmd>
sudo ./dpdk-testpmd -a 3b:00.0,dv_flow_en=2,representor=pf0vf0 -- -i --rxq=1 --txq=1 --flow-isolate-all
</Command to start test-pmd>
<Install async rules changing ipv6 src address>
port stop all
flow configure 0 queues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 meters_number 0 flags 0
flow configure 1 queues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 meters_number 0 flags 0
port start all
flow pattern_template 0 create pattern_template_id 10 transfer template represented_port ethdev_port_id is 0 / eth / ipv6 / end
flow actions_template 0 create transfer actions_template_id 10 template jump / end mask jump / end
flow pattern_template 0 create pattern_template_id 11 transfer template eth / ipv6 / end
flow actions_template 0 create transfer actions_template_id 13 template modify_field op set dst_type ipv6_src dst_level 0 dst_offset 0 src_type value src_value FFFFFFFFFFFF width 128 / represented_port / end mask modify_field op set dst_type ipv6_src dst_level 0xff dst_offset 0xffffffff src_type value src_value FFFFFFFFFFFF width 0xffffffff / represented_port / end
flow template_table 0 create group 0 priority 0 transfer wire_orig table_id 0x1 rules_number 8 pattern_template 10 actions_template 10
flow template_table 0 create group 2 priority 0 transfer table_id 0x3 rules_number 8 pattern_template 11 actions_template 13
flow queue 0 create 0 template_table 0x1 pattern_template 0 actions_template 0 postpone no pattern represented_port ethdev_port_id is 0 / eth / ipv6 / end actions jump group 2 / end
flow queue 0 create 0 template_table 0x3 pattern_template 0 actions_template 0 postpone no pattern eth / ipv6 / end actions modify_field op set dst_type ipv6_src src_type value src_value 20010db8000000008a2e037073341234 width 128 / represented_port ethdev_port_id 1 / end
flow push 0 queue 0
</Install async rules changing ipv6 src address>
It is observed that, the src IPv6 address is changed but with the value of FFFF:FFFF:FFFF::, which is identical to the value used in the action template creation. Setting src_value to 0 would change the src IPv6 address to :: , which does not provide a generalized modify_field action template either.
<Packet trace>
11:42:57.922978 90:3c:b3:33:72:fb > 04:3f:72:e8:cf:ca, ethertype IPv6 (0x86dd), length 82: ffff:ffff:ffff:: > 7a2a:bcde:e0123:e301:0:1:0:1: 192.168.129.5 > 172.32.4.9: ICMP echo request, id 0, seq 0, length 8
</Packet trace>
Thus, I would like to ask the community, if it is possible or how to create a generalized modify_field action template to allow installation of flow rules with different src IPv6 address values, as experimented above.
Many thanks in advance.
[1] https://inbox.dpdk.org/dev/20211012080631.28504-4-viacheslavo@nvidia.com/
Best regards,
Tao
[-- Attachment #2: Type: text/html, Size: 11428 bytes --]
reply other threads:[~2024-08-13 12:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM0PR02MB5796C9AE81F8FBA480C7A4EB80862@AM0PR02MB5796.eurprd02.prod.outlook.com \
--to=tao.li06@sap.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).