diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/private/sapp_global_val.h | 3 | ||||
| -rw-r--r-- | include/private/sapp_pkt_stat.h | 4 | ||||
| -rw-r--r-- | include/private/stream_internal.h | 4 | ||||
| -rw-r--r-- | include/public/stream_inc/stream_control.h | 16 |
4 files changed, 20 insertions, 7 deletions
diff --git a/include/private/sapp_global_val.h b/include/private/sapp_global_val.h index 46c8899..ee64e2d 100644 --- a/include/private/sapp_global_val.h +++ b/include/private/sapp_global_val.h @@ -159,6 +159,7 @@ typedef struct{ char pcap_dumpfile_name[NAME_MAX]; int polling_enabled; int polling_priority; /* call sapp_recv_pkt every call polling_entry times, ���ö��ٴ�polling�����һ��recv pkt, 1��ʾ�������ȼ���ͬ */ + int inbound_route_dir; /* ��ʾ�뾳, I2C�����ֵ��0����1 */ }sapp_config_packet_io_t; typedef struct{ @@ -219,7 +220,7 @@ typedef struct{ typedef struct{ sapp_gval_mthread_sys_stat_t sys_stat; unsigned short stream_seq_per_thread; - char __padding[28]; + char __padding[12]; }sapp_gval_mthread_t; /* for multi-thread, must 64byte alignment */ diff --git a/include/private/sapp_pkt_stat.h b/include/private/sapp_pkt_stat.h index f9e3f3c..a7feda7 100644 --- a/include/private/sapp_pkt_stat.h +++ b/include/private/sapp_pkt_stat.h @@ -21,7 +21,9 @@ typedef enum __sapp_sys_stat_type{ /************* send packet *******************/ - SAPP_STAT_ETH_EGRESS, /* ����ģʽ�µĻ�������, �����Ϻ�SAPP_STAT_RCV_ETHERNET���, �����в������DROPPKT */ + + SAPP_STAT_ETH_INBOUND, /* ����ģʽ��, �ǵ�ǰ������I/O����, ��������ڵ�ǰ�豸��������λ��, ���뾳�������� */ + SAPP_STAT_ETH_OUTBOUND, /* ����ģʽ��, �ǵ�ǰ������I/O����, ��������ڵ�ǰ�豸��������λ��, ���뾳�������� */ SAPP_STAT_SND_ETHERNET, /* ����������͵�����, ������������������ */ SAPP_STAT_SND_IPV4, diff --git a/include/private/stream_internal.h b/include/private/stream_internal.h index 09acc80..fceb2d5 100644 --- a/include/private/stream_internal.h +++ b/include/private/stream_internal.h @@ -69,6 +69,7 @@ typedef struct { const void *raw_pkt_data; /* ���ϲ�Ӧ�ÿ���ԭʼ��ͷָ��, �п���������Ethernet��, ����low_layer_type�ж�Э������ */ struct timeval raw_pkt_ts; /* ԭʼ������ʱ���, ���ȫΪ0��֧�ִ˹���(��pagģʽ) */ const void *io_lib_pkt_reference; /* ���õײ�I/O���ԭʼ�������ṹ, ����:����marsio��˵, ���ײ��mbuf�ṹ */ + int route_dir; }raw_pkt_t; @@ -132,7 +133,8 @@ struct streaminfo_private /* ---8 bytes-- */ UCHAR layer_dir:2; /* ������Ч, ��ǰ��ĵ�ַ�Ƿ��Ĭ�Ϲ���"��˿��ǿͻ���"��ͬ */ - UCHAR stream_dir:2; /* ��������������Ч, ���Ĵ洢�ĵ�ַ�Ƿ��Ĭ�Ϲ���"��˿��ǿͻ���"��ͬ */ + UCHAR stream_dir:1; /* ��������������Ч, ���Ĵ洢�ĵ�ַ�Ƿ��Ĭ�Ϲ���"��˿��ǿͻ���"��ͬ */ + UCHAR stream_c2s_route_dir:1; /* c2s����İ�, ��Ӧ����·route dir����, ���ڻ�ȡinbound, outbound���� */ UCHAR addr_use_as_hash:1; /* �����addr�Ƿ���ΪHASH����ͱȽϵIJ���, ��:MAC��ַ��������� */ UCHAR addr_skip_for_layer_cmp:1;/*�����addr�Ƿ���Ϊ��ַ�ȽϵIJ㼶���磺MPLS��ַ����Ϊ�������㣬ֱ����������ֵĬ��Ϊ0������Ҫ�Ƚ�*/ UCHAR need_update_opposite_addr:1;/*�����addr�Ƿ��ڶԲ�����ʱ���£��磺MPLS��ǩ�ǶԳ�ʱ��Ҫ��S2C���һ������¼�����ǩ,��ֵĬ��Ϊ0��������Ҫ����*/ diff --git a/include/public/stream_inc/stream_control.h b/include/public/stream_inc/stream_control.h index d039d74..5f6b4c4 100644 --- a/include/public/stream_inc/stream_control.h +++ b/include/public/stream_inc/stream_control.h @@ -5,7 +5,7 @@ extern "C" {
#endif
-#define STREAM_CONTROL_H_VERSION (20191218)
+#define STREAM_CONTROL_H_VERSION (20191226)
#define TCP_CTEAT_LINK_BYSYN 0x01 /* for MESA_stream_opt->MSO_TCP_CREATE_LINK_MODE */
#define TCP_CTEAT_LINK_BYDATA 0x02 /* for MESA_stream_opt->MSO_TCP_CREATE_LINK_MODE */
@@ -34,6 +34,10 @@ enum MESA_stream_opt{ MSO_GLOBAL_STREAM_ID, /* opt_val type must be unsigned long long, is value-result argument, IN: device_id, value range[0, 4095]; OUT:global stream id */
MSO_DROP_STREAM, /* opt_val type must be int, value only be [0,1]; similar to DROPPKT, but effective scope is stream. */
MSO_TCP_RST_REMEDY, /* opt_val type must be int, value only be [0,1]; if not set this, default is disable. */
+ MSO_TOTAL_INBOUND_PKT, /* opt_val type must be unsigned long long */
+ MSO_TOTAL_INBOUND_BYTE, /* opt_val type must be unsigned long long */
+ MSO_TOTAL_OUTBOUND_PKT, /* opt_val type must be unsigned long long */
+ MSO_TOTAL_OUTBOUND_BYTE,/* opt_val type must be unsigned long long */
__MSO_MAX,
};
@@ -64,11 +68,15 @@ enum sapp_platform_opt{ SPO_FIELD_STAT_HANDLE, /* field stat output handle, opt_val type must be void * */
SPO_INDEPENDENT_THREAD_ID, /* plug independent thread which is created by pthread_create(), opt_val type must be int */
SPO_DEPLOYMENT_MODE_STR, /* opt_val type is char[], optional value is:["mirror", "inline", "transparent"] */
- SPO_TOTAL_EGRESS_PKT, /* total egress packet number, effective in inline or transparent mode, opt_val type must be unsigned long long */
- SPO_TOTAL_EGRESS_BYTE, /* total egress packet byte, effective in inline or transparent mode, opt_val type must be unsigned long long */
+ //SPO_TOTAL_EGRESS_PKT, /* total egress packet number, effective in inline or transparent mode, opt_val type must be unsigned long long */
+ //SPO_TOTAL_EGRESS_BYTE, /* total egress packet byte, effective in inline or transparent mode, opt_val type must be unsigned long long */
SPO_TCP_STREAM_NEW, /* total created tcp streams from start, opt_val type must be unsigned long long */
SPO_TCP_STREAM_CLOSE, /* total closed tcp streams from start, opt_val type must be unsigned long long */
- SPO_TCP_STREAM_LIVE, /* realtime established tcp streams, opt_val type must be unsigned long long */
+ SPO_TCP_STREAM_ESTAB, /* realtime established tcp streams, opt_val type must be unsigned long long */
+ SPO_TOTAL_INBOUND_PKT, /* total inbound packet number, opt_val type must be unsigned long long */
+ SPO_TOTAL_INBOUND_BYTE, /* total inbound packet bytes, opt_val type must be unsigned long long */
+ SPO_TOTAL_OUTBOUND_PKT, /* total outbound packet number, opt_val type must be unsigned long long */
+ SPO_TOTAL_OUTBOUND_BYTE, /* total outbound packet bytes, opt_val type must be unsigned long long */
};
|
