Remove tcp_flags/ip_tos tracking used by NetFlow
This commit is contained in:
1 parent
17af341ffe
commit
f492a9d519
4 files changed
-30
No files matched your search
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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. */
|
||||
|
||||
Reference in new issue
Block a user