1 Star 0 Fork 32

孙苏皖/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0093-remove-get_reg_ring_free_count.patch 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
吴昌盛 提交于 2022-10-08 22:27 +08:00 . adapt ceph client
From b2cb29c59dcfbeb2652d57e5f6484c5e1239dd94 Mon Sep 17 00:00:00 2001
From: compile_success <[email protected]>
Date: Wed, 21 Sep 2022 11:56:18 +0000
Subject: [PATCH 09/21] remove get_reg_ring_free_count
---
src/lstack/netif/lstack_vdev.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/lstack/netif/lstack_vdev.c b/src/lstack/netif/lstack_vdev.c
index 31c1843..f9fa5a3 100644
--- a/src/lstack/netif/lstack_vdev.c
+++ b/src/lstack/netif/lstack_vdev.c
@@ -99,11 +99,6 @@ static uint32_t vdev_tx_xmit(struct protocol_stack *stack, struct rte_mbuf **pkt
return sent_pkts;
}
-static inline uint32_t get_reg_ring_free_count(const struct rte_ring *reg_ring)
-{
- return (reg_ring->capacity + reg_ring->cons.tail - reg_ring->cons.head);
-}
-
int32_t vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple)
{
if (!use_ltran()) {
@@ -132,7 +127,7 @@ int32_t vdev_reg_xmit(enum reg_ring_type type, struct gazelle_quintuple *qtuple)
do {
(void)gazelle_ring_sc_dequeue(stack->reg_ring, free_buf, VDEV_REG_QUEUE_SZ);
- if (get_reg_ring_free_count(stack->reg_ring) == 0) {
+ if (gazelle_ring_free_count(stack->reg_ring) == 0) {
continue;
}
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sunsuwan/gazelle_1.git
[email protected]:sunsuwan/gazelle_1.git
sunsuwan
gazelle_1
gazelle_1
master

搜索帮助