git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dpif-linux: Use correct enum in dpif_linux_flow_dump_start().
[sliver-openvswitch.git]
/
lib
/
flow.c
diff --git
a/lib/flow.c
b/lib/flow.c
index
e8c22db
..
9ab1961
100644
(file)
--- a/
lib/flow.c
+++ b/
lib/flow.c
@@
-164,7
+164,7
@@
parse_ethertype(struct ofpbuf *b)
static int
parse_ipv6(struct ofpbuf *packet, struct flow *flow)
{
static int
parse_ipv6(struct ofpbuf *packet, struct flow *flow)
{
- const struct ip6_hdr *nh;
+ const struct
ovs_16aligned_
ip6_hdr *nh;
ovs_be32 tc_flow;
int nexthdr;
ovs_be32 tc_flow;
int nexthdr;
@@
-175,10
+175,10
@@
parse_ipv6(struct ofpbuf *packet, struct flow *flow)
nexthdr = nh->ip6_nxt;
nexthdr = nh->ip6_nxt;
-
flow->ipv6_src = nh->ip6_src
;
-
flow->ipv6_dst = nh->ip6_dst
;
+
memcpy(&flow->ipv6_src, &nh->ip6_src, sizeof flow->ipv6_src)
;
+
memcpy(&flow->ipv6_dst, &nh->ip6_dst, sizeof flow->ipv6_dst)
;
- tc_flow = get_
un
aligned_be32(&nh->ip6_flow);
+ tc_flow = get_
16
aligned_be32(&nh->ip6_flow);
flow->nw_tos = ntohl(tc_flow) >> 20;
flow->ipv6_label = tc_flow & htonl(IPV6_LABEL_MASK);
flow->nw_ttl = nh->ip6_hlim;
flow->nw_tos = ntohl(tc_flow) >> 20;
flow->ipv6_label = tc_flow & htonl(IPV6_LABEL_MASK);
flow->nw_ttl = nh->ip6_hlim;
@@
-226,7
+226,7
@@
parse_ipv6(struct ofpbuf *packet, struct flow *flow)
return EINVAL;
}
} else if (nexthdr == IPPROTO_FRAGMENT) {
return EINVAL;
}
} else if (nexthdr == IPPROTO_FRAGMENT) {
- const struct ip6_frag *frag_hdr = packet->data;
+ const struct
ovs_16aligned_
ip6_frag *frag_hdr = packet->data;
nexthdr = frag_hdr->ip6f_nxt;
if (!ofpbuf_try_pull(packet, sizeof *frag_hdr)) {
nexthdr = frag_hdr->ip6f_nxt;
if (!ofpbuf_try_pull(packet, sizeof *frag_hdr)) {
@@
-1141,10
+1141,10
@@
miniflow_clone(struct miniflow *dst, const struct miniflow *src)
void
miniflow_move(struct miniflow *dst, struct miniflow *src)
{
void
miniflow_move(struct miniflow *dst, struct miniflow *src)
{
- int n = miniflow_n_values(src);
- if (n <= MINI_N_INLINE) {
+ if (src->values == src->inline_values) {
dst->values = dst->inline_values;
dst->values = dst->inline_values;
- memcpy(dst->values, src->values, n * sizeof *dst->values);
+ memcpy(dst->values, src->values,
+ miniflow_n_values(src) * sizeof *dst->values);
} else {
dst->values = src->values;
}
} else {
dst->values = src->values;
}
@@
-1373,7
+1373,7
@@
minimask_clone(struct minimask *dst, const struct minimask *src)
void
minimask_move(struct minimask *dst, struct minimask *src)
{
void
minimask_move(struct minimask *dst, struct minimask *src)
{
- miniflow_
clon
e(&dst->masks, &src->masks);
+ miniflow_
mov
e(&dst->masks, &src->masks);
}
/* Initializes 'dst_' as the bit-wise "and" of 'a_' and 'b_'.
}
/* Initializes 'dst_' as the bit-wise "and" of 'a_' and 'b_'.