forked from DPDK/dpdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Hinic3 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shemminger
wants to merge
18
commits into
main
Choose a base branch
from
hinic3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Hinic3 #2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch adds some basic files to describe the hinic3 driver. Signed-off-by: Feifei Wang <wangfeifei40@huawei.com> Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com>
Add HW registers definition header file for SP series NIC. Add some headers that define commands and basic defines for use in the code. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
This patch adds some HW interfaces for bar operatioin interfaces, including: mapped bar address geeting, HW attributes getting, msi-x reg operation, function type getting and so on. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Micocode is named ucode in SP series NIC. Its main responsibility is data transmission and reception. But it can also handle some administration works. It uses cmdq mechanism. This patch introduces data structures, initialization, interfaces, and commands sending functions of cmdq. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Currently, there are two types of events: pf/vf connection status and port information printing. This patch contains related data structures and function codes. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Eqs include aeq and ceq. Aeq is a kind of queue for mgmt asynchronous message and mgmt command response message. This patch introduces data structures, initialization, and related interfaces about aeq. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Mgmt module is a kind of administration module for the chip. It is responsible for handling administration command from host. It mainly uses aeq to implement. This patch adds related data structures, packaged interfaces and function codes. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Add code and data structure for hardware operation, including configuration, query, initialization and release. Signed-off-by: Yi Chen <chenyi221@huawei.com> Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
The items of configurations and queries for NIC business include MAC, VLAN, MTU, RSS and so on. These configurations and queries are handled by mgmt module. This patch introduces related data structures and function codes. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
Work queue is used for cmdq and tx/rx buff description. Nic business needs to configure cmdq context and txq/rxq context. This patch adds data structures and function codes for work queue and context. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
This patch adds support for mailbox of hinic3 PMD driver, mailbox is used for communication between PF/VF driver and MPU. This patch provides mailbox-related data structures and functional code. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
This patch contains data structures and function codes related to device initialization. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Add ops related function codes. Signed-off-by: Feifei Wang <wangfeifei40@huawei.com> Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
This patch add package sending and receiving function codes. Signed-off-by: Feifei Wang <wangfeifei40@huawei.com> Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com>
Add man-machine language support and implements the get eeprom method. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Add RSS and promiscuous ops related function codes. Signed-off-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com> Reviewed-by: Yi Chen <chenyi221@huawei.com>
Added support for rte_flow, including ethertype, IPv4, IPv6, and tunnel VXLAN. In addition, user can add or delete filters. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
The meson.build file is added to this patch to enable the hinic3 compilation function. Signed-off-by: Yi Chen <chenyi221@huawei.com> Reviewed-by: Xin Wang <wangxin679@h-partners.com> Reviewed-by: Feifei Wang <wangfeifei40@huawei.com>
shemminger
pushed a commit
that referenced
this pull request
Oct 20, 2025
For '.' and '..' directories (or any short file name),
a out of bound issue occurs.
Caught by UBSan:
EAL: Detected shared linkage of DPDK
../lib/eal/common/eal_common_options.c:420:15: runtime error: index -2
out of bounds for type 'char[256]'
#0 0x7f867eedf206 in eal_plugindir_init
eal_common_options.c
#1 0x7f867eede58a in eal_plugins_init
(build/lib/librte_eal.so.25+0xde58a)
(BuildId: e7e4a1935e4bacb51c82ab1a84098a27decf3b4c)
#2 0x7f867efb8587 in rte_eal_init
(build/lib/librte_eal.so.25+0x1b8587)
(BuildId: e7e4a1935e4bacb51c82ab1a84098a27decf3b4c)
DPDK#3 0x55b62360861e in main
(/home/runner/work/dpdk/dpdk/build/app/dpdk-testpmd+0x9e061e)
(BuildId: d821ec918612c83fad8b5ccb6cc518e66bee48cd)
DPDK#4 0x7f8667429d8f in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
DPDK#5 0x7f8667429e3f in __libc_start_main
csu/../csu/libc-start.c:392:3
DPDK#6 0x55b622d9d444 in _start
(/home/runner/work/dpdk/dpdk/build/app/dpdk-testpmd+0x175444)
(BuildId: d821ec918612c83fad8b5ccb6cc518e66bee48cd)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../lib/eal/common/eal_common_options.c:420:15 in
../lib/eal/common/eal_common_options.c:421:15:
runtime error: index 18446744073709551609 out of bounds
for type 'char[256]'
Fixes: c57f6e5 ("eal: fix plugin loading")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
shemminger
pushed a commit
that referenced
this pull request
Dec 2, 2025
After creating at least one graph and calling rte_node_edge_update to
add a new edge on a node which is in use in the graph, the node memory
is reallocated but the active graph still has a pointer to the freed
memory.
When destroying the graph, it causes a use-after-free error detected by
libasan:
ERROR: AddressSanitizer: heap-use-after-free
READ of size 8 at 0x7c4baa5e4da8 thread T0
#0 0x0000005ad224 in graph_node_fini lib/graph/graph.c:256
#1 0x0000005ae657 in rte_graph_destroy lib/graph/graph.c:504
...
freed by thread T0 here:
#0 0x7f1bac4e5e4b in realloc.part.0 (/lib64/libasan.so.8+0xe5e4b)
#1 0x0000005ab6d7 in edge_update lib/graph/node.c:271
#2 0x0000005abb1b in rte_node_edge_update lib/graph/node.c:339
...
previously allocated by thread T0 here:
#0 0x7f1bac4e5e4b in realloc.part.0 (/lib64/libasan.so.8+0xe5e4b)
#1 0x0000005ab6d7 in edge_update lib/graph/node.c:271
#2 0x0000005abb1b in rte_node_edge_update lib/graph/node.c:339
...
Use malloc+memcpy and add an internal function to replace all references
to the old node memory before freeing it.
Fixes: c59dac2 ("graph: implement node operations")
Cc: stable@dpdk.org
Signed-off-by: Robin Jarry <rjarry@redhat.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.