Question about dpni option of DPAA2 in LSDK-1803

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about dpni option of DPAA2 in LSDK-1803

1,846 Views
kazuyayamauchi
Contributor II

Hello,

We are evaluating LS2088ARDB with LSDK-1803.
We want to know regarding "dpni_attr.options value" of DPAA2.

In LSDK1803, "dpni_attr.options value" seems to be "0".
--------------------
# ls-listni
dprc.1/dpni.0 (interface: eth1, end point: dpmac.5) # restool dpni info dpni.0 dpni version: 7.4 dpni id: 0 plugged state: plugged endpoint state: 0
endpoint: dpmac.5, link is down
link status: 0 - down
mac address: 00:10:f3:74:47:be
dpni_attr.options value is: 0
num_queues: 1
num_tcs: 1
mac_entries: 16
vlan_entries: 0
qos_entries: 0
fs_entries: 64
qos_key_size: 0
fs_key_size: 56
ingress_all_frames: 0
ingress_all_bytes: 0
ingress_multicast_frames: 0
ingress_multicast_bytes: 0
ingress_broadcast_frames: 0
ingress_broadcast_bytes: 0
egress_all_frames: 0
egress_all_bytes: 0
egress_multicast_frames: 0
egress_multicast_bytes: 0
egress_broadcast_frames: 0
egress_broadcast_bytes: 0
ingress_filtered_frames: 0
ingress_discarded_frames: 0
ingress_nobuffer_discards: 0
egress_discarded_frames: 0
egress_confirmed_frames: 0
--------------------

We want to add the following option.
-----
DPNI_OPT_DIST_HASH:
Support distribution based on hash. Allows statistical distribution over receive queues.
-----

We tried this using with "ls-addni", "restool dpni create" and "restool dpni update" etc.
But we see the following error message:
"Invalid option: 'DPNI_OPT_DIST_HASH'"

Background of this question, we want to load-distribute the processing of frames by multi-core.
Could you advise us how to setting load-distribute?

*MEMO*
We checked help, but the DPNI_OPT_DIST_HASH option seems not to be configurable.
In the meantime, we think that we may be able to set it from explanation of documents.

================================
# restool dpni create help
Unexpected argument: 'help'


Usage: restool dpni create [OPTIONS]

OPTIONS:
--options=<options-mask>
Where <options-mask> is a comma or space separated list of DPNI options:
DPNI_OPT_TX_FRM_RELEASE
DPNI_OPT_NO_MAC_FILTER
DPNI_OPT_HAS_POLICING
DPNI_OPT_SHARED_CONGESTION
DPNI_OPT_HAS_KEY_MASKING
DPNI_OPT_NO_FS
DPNI_OPT_HAS_OPR
DPNI_OPT_OPR_PER_TC
...

# ls-addni --help
Usage: /usr/local/bin/ls-addni [OPTIONS] <endpoint>
The options are:
-h, --help This message.
--mac-addr=<addr> String specifying primary MAC address (e.g. 00:00:05:00:00:05)
-l, --label=LABEL The label of the resulting DPNI object associated to the
network interface. Maximum length must be 15 characters.
-n, --no-link The network interface will not be linked to any endpoint
--loopback The network interface will be configured in loopback mode
-o, --options=OPTIONS Comma separated options. Supported values are:
DPNI_OPT_TX_FRM_RELEASE, DPNI_OPT_NO_MAC_FILTER,
DPNI_OPT_HAS_POLICING, DPNI_OPT_SHARED_CONGESTION,
DPNI_OPT_HAS_KEY_MASKING, DPNI_OPT_NO_FS.
...
================================


Best Regards,

Labels (1)
0 Kudos
Reply
1 Reply

1,489 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kazuya Yamauchi,

The option DPNI_OPT_DIST_HASH is used in dpni commands v9, in LSDK 1803 dpni commands v10 is used, please refer to the following. DPNI(commands) version depends on MC version.

static struct option_entry options_map_v9[] = {
        OPTION_MAP_ENTRY(DPNI_OPT_ALLOW_DIST_KEY_PER_TC),
        OPTION_MAP_ENTRY(DPNI_OPT_TX_CONF_DISABLED),
        OPTION_MAP_ENTRY(DPNI_OPT_PRIVATE_TX_CONF_ERROR_DISABLED),
        OPTION_MAP_ENTRY(DPNI_OPT_DIST_HASH),
        OPTION_MAP_ENTRY(DPNI_OPT_DIST_FS),
        OPTION_MAP_ENTRY(DPNI_OPT_UNICAST_FILTER),
        OPTION_MAP_ENTRY(DPNI_OPT_MULTICAST_FILTER),
        OPTION_MAP_ENTRY(DPNI_OPT_VLAN_FILTER),
        OPTION_MAP_ENTRY(DPNI_OPT_IPR),
        OPTION_MAP_ENTRY(DPNI_OPT_IPF),
        OPTION_MAP_ENTRY(DPNI_OPT_VLAN_MANIPULATION),
        OPTION_MAP_ENTRY(DPNI_OPT_QOS_MASK_SUPPORT),
        OPTION_MAP_ENTRY(DPNI_OPT_FS_MASK_SUPPORT),
};

static struct option_entry options_map_v10_0[] = {
        OPTION_MAP_ENTRY(DPNI_OPT_TX_FRM_RELEASE),
        OPTION_MAP_ENTRY(DPNI_OPT_NO_MAC_FILTER),
        OPTION_MAP_ENTRY(DPNI_OPT_HAS_POLICING),
        OPTION_MAP_ENTRY(DPNI_OPT_SHARED_CONGESTION),
        OPTION_MAP_ENTRY(DPNI_OPT_HAS_KEY_MASKING),
        OPTION_MAP_ENTRY(DPNI_OPT_NO_FS),
};

Please refer to the following method to implement your purpose.

root@localhost:~# ls-addni --options=DPNI_OPT_HAS_KEY_MASKING dpmac.1

Created interface: eth0 (object:dpni.1, endpoint: dpmac.1)

root@localhost:~# ifconfig eth0 up

root@localhost:~# ethtool -n eth0 rx-flow-hash udp4

UDP over IPV4 flows use these fields for computing Hash flow key:

L2DA

VLAN tag

L3 proto

IP SA

IP DA

L4 bytes 0 & 1 [TCP/UDP src port]

L4 bytes 2 & 3 [TCP/UDP dst port]

root@localhost:~# ethtool -N eth0 flow-type tcp4 dst-ip 10.10.10.1 action 0

Added rule with ID 63


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply