46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
From a9906aabda21b9d2912377352ef0058eb4fb76e0 Mon Sep 17 00:00:00 2001
|
|
From: jiangheng <jiangheng14@huawei.com>
|
|
Date: Mon, 13 Mar 2023 10:00:12 +0800
|
|
Subject: [PATCH] add pbuf lock when aggregate pbuf
|
|
|
|
---
|
|
src/include/lwip/pbuf.h | 3 ++-
|
|
src/include/lwipsock.h | 3 +--
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h
|
|
index 4f5c8ef..50d88af 100644
|
|
--- a/src/include/lwip/pbuf.h
|
|
+++ b/src/include/lwip/pbuf.h
|
|
@@ -230,9 +230,10 @@ struct pbuf {
|
|
u64_t l4_len:8;
|
|
u8_t header_off;
|
|
u8_t rexmit;
|
|
- u8_t in_write;
|
|
+ volatile u8_t allow_in;
|
|
u8_t head;
|
|
struct pbuf *last;
|
|
+ pthread_spinlock_t pbuf_lock;
|
|
#endif /* GAZELLE_ENABLE CHECKSUM_OFFLOAD_SWITCH */
|
|
};
|
|
|
|
diff --git a/src/include/lwipsock.h b/src/include/lwipsock.h
|
|
index 399b701..affb598 100644
|
|
--- a/src/include/lwipsock.h
|
|
+++ b/src/include/lwipsock.h
|
|
@@ -105,11 +105,10 @@ struct lwip_sock {
|
|
|
|
char pad1 __rte_cache_aligned;
|
|
/* app and stack thread all use */
|
|
- uint32_t in_send; /* avoid sock too much send rpc msg*/
|
|
+ uint32_t call_num; /* avoid sock too much send rpc msg*/
|
|
char pad2 __rte_cache_aligned;
|
|
/* stack thread all use */
|
|
struct list_node recv_list;
|
|
- struct list_node send_list;
|
|
struct pbuf *send_lastdata;
|
|
struct pbuf *send_pre_del;
|
|
sem_t snd_ring_sem;
|
|
--
|
|
2.29.0.windows.1
|
|
|