History log of /dpdk/app/test-pmd/cmdline_flow.c (Results 1 – 25 of 191)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v22.03, v22.03-rc4, v22.03-rc3
# e2b18484 01-Mar-2022 Alexander Kozyrev <[email protected]>

app/testpmd: fix flow rule creation parsing

A pattern template creation shares the parsing mechanism with
a simple flow creation. The pattern template creation only consists
of pattern items while t

app/testpmd: fix flow rule creation parsing

A pattern template creation shares the parsing mechanism with
a simple flow creation. The pattern template creation only consists
of pattern items while the flow creation continues with actions.
The parsing mechanism now accommodates both cases and allows to stop
at the item end token, which should not happen for the flow creation.
Fix parsing mechanism to differentiate between these two cases.

Bugzilla ID: 941
Fixes: 04cc665fab38 ("app/testpmd: add flow template management")

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>
Tested-by: Zhimin Huang <[email protected]>

show more ...


Revision tags: v22.03-rc2
# d9e59714 24-Feb-2022 Bing Zhao <[email protected]>

app/testpmd: fix raw encap of GENEVE option

The structure "rte_flow_item_geneve_opt" is not a protocol header of
geneve tunnel option from rfc8926. The field "data" is a pointer
which points to the

app/testpmd: fix raw encap of GENEVE option

The structure "rte_flow_item_geneve_opt" is not a protocol header of
geneve tunnel option from rfc8926. The field "data" is a pointer
which points to the actual variable-length option data. So the
structure is not packed.

There is 4 bytes hole before the pointer in a 64-bit system. The
option header is just 4 bytes. When using offsetof() to get the
fixed part's size of option header, the wrong value 8 was got. When
constructing the encap header, a wrong size and offset was used due
to this hole.

With this commit, the fixed part's size is calculated explicitly
based on all fields.

Fixes: 55c074f3ba1d ("app/testpmd: support GENEVE option item")
Cc: [email protected]

Signed-off-by: Bing Zhao <[email protected]>
Reviewed-by: Viacheslav Ovsiienko <[email protected]>

show more ...


# d906fff5 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add async indirect actions operations

Add testpmd support for the rte_flow_async_action_handle API.
Provide the command line interface for operations dequeue.
Usage example:
flow queu

app/testpmd: add async indirect actions operations

Add testpmd support for the rte_flow_async_action_handle API.
Provide the command line interface for operations dequeue.
Usage example:
flow queue 0 indirect_action 0 create action_id 9
ingress postpone yes action rss / end
flow queue 0 indirect_action 0 update action_id 9
action queue index 0 / end
flow queue 0 indirect_action 0 destroy action_id 9

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# f9bf7dff 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add flow queue pull operation

Add testpmd support for the rte_flow_pull API.
Provide the command line interface for pulling operations results.
Usage example: flow pull 0 queue 0

Signe

app/testpmd: add flow queue pull operation

Add testpmd support for the rte_flow_pull API.
Provide the command line interface for pulling operations results.
Usage example: flow pull 0 queue 0

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# 9cbbee14 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add flow queue push operation

Add testpmd support for the rte_flow_push API.
Provide the command line interface for pushing operations.
Usage example: flow queue 0 push 0

Signed-off-by

app/testpmd: add flow queue push operation

Add testpmd support for the rte_flow_push API.
Provide the command line interface for pushing operations.
Usage example: flow queue 0 push 0

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# ecdc927b 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add async flow create/destroy operations

Add testpmd support for the rte_flow_q_create/rte_flow_q_destroy API.
Provide the command line interface for enqueueing flow
creation/destructio

app/testpmd: add async flow create/destroy operations

Add testpmd support for the rte_flow_q_create/rte_flow_q_destroy API.
Provide the command line interface for enqueueing flow
creation/destruction operations. Usage example:
testpmd> flow queue 0 create 0 postpone no
template_table 6 pattern_template 0 actions_template 0
pattern eth dst is 00:16:3e:31:15:c3 / end actions drop / end
testpmd> flow queue 0 destroy 0 postpone yes rule 0

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# c4b38873 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add flow table management

Add testpmd support for the rte_flow_table API.
Provide the command line interface for the flow
table creation/destruction. Usage example:
testpmd> flow temp

app/testpmd: add flow table management

Add testpmd support for the rte_flow_table API.
Provide the command line interface for the flow
table creation/destruction. Usage example:
testpmd> flow template_table 0 create table_id 6
group 9 priority 4 ingress mode 1
rules_number 64 pattern_template 2 actions_template 4
testpmd> flow template_table 0 destroy table 6

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# 04cc665f 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add flow template management

Add testpmd support for the rte_flow_pattern_template and
rte_flow_actions_template APIs. Provide the command line interface
for the template creation/destr

app/testpmd: add flow template management

Add testpmd support for the rte_flow_pattern_template and
rte_flow_actions_template APIs. Provide the command line interface
for the template creation/destruction. Usage example:
testpmd> flow pattern_template 0 create pattern_template_id 2
template eth dst is 00:16:3e:31:15:c3 / end
testpmd> flow actions_template 0 create actions_template_id 4
template drop / end mask drop / end
testpmd> flow actions_template 0 destroy actions_template 4
testpmd> flow pattern_template 0 destroy pattern_template 2

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# 9ad3a41a 23-Feb-2022 Alexander Kozyrev <[email protected]>

app/testpmd: add flow engine configuration

Add testpmd support for the rte_flow_configure API.
Provide the command line interface for the Flow management.
Usage example: flow configure 0 queues_numb

app/testpmd: add flow engine configuration

Add testpmd support for the rte_flow_configure API.
Provide the command line interface for the Flow management.
Usage example: flow configure 0 queues_number 8 queues_size 256

Implement rte_flow_info_get API to get available resources:
Usage example: flow info 0

Signed-off-by: Alexander Kozyrev <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


Revision tags: v22.03-rc1
# 26b7259a 11-Feb-2022 Sean Zhang <[email protected]>

app/testpmd: support GRE option flow item

Add gre_option command for matching optional fields
(checksum/key/sequence) in GRE header. The item must follow gre item,
and the item does not change the f

app/testpmd: support GRE option flow item

Add gre_option command for matching optional fields
(checksum/key/sequence) in GRE header. The item must follow gre item,
and the item does not change the flags in gre item, the application
should set the flags in gre item correspondingly.
Application can still use gre_key item 'gre_key value is xx' for key
matching, the effect is the same with using 'gre_option key is xx'.

The examples for gre_option are as follows:

To match on checksum field with value 0x11:
testpmd> ... pattern / eth / gre c_bit is 1 / gre_option checksum is
0x11 / end ..

To match on checksum field with value 0x11 and any value of key:
testpmd> ... pattern / eth / gre c_bit is 1 k_bit is 1 / gre_option
checksum is 0x11 / end ..

To match on checksum field with value 0x11 and no key field in packet:
testpmd> ... pattern / eth / gre c_bit is 1 k_bit is 0 / gre_option
checksum is 0x11 / end ..

The invalid patterns for gre_option are as follows:

testpmd> ... pattern / eth / gre / gre_option checksum is 0x11 / end ..
(c_bit in gre item not present)
testpmd> ... pattern / eth / gre c_bit is 0 / gre_option checksum is 0x11 /
end .. (c_bit is unset for gre item, but checksum is
specified by gre_option item)

Signed-off-by: Sean Zhang <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# 988cd040 09-Feb-2022 Jie Wang <[email protected]>

app/testpmd: add 6 types of L2TPv2 message

This patch adds L2TPv2 control message and 5 types of data message
support for testpmd.

The added L2TPv2 message types are listed below:
1. L2TPv2 control

app/testpmd: add 6 types of L2TPv2 message

This patch adds L2TPv2 control message and 5 types of data message
support for testpmd.

The added L2TPv2 message types are listed below:
1. L2TPv2 control
2. L2TPv2
3. L2TPv2 + length option
4. L2TPv2 + sequence option
5. L2TPv2 + offset option
6. L2TPv2 + length option + sequence option

Signed-off-by: Jie Wang <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# cb43641e 11-Jan-2022 Nipun Gupta <[email protected]>

app/testpmd: update raw flow to take hex input

This patch enables method to provide key and mask for raw rules
to be provided as hexadecimal values. There is new parameter
pattern_mask added to supp

app/testpmd: update raw flow to take hex input

This patch enables method to provide key and mask for raw rules
to be provided as hexadecimal values. There is new parameter
pattern_mask added to support this.

Signed-off-by: Nipun Gupta <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>

show more ...


# f924a8d3 18-Jan-2022 Sean Morrissey <[email protected]>

app/testpmd: fix dereference before null check

Assign 'left' variable only after null check on 'size'
as function returns if 'size' is null.

Coverity issue: 374381
Fixes: 169a9fed1f4c ("app/testpmd

app/testpmd: fix dereference before null check

Assign 'left' variable only after null check on 'size'
as function returns if 'size' is null.

Coverity issue: 374381
Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")
Cc: [email protected]

Signed-off-by: Sean Morrissey <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


# 7be78d02 29-Nov-2021 Josh Soref <[email protected]>

fix spelling in comments and strings

The tool comes from https://github.com/jsoref

Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Thomas Monjalon <[email protected]>


Revision tags: v21.11, v21.11-rc4
# ea1da434 24-Nov-2021 Gregory Etelson <[email protected]>

app/testpmd: fix hexadecimal parser with odd length

Current hex string parser assumes input has even characters number.
The parser fails input string with odd length.

The patch parses hex strings w

app/testpmd: fix hexadecimal parser with odd length

Current hex string parser assumes input has even characters number.
The parser fails input string with odd length.

The patch parses hex strings with even and odd length.
Parse result of an input with odd length will match result of
even length input, that has `0` as MSB, following by the original
sequence.
For example:
"0x1" results in *dst={0x01, 0x00}, *size=1
"0xabc" results in *dst={0x0a, 0xbc, 0x00}, *size=2

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")
Cc: [email protected]

Signed-off-by: Gregory Etelson <[email protected]>
Reviewed-by: Viacheslav Ovsiienko <[email protected]>

show more ...


Revision tags: v21.11-rc3, v21.11-rc2
# edbe962f 04-Nov-2021 Raslan Darawsheh <[email protected]>

app/testpmd: fix GTP PSC extension header length

Current implementation for raw encap sets the length to be in bytes,
but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fix

app/testpmd: fix GTP PSC extension header length

Current implementation for raw encap sets the length to be in bytes,
but, GTP 'extension' header length is an 8-bit field in 4-octet units.

This fixes the length calculation of the header length.

Fixes: 9213c50e36fa ("app/testpmd: support GTP PSC option in raw sets")
Cc: [email protected]

Signed-off-by: Raslan Darawsheh <[email protected]>
Reviewed-by: Viacheslav Ovsiienko <[email protected]>

show more ...


# deaa33c2 03-Nov-2021 Junfeng Guo <[email protected]>

app/testpmd: increase max raw pattern size to 512

Update max size for pattern in struct rte_flow_item_raw to enable
protocol agnostic flow offloading.

Signed-off-by: Junfeng Guo <junfeng.guo@intel.

app/testpmd: increase max raw pattern size to 512

Update max size for pattern in struct rte_flow_item_raw to enable
protocol agnostic flow offloading.

Signed-off-by: Junfeng Guo <[email protected]>
Reviewed-by: Qi Zhang <[email protected]>

show more ...


# 68436613 27-Oct-2021 Jie Wang <[email protected]>

app/testpmd: fix L2TPv2 message type

In "msg_type |= 0xc800", wider "51200" has high-order bits (0xc800)
that don't affect the narrower left-hand side.

This patch fixes coverity issue by changing t

app/testpmd: fix L2TPv2 message type

In "msg_type |= 0xc800", wider "51200" has high-order bits (0xc800)
that don't affect the narrower left-hand side.

This patch fixes coverity issue by changing the definition type of
"msg_type" from uint8_t to uint16_t.

Coverity issue: 373651
Fixes: 748530f0354e ("app/testpmd: support L2TPv2 and PPP protocol pattern")

Signed-off-by: Jie Wang <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


Revision tags: v21.11-rc1
# 748530f0 21-Oct-2021 Jie Wang <[email protected]>

app/testpmd: support L2TPv2 and PPP protocol pattern

Add support for test-pmd to parse protocol pattern L2TPv2 and PPP.

Signed-off-by: Wenjun Wu <[email protected]>
Signed-off-by: Jie Wang <jie1

app/testpmd: support L2TPv2 and PPP protocol pattern

Add support for test-pmd to parse protocol pattern L2TPv2 and PPP.

Signed-off-by: Wenjun Wu <[email protected]>
Signed-off-by: Jie Wang <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>

show more ...


# 59f3a8ac 20-Oct-2021 Gregory Etelson <[email protected]>

app/testpmd: add flex item commands

Network port hardware is shipped with fixed number of
supported network protocols. If application must work with a
protocol that is not included in the port hardw

app/testpmd: add flex item commands

Network port hardware is shipped with fixed number of
supported network protocols. If application must work with a
protocol that is not included in the port hardware by default, it
can try to add the new protocol to port hardware.

Flex item or flex parser is port infrastructure that allows
application to add support for a custom network header and
offload flows to match the header elements.

Application must complete the following tasks to create a flow
rule that matches custom header:

1. Create flow item object in port hardware.
Application must provide custom header configuration to PMD.
PMD will use that configuration to create flex item object in
port hardware.

2. Create flex patterns to match. Flex pattern has a spec and a mask
components, like a regular flow item. Combined together, spec and mask
can target unique data sequence or a number of data sequences in the
custom header.
Flex patterns of the same flex item can have different lengths.
Flex pattern is identified by unique handler value.

3. Create a flow rule with a flex flow item that references
flow pattern.

Testpmd flex CLI commands are:

testpmd> flow flex_item create <port> <flex_id> <filename>

testpmd> set flex_pattern <pattern_id> \
spec <spec data> mask <mask data>

testpmd> set flex_pattern <pattern_id> is <spec_data>

testpmd> flow create <port> ... \
/ flex item is <flex_id> pattern is <pattern_id> / ...

The patch works with the jansson library API.
A new optional dependency on jansson library is added for
testpmd. If jansson not detected the flex item functionality
is disabled.
Jansson development files must be present:
jansson.pc, jansson.h libjansson.[a,so]

Signed-off-by: Gregory Etelson <[email protected]>
Reviewed-by: Viacheslav Ovsiienko <[email protected]>

show more ...


# 2566c33c 20-Oct-2021 Gregory Etelson <[email protected]>

app/testpmd: add flow command parsing routine

testpmd flow creation is constructed from these procedures:
1. receive string with flow rule description;
2. parse input string and build flow param

app/testpmd: add flow command parsing routine

testpmd flow creation is constructed from these procedures:
1. receive string with flow rule description;
2. parse input string and build flow parameters: port_id value,
flow attributes, items array, actions array;
3. create a flow rule from flow rule parameters.

Flow rule creation procedures are built as a pipeline. A new
procedure starts immediately after successful predecessor completion.
Due to this we have no dedicated routines providing intermediate
results for step 1-3 above.

The patch adds `flow_parse()` function call. It parses input string
and provides a caller with parsed data. This is a preparation step
for introducing flex item command processing.

Signed-off-by: Gregory Etelson <[email protected]>
Reviewed-by: Viacheslav Ovsiienko <[email protected]>

show more ...


# a2b97fb7 13-Oct-2021 Viacheslav Ovsiienko <[email protected]>

app/testpmd: fix hex string parser in flow commands

The hexadecimal string parser does not check the target
field buffer size, buffer overflow happens and might
cause the application failure (segmen

app/testpmd: fix hex string parser in flow commands

The hexadecimal string parser does not check the target
field buffer size, buffer overflow happens and might
cause the application failure (segmentation fault
is observed usually).

Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API")
Cc: [email protected]

Signed-off-by: Viacheslav Ovsiienko <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# 06822012 13-Oct-2021 Viacheslav Ovsiienko <[email protected]>

app/testpmd: update modify field flow action support

The testpmd flow create command updates provided:

- modify field action supports the updated actions
- pointer type added for action source

app/testpmd: update modify field flow action support

The testpmd flow create command updates provided:

- modify field action supports the updated actions
- pointer type added for action source field
- pointer and value source field takes hex string
instead of unsigned int in host endianness

There are some examples of flow with update modified
field action:

1. IPv6 destination address bytes 4-7 assignment:
0000::1111 - > 0000:xxxx:4455:6677::1111

flow create 0 egress group 1
pattern eth / ipv6 dst is 0000::1111 / udp / end
actions modify_field op set
dst_type ipv6_dst
dst_offset 32
src_type value
src_value 0011223344556677
width 32 / end

2. Copy second byte of IPv4 destination address to the
third byte of source address:
10.0.118.4 -> 192.168.100.1
10.0.168.4 -> 192.168.100.1

flow create 0 egress group 1
pattern eth / ipv4 / udp / end
actions modify_field op set
dst_type ipv4_src
dst_offset 16
src_type ipv4_dst
src_offset 8
width 8 / end

3. Assign METADATA value with 11223344 value from the
hex string in the linear buffer. Please note, the value
definition should follow host-endian, example is given
for x86 (little-endian):

flow create 0 egress group 1
pattern eth / ipv4 / end
actions modify_field op set
dst_type meta
src_type pointer
src_ptr 44332211
width 32 / end

4. Assign destination MAC with EA:11:0B:AD:0B:ED value:

flow create 0 egress group 1
pattern eth / end
actions modify_field op set
dst_type mac_dst
src_type value
src_value EA110BAD0BED
width 48 / end

Signed-off-by: Viacheslav Ovsiienko <[email protected]>
Acked-by: Ori Kam <[email protected]>

show more ...


# 88caad25 13-Oct-2021 Ivan Malov <[email protected]>

ethdev: add represented port action to flow API

For use in "transfer" flows. Supposed to send matching traffic to the
entity represented by the given ethdev, at embedded switch level.
Such an entity

ethdev: add represented port action to flow API

For use in "transfer" flows. Supposed to send matching traffic to the
entity represented by the given ethdev, at embedded switch level.
Such an entity can be a network (via a network port), a guest
machine (via a VF) or another ethdev in the same application.

Signed-off-by: Ivan Malov <[email protected]>
Acked-by: Ori Kam <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>

show more ...


# 8edb6bc0 13-Oct-2021 Ivan Malov <[email protected]>

ethdev: add port representor action to flow API

For use in "transfer" flows. Supposed to send matching traffic to
the given ethdev (to the application), at embedded switch level.

Signed-off-by: Iva

ethdev: add port representor action to flow API

For use in "transfer" flows. Supposed to send matching traffic to
the given ethdev (to the application), at embedded switch level.

Signed-off-by: Ivan Malov <[email protected]>
Acked-by: Ori Kam <[email protected]>
Acked-by: Andrew Rybchenko <[email protected]>

show more ...


12345678