summaryrefslogtreecommitdiff
path: root/src/dealpkt/plug_support.c
diff options
context:
space:
mode:
author杨威 <[email protected]>2023-05-16 18:10:41 +0800
committer杨威 <[email protected]>2023-05-16 18:10:41 +0800
commitd6ac425f0d869f9fe8c759bdffeec1b836c6244a (patch)
tree6a87048a9f1615dd6e9fe4fcfd37fd336e2ff277 /src/dealpkt/plug_support.c
parent4484476a644de405d02bba3d212e23e1b4b39f90 (diff)
🐞 fix(marsio ctrlzone): 移除跟marsio ctrlzone相关操作,不再考虑mrtunnat
禁用l2_l3_tunnel_support,恒为1
Diffstat (limited to 'src/dealpkt/plug_support.c')
-rw-r--r--src/dealpkt/plug_support.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/dealpkt/plug_support.c b/src/dealpkt/plug_support.c
index 83f74a9..4e3cf4d 100644
--- a/src/dealpkt/plug_support.c
+++ b/src/dealpkt/plug_support.c
@@ -232,94 +232,18 @@ int get_opt_from_rawpkt(const void *voidpkt, int type, void *void_value)
/* ���ڲ����ȡ��ײ���ʵmac��ַ, ����ʲôģʽ, ��û��mrtunnat, ������һ���ӿ� */
case RAW_PKT_GET_ORIGINAL_LOWEST_ETH_SMAC: {
const struct mesa_ethernet_hdr *lowest_ehdr;
-
- if (0 == sapp_global_val->config.packet_io.packet_io_tunnel.l2_l3_tunnel_support)
- { // with mrtunnat
- if (DEPOLYMENT_MODE_INLINE == sapp_global_val->config.packet_io.depolyment_mode_bin)
- {
- if (CAP_MODEL_MARSIOV4 == g_packet_io_cap_mode)
- {
- const struct mr_tunnat_ctrlzone *mr_ctrlzone =
- (const struct mr_tunnat_ctrlzone *)ptr_marsio_buff_ctrlzone(
- (marsio_buff_t *)rawpkt->io_lib_pkt_reference, 0); /* index */
- if (0 == (mr_ctrlzone->action & TUNNAT_CZ_ACTION_FORWARD))
- { /* ��vxlan��, �϶�û����Щѡ�� */
- ret = -1;
- }
- else
- {
- memcpy(void_value, mr_ctrlzone->g_device_mac, ETH_ALEN);
- ret = ETH_ALEN;
- }
- }
- else
- {
- sapp_runtime_log(
- RLOG_LV_FATAL,
- "can't support option 'RAW_PKT_GET_ORIGINAL_LOWEST_ETH_SMAC' in no marsio inline mode!");
- ret = -1;
- }
- }
- else
- {
- lowest_ehdr = (struct mesa_ethernet_hdr *)rawpkt->raw_pkt_data;
- memcpy(void_value, lowest_ehdr->ether_shost, ETH_ALEN);
- ret = ETH_ALEN;
- }
- }
- else
- { // from v4.2, without mrtunnat
lowest_ehdr = (struct mesa_ethernet_hdr *)rawpkt->raw_pkt_data;
memcpy(void_value, lowest_ehdr->ether_shost, ETH_ALEN);
ret = ETH_ALEN;
- }
}
break;
/* ���ڲ����ȡ��ײ���ʵmac��ַ, ����ʲôģʽ, ��û��mrtunnat, ������һ���ӿ� */
case RAW_PKT_GET_ORIGINAL_LOWEST_ETH_DMAC: {
const struct mesa_ethernet_hdr *lowest_ehdr;
-
- if (0 == sapp_global_val->config.packet_io.packet_io_tunnel.l2_l3_tunnel_support)
- { // with mrtunnat
- if (DEPOLYMENT_MODE_INLINE == sapp_global_val->config.packet_io.depolyment_mode_bin)
- {
- if (CAP_MODEL_MARSIOV4 == g_packet_io_cap_mode)
- {
- const struct mr_tunnat_ctrlzone *mr_ctrlzone =
- (const struct mr_tunnat_ctrlzone *)ptr_marsio_buff_ctrlzone(
- (marsio_buff_t *)rawpkt->io_lib_pkt_reference, 0); /* index */
- if (0 == (mr_ctrlzone->action & TUNNAT_CZ_ACTION_FORWARD))
- { /* ��vxlan��, �϶�û����Щѡ�� */
- ret = -1;
- }
- else
- {
- memcpy(void_value, mr_ctrlzone->l_device_mac, ETH_ALEN);
- ret = ETH_ALEN;
- }
- }
- else
- {
- sapp_runtime_log(
- RLOG_LV_FATAL,
- "can't support option 'RAW_PKT_GET_ORIGINAL_LOWEST_ETH_SMAC' in no marsio inline mode!");
- ret = -1;
- }
- }
- else
- {
- lowest_ehdr = (struct mesa_ethernet_hdr *)rawpkt->raw_pkt_data;
- memcpy(void_value, lowest_ehdr->ether_dhost, ETH_ALEN);
- ret = ETH_ALEN;
- }
- }
- else
- { // from v4.2, without mrtunnat
lowest_ehdr = (struct mesa_ethernet_hdr *)rawpkt->raw_pkt_data;
memcpy(void_value, lowest_ehdr->ether_dhost, ETH_ALEN);
ret = ETH_ALEN;
- }
}
break;