10 Star 4 Fork 33

src-openEuler/gazelle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0233-virtio_user-modify-mbuf-index-for-bond4.patch 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
From c7cb61ee76b78908b5a4a544cd04ea15e497cfe9 Mon Sep 17 00:00:00 2001
From: hkk <hankangkang5@huawei.com>
Date: Tue, 30 Jul 2024 21:11:52 +0800
Subject: [PATCH] virtio_user: modify mbuf index for bond4
---
src/lstack/core/lstack_virtio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/lstack_virtio.c b/src/lstack/core/lstack_virtio.c
index f907a99..70b025c 100644
--- a/src/lstack/core/lstack_virtio.c
+++ b/src/lstack/core/lstack_virtio.c
@@ -227,7 +227,7 @@ static int virtio_port_init(uint16_t port)
}
for (uint16_t q = 0; q < tx_queue_num; q++) {
- retval = rte_eth_tx_queue_setup(port, q % mbuf_total_num, VIRTIO_TX_RX_RING_SIZE,
+ retval = rte_eth_tx_queue_setup(port, q, VIRTIO_TX_RX_RING_SIZE,
rte_eth_dev_socket_id(port), NULL);
if (retval < 0) {
LSTACK_LOG(ERR, LSTACK, "rte_eth_tx_queue_setup failed (queue %u) retval=%d \n", q, retval);
@@ -236,7 +236,7 @@ static int virtio_port_init(uint16_t port)
}
for (uint16_t q = 0; q < rx_queue_num; q++) {
- struct rte_mempool *rxtx_mbuf_pool = get_protocol_stack_group()->total_rxtx_pktmbuf_pool[q];
+ struct rte_mempool *rxtx_mbuf_pool = get_protocol_stack_group()->total_rxtx_pktmbuf_pool[q % mbuf_total_num];
retval = rte_eth_rx_queue_setup(port, q, VIRTIO_TX_RX_RING_SIZE, rte_eth_dev_socket_id(port),
NULL, rxtx_mbuf_pool);
if (retval < 0) {
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/gazelle.git
git@gitee.com:src-openeuler/gazelle.git
src-openeuler
gazelle
gazelle
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385