X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Fdatapath.h;h=3a38235f9cc947d0ba5b2e6e50088bf5e1c1ce82;hb=f74055e705bc9735853e11170b42840977279fb4;hp=8e272836e0d05964d280dd57872d784dda623212;hpb=66cd496a30819638c198c614c5502cf6fa116500;p=openvswitch diff --git a/datapath/datapath.h b/datapath/datapath.h index 8e272836..3a38235f 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include "flow.h" @@ -30,7 +31,6 @@ struct dp_port; #define VLAN_PCP_SHIFT 13 #define DP_MAX_PORTS 1024 -#define DP_MAX_GROUPS 16 #define DP_N_QUEUES 3 #define DP_MAX_QUEUE_LEN 100 @@ -53,12 +53,7 @@ struct dp_stats_percpu { u64 n_hit; u64 n_missed; u64 n_lost; -}; - -struct dp_port_group { - struct rcu_head rcu; - int n_ports; - u16 ports[]; + seqcount_t seqlock; }; /** @@ -71,7 +66,6 @@ struct dp_port_group { * @waitqueue: Waitqueue, for waiting for new packets in @queues. * @n_flows: Number of flows currently in flow table. * @table: Current flow table (RCU protected). - * @groups: Port groups, used by ODPAT_OUTPUT_GROUP action (RCU protected). * @n_ports: Number of ports currently in @ports. * @ports: Map from port number to &struct dp_port. %ODPP_LOCAL port * always exists, other ports may be %NULL. @@ -95,9 +89,6 @@ struct datapath { /* Flow table. */ struct tbl *table; - /* Port groups. */ - struct dp_port_group *groups[DP_MAX_GROUPS]; - /* Switch ports. */ unsigned int n_ports; struct dp_port *ports[DP_MAX_PORTS]; @@ -144,6 +135,7 @@ enum csum_type { /** * struct ovs_skb_cb - OVS data in skb CB * @dp_port: The datapath port on which the skb entered the switch. + * @flow: The flow associated with this packet. May be %NULL if no flow. * @ip_summed: Consistently stores L4 checksumming status across different * kernel versions. * @tun_id: ID (in network byte order) of the tunnel that encapsulated this @@ -151,6 +143,7 @@ enum csum_type { */ struct ovs_skb_cb { struct dp_port *dp_port; + struct sw_flow *flow; enum csum_type ip_summed; __be32 tun_id; };