分析这个结构体具体分析这个结构体 具体解释这个结构体 struct dp_netdev_flow { const struct flow flow; /* Unmasked flow that created this entry. */ /* Hash table index by unmasked flow. */ const struct cmap_node node; /* In owning dp_netdev_pmd_thread's */ /* 'flow_table'. */ const struct cmap_node mark_node; /* In owning flow_mark's mark_to_flow */ const ovs_u128 ufid; /* Unique flow identifier. */ const ovs_u128 mega_ufid; /* Unique mega flow identifier. */ const unsigned pmd_id; /* The 'core_id' of pmd thread owning this */ /* flow. */ /* Number of references. * The classifier owns one reference. * Any thread trying to keep a rule from being freed should hold its own * reference. */ struct ovs_refcount ref_cnt; bool dead; uint32_t mark; /* Unique flow mark assigned to a flow */ /* Statistics. */ struct dp_netdev_flow_stats stats; /* Statistics and attributes received from the netdev offload provider. */ atomic_int netdev_flow_get_result; struct dp_netdev_flow_stats last_stats; struct dp_netdev_flow_attrs last_attrs; /* Actions. */ OVSRCU_TYPE(struct dp_netdev_actions *) actions; /* While processing a group of input packets, the datapath uses the next * member to store a pointer to the output batch for the flow. It is * reset after the batch has been sent out (See dp_netdev_queue_batches(), * packet_batch_per_flow_init() and packet_batch_per_flow_execute()). */ struct packet_batch_per_flow *batch; /* Packet classification. */ char *dp_extra_info; /* String to return in a flow dump/get. */ struct dpcls_rule cr; /* In owning dp_netdev's 'cls'. */ /* 'cr' must be the last member. */ };
时间: 2024-04-27 09:21:22 浏览: 127
PIC-struct.rar_pic struct_pic的struct_单片机结构体
这个结构体是一个用于网络设备流表项的结构体,其定义了一个叫做 dp_netdev_flow 的结构体类型。这个结构体包含了多个成员变量,其中包括了一个叫做 flow 的结构体成员,代表创建该流表项时未遮罩的流信息。同时,这个结构体还包含了一个叫做 node 的成员变量,作为哈希表的索引。此外,ufid 和 mega_ufid 是唯一的流标识符,pmd_id 是拥有该流的 pmd 线程的 core_id。在结构体中还定义了 ref_cnt,用于管理引用计数,mark 表示唯一的流标记,stats 表示流的统计信息,actions 表示可以执行的操作,batch 用于存储输出批量的指针,dp_extra_info 是一个用于流 dump/get 的字符串,cr 是一个 dpcls_rule 结构体,用于存储分类规则。
阅读全文