1 Star 0 Fork 76

chenyi/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0047-ethdev-verify-queue-ID-in-Tx-done-cleanup.patch 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2024-11-11 18:33 . sync some patchs from upstreaming
From 528e7939a75f2eb6416162e5b77a23300dcc820f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <[email protected]>
Date: Sat, 12 Oct 2024 17:14:37 +0800
Subject: [PATCH] ethdev: verify queue ID in Tx done cleanup
[ upstream commit 707f50cef003a89f8fc5170c2ca5aea808cf4297 ]
Verify queue_id for rte_eth_tx_done_cleanup API.
Fixes: 44a718c457b5 ("ethdev: add API to free consumed buffers in Tx ring")
Signed-off-by: Chengwen Feng <[email protected]>
Reviewed-by: Ferruh Yigit <[email protected]>
---
lib/ethdev/rte_ethdev.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index c0398d9..8438f2a 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -2823,6 +2823,12 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
dev = &rte_eth_devices[port_id];
+#ifdef RTE_ETHDEV_DEBUG_TX
+ ret = eth_dev_validate_tx_queue(dev, queue_id);
+ if (ret != 0)
+ return ret;
+#endif
+
if (*dev->dev_ops->tx_done_cleanup == NULL)
return -ENOTSUP;
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenyi211/dpdk.git
[email protected]:chenyi211/dpdk.git
chenyi211
dpdk
dpdk
master

搜索帮助