[prev in list] [next in list] [prev in thread] [next in thread]
List: openvswitch-dev
Subject: [ovs-dev] [loops 1/6] datapath: Don't track IP TOS value two different ways.
From: blp () nicira ! com (Ben Pfaff)
Date: 2010-07-27 17:02:32
Message-ID: 20100727170232.GA8777 () nicira ! com
[Download RAW message or body]
On Mon, Jul 26, 2010 at 04:37:01PM -0700, Jesse Gross wrote:
> On Fri, Jul 23, 2010 at 4:44 PM, Ben Pfaff <blp at nicira.com> wrote:
> > + if (flow->key.dl_type == htons(ETH_P_IP) && iphdr_ok(skb) &&
> > + flow->key.nw_proto == IPPROTO_TCP && tcphdr_ok(skb)) {
> > + u8 *tcp = (u8 *)tcp_hdr(skb);
> > + tcp_flags = *(tcp + TCP_FLAGS_OFFSET) & TCP_FLAG_MASK;
> >
>
> I think we can remove the iphdr_ok() and tcphdr_ok() here. When we create
> the flow key we won't set the protocol types if their corresponding headers
> aren't there.
Thank you. Good catch.
> > diff --git a/ofproto/netflow.h b/ofproto/netflow.h
> > index f3099a1..7b5c1cb 100644
> > --- a/ofproto/netflow.h
> > +++ b/ofproto/netflow.h
>
> We can remove ip_tos from struct netflow_flow in this file as well.
Also good spotting, thanks.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic