Message ID | 20180907170308.1318-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] flow: Document parse_tcp_flags() assumptions and semantics. | expand |
Thanks, looks good to me. Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com> On Fri, Sep 7, 2018 at 10:03 AM Ben Pfaff <blp@ovn.org> wrote: > Reported-by: Bhargava Shastry <bshastry@sect.tu-berlin.de> > Signed-off-by: Ben Pfaff <blp@ovn.org> > --- > lib/flow.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/flow.c b/lib/flow.c > index 77ed3d9dfd2f..128f64083ac7 100644 > --- a/lib/flow.c > +++ b/lib/flow.c > @@ -1019,6 +1019,11 @@ parse_dl_type(const struct eth_header *data_, > size_t size) > return parse_ethertype(&data, &size); > } > > +/* Parses and return the TCP flags in 'packet', converted to host byte > order. > + * If 'packet' is not an Ethernet packet embedding TCP, returns 0. > + * > + * The caller must ensure that 'packet' is at least ETH_HEADER_LEN bytes > + * long.'*/ > uint16_t > parse_tcp_flags(struct dp_packet *packet) > { > -- > 2.16.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
Thanks, applied to master. On Wed, Sep 12, 2018 at 10:22:51AM -0700, Yifeng Sun wrote: > Thanks, looks good to me. > > Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com> > > On Fri, Sep 7, 2018 at 10:03 AM Ben Pfaff <blp@ovn.org> wrote: > > > Reported-by: Bhargava Shastry <bshastry@sect.tu-berlin.de> > > Signed-off-by: Ben Pfaff <blp@ovn.org> > > --- > > lib/flow.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/lib/flow.c b/lib/flow.c > > index 77ed3d9dfd2f..128f64083ac7 100644 > > --- a/lib/flow.c > > +++ b/lib/flow.c > > @@ -1019,6 +1019,11 @@ parse_dl_type(const struct eth_header *data_, > > size_t size) > > return parse_ethertype(&data, &size); > > } > > > > +/* Parses and return the TCP flags in 'packet', converted to host byte > > order. > > + * If 'packet' is not an Ethernet packet embedding TCP, returns 0. > > + * > > + * The caller must ensure that 'packet' is at least ETH_HEADER_LEN bytes > > + * long.'*/ > > uint16_t > > parse_tcp_flags(struct dp_packet *packet) > > { > > -- > > 2.16.1 > > > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > >
diff --git a/lib/flow.c b/lib/flow.c index 77ed3d9dfd2f..128f64083ac7 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1019,6 +1019,11 @@ parse_dl_type(const struct eth_header *data_, size_t size) return parse_ethertype(&data, &size); } +/* Parses and return the TCP flags in 'packet', converted to host byte order. + * If 'packet' is not an Ethernet packet embedding TCP, returns 0. + * + * The caller must ensure that 'packet' is at least ETH_HEADER_LEN bytes + * long.'*/ uint16_t parse_tcp_flags(struct dp_packet *packet) {
Reported-by: Bhargava Shastry <bshastry@sect.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> --- lib/flow.c | 5 +++++ 1 file changed, 5 insertions(+)