Thanks for the review :-)

Pushed to master,

  Jarno

On Mar 21, 2014, at 2:41 PM, Pravin Shelar <pshe...@nicira.com> wrote:

> On Fri, Feb 21, 2014 at 11:41 AM, Jarno Rajahalme <jrajaha...@nicira.com> 
> wrote:
>> We already extract the TCP flags for the key, might as well use that
>> for stats.
>> 
>> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
> Looks good.
> Acked-by: Pravin B Shelar <pshe...@nicira.com>
> 
>> ---
>> datapath/flow.c |   12 +++++-------
>> 1 file changed, 5 insertions(+), 7 deletions(-)
>> 
>> diff --git a/datapath/flow.c b/datapath/flow.c
>> index c3e3fcb..3cc4cdf 100644
>> --- a/datapath/flow.c
>> +++ b/datapath/flow.c
>> @@ -70,14 +70,12 @@ void ovs_flow_stats_update(struct sw_flow *flow, struct 
>> sk_buff *skb)
>> 
>>        stats = rcu_dereference(flow->stats[node]);
>> 
>> -       if ((flow->key.eth.type == htons(ETH_P_IP) ||
>> -            flow->key.eth.type == htons(ETH_P_IPV6)) &&
>> -           flow->key.ip.frag != OVS_FRAG_TYPE_LATER &&
>> -           flow->key.ip.proto == IPPROTO_TCP &&
>> -           likely(skb->len >= skb_transport_offset(skb) + sizeof(struct 
>> tcphdr))) {
>> -               tcp_flags = TCP_FLAGS_BE16(tcp_hdr(skb));
>> +       if (likely(flow->key.ip.proto == IPPROTO_TCP)) {
>> +               if (likely(flow->key.eth.type == htons(ETH_P_IP)))
>> +                       tcp_flags = flow->key.ipv4.tp.flags;
>> +               else if (likely(flow->key.eth.type == htons(ETH_P_IPV6)))
>> +                       tcp_flags = flow->key.ipv6.tp.flags;
>>        }
>> -
>>        /* Check if already have node-specific stats. */
>>        if (likely(stats)) {
>>                spin_lock(&stats->lock);
>> --
>> 1.7.10.4
>> 
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to