代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From aa2e11540cf897d2b1051ab33245e8c988618aaa Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Thu, 26 Oct 2023 17:45:56 +0800
Subject: [PATCH] ethdev: fix arp unicast packets cannot be transmitted to
current procotol stack
---
src/lstack/core/lstack_protocol_stack.c | 8 ++++++++
src/lstack/netif/lstack_ethdev.c | 11 ++---------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 0726054..511d2b9 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -837,6 +837,14 @@ void stack_broadcast_arp(struct rte_mbuf *mbuf, struct protocol_stack *cur_stack
return;
}
}
+ ret = dpdk_alloc_pktmbuf(stack->rxtx_pktmbuf_pool, &mbuf_copy, 1);
+ if (ret != 0) {
+ stack->stats.rx_allocmbuf_fail++;
+ return;
+ }
+ copy_mbuf(mbuf_copy, mbuf);
+ kni_handle_tx(mbuf_copy);
+ return;
}
void stack_broadcast_clean_epoll(struct wakeup_poll *wakeup)
diff --git a/src/lstack/netif/lstack_ethdev.c b/src/lstack/netif/lstack_ethdev.c
index 30c3c9a..f2353f8 100644
--- a/src/lstack/netif/lstack_ethdev.c
+++ b/src/lstack/netif/lstack_ethdev.c
@@ -780,15 +780,8 @@ int32_t gazelle_eth_dev_poll(struct protocol_stack *stack, uint8_t use_ltran_fla
struct rte_ether_hdr *ethh = rte_pktmbuf_mtod(stack->pkts[i], struct rte_ether_hdr *);
if (unlikely(RTE_BE16(RTE_ETHER_TYPE_ARP) == ethh->ether_type)) {
stack_broadcast_arp(stack->pkts[i], stack);
-#if DPDK_VERSION_1911
- if (!rte_is_broadcast_ether_addr(ðh->d_addr)) {
-#else /* DPDK_VERSION_1911 */
- if (!rte_is_broadcast_ether_addr(ðh->dst_addr)) {
-#endif /* DPDK_VERSION_1911 */
- // copy arp into other process
- transfer_arp_to_other_process(stack->pkts[i]);
- transfer_type = TRANSFER_KERNEL;
- }
+ /* copy arp into other process */
+ transfer_arp_to_other_process(stack->pkts[i]);
} else {
if (get_global_cfg_params()->tuple_filter && stack->queue_id == 0) {
transfer_type = distribute_pakages(stack->pkts[i]);
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。