diff --git a/datapath/flow.c b/datapath/flow.c index 5823e81..72008b4 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -271,8 +271,6 @@ void flow_setup_actions(struct sw_flow * flow, flow->used = flow->created = get_jiffies_64(); flow->byte_count = 0; flow->packet_count = 0; - flow->tcp_flags = 0; - flow->ip_tos = 0; spin_lock_init(&flow->lock); /* Make sure we don't blow the allocation done earlier */ diff --git a/datapath/flow.h b/datapath/flow.h index 4b1cded..7189b47 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -110,9 +110,6 @@ struct sw_flow { uint64_t packet_count; /* Number of packets associated with this entry */ uint64_t byte_count; /* Number of bytes associated with this entry */ - uint8_t tcp_flags; /* Union of seen TCP flags. */ - uint8_t ip_tos; /* IP TOS value. */ - struct rcu_head rcu; }; @@ -185,16 +182,6 @@ static inline void flow_used(struct sw_flow *flow, struct sk_buff *skb) flow->used = get_jiffies_64(); spin_lock_irqsave(&flow->lock, flags); - if (flow->key.dl_type == htons(ETH_P_IP) && iphdr_ok(skb)) { - struct iphdr *nh = ip_hdr(skb); - flow->ip_tos = nh->tos; - - if (flow->key.nw_proto == IPPROTO_TCP && tcphdr_ok(skb)) { - uint8_t *tcp = (uint8_t *)tcp_hdr(skb); - flow->tcp_flags |= *(tcp + TCP_FLAGS_OFFSET) & TCP_FLAG_MASK; - } - } - flow->packet_count++; flow->byte_count += skb->len; spin_unlock_irqrestore(&flow->lock, flags); diff --git a/udatapath/switch-flow.c b/udatapath/switch-flow.c index 2651580..d4841ee 100644 --- a/udatapath/switch-flow.c +++ b/udatapath/switch-flow.c @@ -191,8 +191,6 @@ flow_setup_actions(struct sw_flow * flow, flow->sf_acts->actions_len = actions_len; flow->byte_count = 0; flow->packet_count = 0; - flow->tcp_flags = 0; - flow->ip_tos = 0; memcpy(flow->sf_acts->actions, actions, actions_len); } @@ -302,16 +300,6 @@ void flow_used(struct sw_flow *flow, struct ofpbuf *buffer) { flow->used = time_msec(); - if (flow->key.flow.dl_type == htons(ETH_TYPE_IP)) { - struct ip_header *nh = buffer->l3; - flow->ip_tos = nh->ip_tos; - - if (flow->key.flow.nw_proto == IP_TYPE_TCP) { - struct tcp_header *th = buffer->l4; - flow->tcp_flags |= TCP_FLAGS(th->tcp_ctl); - } - } - flow->packet_count++; flow->byte_count += buffer->size; } diff --git a/udatapath/switch-flow.h b/udatapath/switch-flow.h index e7c0e27..049b6e9 100644 --- a/udatapath/switch-flow.h +++ b/udatapath/switch-flow.h @@ -68,9 +68,6 @@ struct sw_flow { uint8_t send_flow_rem; /* Send a flow removed to the controller */ uint8_t emerg_flow; /* Emergency flow indicator */ - uint8_t tcp_flags; /* Union of seen TCP flags. */ - uint8_t ip_tos; /* IP TOS value. */ - struct sw_flow_actions *sf_acts; /* Private to table implementations. */