1 Star 0 Fork 32

misaka00251/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0044-delete-redundant-file.patch 5.67 KB
一键复制 编辑 原始数据 按行查看 历史
jinag12 提交于 2022-07-07 21:58 . backport upstream patches:
From f3059a5a1e2fcf5b7bfa2ad50865598f79eccf16 Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Thu, 21 Apr 2022 15:24:20 +0800
Subject: [PATCH 05/18] delete redundant file
---
src/lstack/include/lstack_lstack.h | 32 --------
src/lstack/include/lstack_weakup.h | 124 -----------------------------
2 files changed, 156 deletions(-)
delete mode 100644 src/lstack/include/lstack_lstack.h
delete mode 100644 src/lstack/include/lstack_weakup.h
diff --git a/src/lstack/include/lstack_lstack.h b/src/lstack/include/lstack_lstack.h
deleted file mode 100644
index c2e6733..0000000
--- a/src/lstack/include/lstack_lstack.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
-* gazelle is licensed under the Mulan PSL v2.
-* You can use this software according to the terms and conditions of the Mulan PSL v2.
-* You may obtain a copy of Mulan PSL v2 at:
-* http://license.coscl.org.cn/MulanPSL2
-* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
-* PURPOSE.
-* See the Mulan PSL v2 for more details.
-*/
-
-#ifndef _LSTACK_H
-#define _LSTACK_H
-
-#if defined __GNUC__
-#define LSTACK_EXPORT_SYMBOL __attribute__((visibility("default")))
-
-#elif defined(_MSC_VER)
-#define LSTACK_EXPORT_SYMBOL extern __declspec(dllexport)
-
-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
-#define LSTACK_EXPORT_SYMBOL __global
-
-#else
-#define LSTACK_EXPORT_SYMBOL /* unknown compiler */
-#endif
-
-/* Return string describing version of currently running lstack. */
-LSTACK_EXPORT_SYMBOL const char *get_lstack_version(void);
-
-#endif /* lstack.h */
diff --git a/src/lstack/include/lstack_weakup.h b/src/lstack/include/lstack_weakup.h
deleted file mode 100644
index 77f3b9d..0000000
--- a/src/lstack/include/lstack_weakup.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
-* gazelle is licensed under the Mulan PSL v2.
-* You can use this software according to the terms and conditions of the Mulan PSL v2.
-* You may obtain a copy of Mulan PSL v2 at:
-* http://license.coscl.org.cn/MulanPSL2
-* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
-* PURPOSE.
-* See the Mulan PSL v2 for more details.
-*/
-
-#ifndef __GAZELLE_WEAKUP_THREAD_H__
-#define __GAZELLE_WEAKUP_THREAD_H__
-
-#include <rte_ring.h>
-#include "lstack_dpdk.h"
-
-#define EPOLL_MAX_EVENTS 512
-
-struct weakup_poll {
- sem_t event_sem;
- struct lwip_sock *sock_list[EPOLL_MAX_EVENTS];
- struct rte_ring *event_ring;
- struct rte_ring *self_ring;
-};
-
-#define WEAKUP_MAX (32)
-
-static inline void wakeup_list_sock(struct list_node *wakeup_list)
-{
- struct list_node *node, *temp;
-
- list_for_each_safe(node, temp, wakeup_list) {
- struct lwip_sock *sock = container_of(node, struct lwip_sock, wakeup_list);
-
- struct weakup_poll *weakup = sock->weakup;
- struct protocol_stack *stack = sock->stack;
- if (weakup == NULL || stack == NULL) {
- list_del_node_init(&sock->wakeup_list);
- continue;
- }
-
- int32_t ret = rte_ring_mp_enqueue(weakup->event_ring, (void *)sock);
- if (ret == 0) {
- list_del_node_init(&sock->wakeup_list);
- sem_post(&weakup->event_sem);
- stack->stats.lwip_events++;
- } else {
- break;
- }
- }
-}
-
-static inline int32_t weakup_attach_sock(struct list_node *attach_list)
-{
- struct list_node *node, *temp;
- int32_t wakeuped = -1;
-
- list_for_each_safe(node, temp, attach_list) {
- struct lwip_sock *sock = container_of(node, struct lwip_sock, attach_list);
-
- struct weakup_poll *weakup = sock->weakup;
- struct protocol_stack *stack = sock->stack;
- if (weakup == NULL || stack == NULL) {
- continue;
- }
-
- int32_t ret = rte_ring_mp_enqueue(weakup->event_ring, (void *)sock);
- if (ret == 0) {
- sem_post(&weakup->event_sem);
- stack->stats.lwip_events++;
- wakeuped = 0;
- }
- }
-
- return wakeuped;
-}
-
-static inline void weakup_thread(struct rte_ring *weakup_ring, struct list_node *wakeup_list)
-{
- struct lwip_sock *sock;
-
- for (uint32_t i = 0; i < WEAKUP_MAX; ++i) {
- int32_t ret = rte_ring_sc_dequeue(weakup_ring, (void **)&sock);
- if (ret != 0) {
- break;
- }
-
- struct weakup_poll *weakup = sock->weakup;
- struct protocol_stack *stack = sock->stack;
- if (weakup == NULL || stack == NULL) {
- continue;
- }
-
- ret = rte_ring_mp_enqueue(weakup->event_ring, (void *)sock);
- if (ret == 0) {
- sem_post(&weakup->event_sem);
- stack->stats.lwip_events++;
- }
-
- /* listen notice attach sock */
- int32_t wakeuped = -1;
- if (!list_is_empty(&sock->attach_list)) {
- wakeuped = weakup_attach_sock(&sock->attach_list);
- }
-
- /* notice any epoll enough */
- if (ret != 0 && wakeuped != 0) {
- if (list_is_empty(&sock->wakeup_list)) {
- list_add_node(wakeup_list, &sock->wakeup_list);
- }
- break;
- }
- }
-}
-
-static inline __attribute__((always_inline))
-int weakup_enqueue(struct rte_ring *weakup_ring, struct lwip_sock *sock)
-{
- return rte_ring_sp_enqueue(weakup_ring, (void *)sock);
-}
-
-#endif
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/misaka00251/gazelle.git
git@gitee.com:misaka00251/gazelle.git
misaka00251
gazelle
gazelle
master

搜索帮助