parent
a927d52891
commit
e9962dc6c4
@ -0,0 +1,54 @@
|
|||||||
|
From 45a60c21fc17ba31199fa800cdce92cc1f17f06b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Roi Dayan <roid@mellanox.com>
|
||||||
|
Date: Sun, 25 Mar 2018 12:11:48 +0300
|
||||||
|
Subject: [PATCH 1/2] lib/netdev-tc-offloads: Fix frag first/later translation
|
||||||
|
|
||||||
|
Fragment mask (any and later) always exists so we need to test
|
||||||
|
for FLOW_NW_FRAG_LATER only if the state is FLOW_NW_FRAG_ANY.
|
||||||
|
Before this fix we could pass frag no and first at the same time to TC
|
||||||
|
which is also not tested there for bad frag state.
|
||||||
|
This fix make sure we only pass frag first/later if is frag.
|
||||||
|
|
||||||
|
Fixes: 83e866067ea6 ("netdev-tc-offloads: Add support for IP fragmentation")
|
||||||
|
Signed-off-by: Roi Dayan <roid@mellanox.com>
|
||||||
|
Reviewed-by: Paul Blakey <paulb@mellanox.com>
|
||||||
|
Signed-off-by: Simon Horman <simon.horman@netronome.com>
|
||||||
|
---
|
||||||
|
lib/netdev-tc-offloads.c | 19 +++++++++++++------
|
||||||
|
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c
|
||||||
|
index f22415ee1..6db76801f 100644
|
||||||
|
--- a/lib/netdev-tc-offloads.c
|
||||||
|
+++ b/lib/netdev-tc-offloads.c
|
||||||
|
@@ -948,14 +948,21 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match,
|
||||||
|
flower.key.ip_ttl = key->nw_ttl;
|
||||||
|
flower.mask.ip_ttl = mask->nw_ttl;
|
||||||
|
|
||||||
|
- if (mask->nw_frag) {
|
||||||
|
- if (key->nw_frag & FLOW_NW_FRAG_ANY)
|
||||||
|
+ if (mask->nw_frag & FLOW_NW_FRAG_ANY) {
|
||||||
|
+ flower.mask.flags |= TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT;
|
||||||
|
+
|
||||||
|
+ if (key->nw_frag & FLOW_NW_FRAG_ANY) {
|
||||||
|
flower.key.flags |= TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT;
|
||||||
|
- if (!(key->nw_frag & FLOW_NW_FRAG_LATER))
|
||||||
|
- flower.key.flags |= TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST;
|
||||||
|
|
||||||
|
- flower.mask.flags |= TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT;
|
||||||
|
- flower.mask.flags |= TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST;
|
||||||
|
+ if (mask->nw_frag & FLOW_NW_FRAG_LATER) {
|
||||||
|
+ flower.mask.flags |= TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST;
|
||||||
|
+
|
||||||
|
+ if (!(key->nw_frag & FLOW_NW_FRAG_LATER)) {
|
||||||
|
+ flower.key.flags |= TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
mask->nw_frag = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
From 827903321ab68f7cd91e9d7c5d9bdec796b3060d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Roi Dayan <roid@mellanox.com>
|
|
||||||
Date: Mon, 12 Mar 2018 14:58:46 +0200
|
|
||||||
Subject: [PATCH 1/2] lib/tc: Handle error parsing action in
|
|
||||||
nl_parse_single_action
|
|
||||||
|
|
||||||
Raise the error up instead of ignoring it.
|
|
||||||
Before this commit beside an error an incorrect rule was also printed.
|
|
||||||
|
|
||||||
Signed-off-by: Roi Dayan <roid@mellanox.com>
|
|
||||||
Reviewed-by: Paul Blakey <paulb@mellanox.com>
|
|
||||||
Signed-off-by: Simon Horman <simon.horman@netronome.com>
|
|
||||||
---
|
|
||||||
lib/tc.c | 17 +++++++++++------
|
|
||||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/tc.c b/lib/tc.c
|
|
||||||
index 914465a9f..b49bbe89b 100644
|
|
||||||
--- a/lib/tc.c
|
|
||||||
+++ b/lib/tc.c
|
|
||||||
@@ -809,6 +809,7 @@ nl_parse_single_action(struct nlattr *action, struct tc_flower *flower)
|
|
||||||
struct nlattr *stats_attrs[ARRAY_SIZE(stats_policy)];
|
|
||||||
struct ovs_flow_stats *stats = &flower->stats;
|
|
||||||
const struct gnet_stats_basic *bs;
|
|
||||||
+ int err = 0;
|
|
||||||
|
|
||||||
if (!nl_parse_nested(action, act_policy, action_attrs,
|
|
||||||
ARRAY_SIZE(act_policy))) {
|
|
||||||
@@ -821,20 +822,24 @@ nl_parse_single_action(struct nlattr *action, struct tc_flower *flower)
|
|
||||||
act_cookie = action_attrs[TCA_ACT_COOKIE];
|
|
||||||
|
|
||||||
if (!strcmp(act_kind, "gact")) {
|
|
||||||
- nl_parse_act_drop(act_options, flower);
|
|
||||||
+ err = nl_parse_act_drop(act_options, flower);
|
|
||||||
} else if (!strcmp(act_kind, "mirred")) {
|
|
||||||
- nl_parse_act_mirred(act_options, flower);
|
|
||||||
+ err = nl_parse_act_mirred(act_options, flower);
|
|
||||||
} else if (!strcmp(act_kind, "vlan")) {
|
|
||||||
- nl_parse_act_vlan(act_options, flower);
|
|
||||||
+ err = nl_parse_act_vlan(act_options, flower);
|
|
||||||
} else if (!strcmp(act_kind, "tunnel_key")) {
|
|
||||||
- nl_parse_act_tunnel_key(act_options, flower);
|
|
||||||
+ err = nl_parse_act_tunnel_key(act_options, flower);
|
|
||||||
} else if (!strcmp(act_kind, "pedit")) {
|
|
||||||
- nl_parse_act_pedit(act_options, flower);
|
|
||||||
+ err = nl_parse_act_pedit(act_options, flower);
|
|
||||||
} else if (!strcmp(act_kind, "csum")) {
|
|
||||||
nl_parse_act_csum(act_options, flower);
|
|
||||||
} else {
|
|
||||||
VLOG_ERR_RL(&error_rl, "unknown tc action kind: %s", act_kind);
|
|
||||||
- return EINVAL;
|
|
||||||
+ err = EINVAL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (err) {
|
|
||||||
+ return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (act_cookie) {
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
From 118b21d93f55f4cdb511d770c90f0d49bd624187 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eric Garver <e@erig.me>
|
|
||||||
Date: Thu, 1 Mar 2018 17:59:41 -0500
|
|
||||||
Subject: [PATCH 1/2] ofproto-dpif-xlate: translate action_set in clone action
|
|
||||||
|
|
||||||
A clone action saves the action_set prior to performing the clone, then
|
|
||||||
restores it afterwards. However when xlating the actions it neglects to
|
|
||||||
consider the action_set so any write_action() inside a clone() are
|
|
||||||
ignored. Unfortunately patch ports are internally implemented via
|
|
||||||
clone(). So a frame traversing to a second bridge via patch port will
|
|
||||||
never be affected by write_action() in the second bridge's flow table.
|
|
||||||
|
|
||||||
Lets make clone() aware of the action_set.
|
|
||||||
|
|
||||||
Signed-off-by: Eric Garver <e@erig.me>
|
|
||||||
Signed-off-by: Ben Pfaff <blp@ovn.org>
|
|
||||||
---
|
|
||||||
ofproto/ofproto-dpif-xlate.c | 9 +++++++++
|
|
||||||
1 file changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
|
|
||||||
index cc450a896948..bc6429c25346 100644
|
|
||||||
--- a/ofproto/ofproto-dpif-xlate.c
|
|
||||||
+++ b/ofproto/ofproto-dpif-xlate.c
|
|
||||||
@@ -5303,6 +5303,9 @@ clone_xlate_actions(const struct ofpact *actions, size_t actions_len,
|
|
||||||
if (reversible_actions(actions, actions_len) || is_last_action) {
|
|
||||||
old_flow = ctx->xin->flow;
|
|
||||||
do_xlate_actions(actions, actions_len, ctx, is_last_action);
|
|
||||||
+ if (!ctx->freezing) {
|
|
||||||
+ xlate_action_set(ctx);
|
|
||||||
+ }
|
|
||||||
if (ctx->freezing) {
|
|
||||||
finish_freezing(ctx);
|
|
||||||
}
|
|
||||||
@@ -5324,6 +5327,9 @@ clone_xlate_actions(const struct ofpact *actions, size_t actions_len,
|
|
||||||
/* Use clone action as datapath clone. */
|
|
||||||
offset = nl_msg_start_nested(ctx->odp_actions, OVS_ACTION_ATTR_CLONE);
|
|
||||||
do_xlate_actions(actions, actions_len, ctx, true);
|
|
||||||
+ if (!ctx->freezing) {
|
|
||||||
+ xlate_action_set(ctx);
|
|
||||||
+ }
|
|
||||||
if (ctx->freezing) {
|
|
||||||
finish_freezing(ctx);
|
|
||||||
}
|
|
||||||
@@ -5337,6 +5343,9 @@ clone_xlate_actions(const struct ofpact *actions, size_t actions_len,
|
|
||||||
ac_offset = nl_msg_start_nested(ctx->odp_actions,
|
|
||||||
OVS_SAMPLE_ATTR_ACTIONS);
|
|
||||||
do_xlate_actions(actions, actions_len, ctx, true);
|
|
||||||
+ if (!ctx->freezing) {
|
|
||||||
+ xlate_action_set(ctx);
|
|
||||||
+ }
|
|
||||||
if (ctx->freezing) {
|
|
||||||
finish_freezing(ctx);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
|||||||
From b91dd29864d853228add9d9d432ca3d1bbc4fa43 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mark Michelson <mmichels@redhat.com>
|
|
||||||
Date: Wed, 7 Mar 2018 09:31:00 -0600
|
|
||||||
Subject: [PATCH] ovn: Calculate UDP checksum for DNS over IPv6
|
|
||||||
|
|
||||||
Unlike IPv4, IPv6 mandates the calculation of the UDP checksum. For DNS
|
|
||||||
resolution in OVN, we were setting the checksum to 0, which results in
|
|
||||||
errors.
|
|
||||||
|
|
||||||
This patch fixes the problem by calculating the checksum for DNS over
|
|
||||||
IPv6. It also alters the applicable test by skipping the checksum when
|
|
||||||
comparing the expected and actual packets.
|
|
||||||
|
|
||||||
Signed-off-by: Mark Michelson <mmichels@redhat.com>
|
|
||||||
Signed-off-by: Ben Pfaff <blp@ovn.org>
|
|
||||||
---
|
|
||||||
ovn/controller/pinctrl.c | 11 +++++++++++
|
|
||||||
tests/ovn.at | 5 +++--
|
|
||||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ovn/controller/pinctrl.c b/ovn/controller/pinctrl.c
|
|
||||||
index 9fc7a0326..980f51fc9 100644
|
|
||||||
--- a/ovn/controller/pinctrl.c
|
|
||||||
+++ b/ovn/controller/pinctrl.c
|
|
||||||
@@ -927,6 +927,17 @@ pinctrl_handle_dns_lookup(
|
|
||||||
} else {
|
|
||||||
struct ovs_16aligned_ip6_hdr *nh = dp_packet_l3(&pkt_out);
|
|
||||||
nh->ip6_plen = htons(new_l4_size);
|
|
||||||
+
|
|
||||||
+ /* IPv6 needs UDP checksum calculated */
|
|
||||||
+ uint32_t csum;
|
|
||||||
+ csum = packet_csum_pseudoheader6(nh);
|
|
||||||
+ csum = csum_continue(csum, out_udp, dp_packet_size(&pkt_out) -
|
|
||||||
+ ((const unsigned char *)out_udp -
|
|
||||||
+ (const unsigned char *)eth));
|
|
||||||
+ out_udp->udp_csum = csum_finish(csum);
|
|
||||||
+ if (!out_udp->udp_csum) {
|
|
||||||
+ out_udp->udp_csum = htons(0xffff);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
pin->packet = dp_packet_data(&pkt_out);
|
|
||||||
diff --git a/tests/ovn.at b/tests/ovn.at
|
|
||||||
index b57a93d3f..83c0e9d6e 100644
|
|
||||||
--- a/tests/ovn.at
|
|
||||||
+++ b/tests/ovn.at
|
|
||||||
@@ -7099,8 +7099,9 @@ test_dns6 1 f00000000001 f000000000f0 $src_ip $dst_ip $dns_reply $dns_req_data $
|
|
||||||
OVS_WAIT_UNTIL([test 9 = `cat ofctl_monitor*.log | grep -c NXT_RESUME`])
|
|
||||||
|
|
||||||
$PYTHON "$top_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > 1.packets
|
|
||||||
-cat 1.expected > expout
|
|
||||||
-AT_CHECK([cat 1.packets], [0], [expout])
|
|
||||||
+# Skipping the UDP checksum.
|
|
||||||
+cat 1.expected | cut -c 1-120,125- > expout
|
|
||||||
+AT_CHECK([cat 1.packets | cut -c 1-120,125-], [0], [expout])
|
|
||||||
|
|
||||||
reset_pcap_file hv1-vif1 hv1/vif1
|
|
||||||
reset_pcap_file hv1-vif2 hv1/vif2
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
|||||||
From 6796c04a9afacf2d09248509d54d5ea586050a3c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aaron Conole <aconole@redhat.com>
|
|
||||||
Date: Tue, 13 Feb 2018 16:42:16 -0500
|
|
||||||
Subject: [PATCH] rhel: don't drop capabilities when running as root
|
|
||||||
|
|
||||||
Currently, regardless of which user is being set as the running user,
|
|
||||||
Open vSwitch daemons on RHEL systems drop capabilities. This means the
|
|
||||||
very powerful CAP_SYS_ADMIN is dropped, even when the user is 'root'.
|
|
||||||
|
|
||||||
For the majority of use cases this behavior works, as the user can
|
|
||||||
enable or disable various configurations, regardless of which datapath
|
|
||||||
functions are desired. However, when using certain DPDK PMDs, the
|
|
||||||
enablement and configuration calls require CAP_SYS_ADMIN.
|
|
||||||
|
|
||||||
Instead of retaining CAP_SYS_ADMIN in all cases, which would practically
|
|
||||||
nullify the uid/gid and privilege drop, we don't pass the --ovs-user
|
|
||||||
option to the daemons. This shunts the capability and privilege
|
|
||||||
dropping code.
|
|
||||||
|
|
||||||
Reported-by: Marcos Felipe Schwarz <marcos.f.sch@gmail.com>
|
|
||||||
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-January/045955.html
|
|
||||||
Fixes: e3e738a3d058 ("redhat: allow dpdk to also run as non-root user")
|
|
||||||
Signed-off-by: Aaron Conole <aconole@redhat.com>
|
|
||||||
Acked-By: Timothy Redaelli <tredaelli@redhat.com>
|
|
||||||
Signed-off-by: Russell Bryant <russell@ovn.org>
|
|
||||||
---
|
|
||||||
rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 7 ++++---
|
|
||||||
rhel/usr_lib_systemd_system_ovsdb-server.service | 6 ++++--
|
|
||||||
2 files changed, 8 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
|
|
||||||
index c6d9aa1b8..889740f1a 100644
|
|
||||||
--- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
|
|
||||||
+++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
|
|
||||||
@@ -13,17 +13,18 @@ Restart=on-failure
|
|
||||||
Environment=HOME=/var/run/openvswitch
|
|
||||||
EnvironmentFile=/etc/openvswitch/default.conf
|
|
||||||
EnvironmentFile=-/etc/sysconfig/openvswitch
|
|
||||||
+EnvironmentFile=-/run/openvswitch/useropts
|
|
||||||
@begin_dpdk@
|
|
||||||
-ExecStartPre=-/usr/bin/chown :hugetlbfs /dev/hugepages
|
|
||||||
+ExecStartPre=-/bin/sh -c '/usr/bin/chown :${OVS_USER_ID##*:} /dev/hugepages'
|
|
||||||
ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages
|
|
||||||
@end_dpdk@
|
|
||||||
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
|
|
||||||
--no-ovsdb-server --no-monitor --system-id=random \
|
|
||||||
- --ovs-user=${OVS_USER_ID} \
|
|
||||||
+ ${OVSUSER} \
|
|
||||||
start $OPTIONS
|
|
||||||
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
|
|
||||||
ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server \
|
|
||||||
--no-monitor --system-id=random \
|
|
||||||
- --ovs-user=${OVS_USER_ID} \
|
|
||||||
+ ${OVSUSER} \
|
|
||||||
restart $OPTIONS
|
|
||||||
TimeoutSec=300
|
|
||||||
diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service
|
|
||||||
index 234d39355..e05742d87 100644
|
|
||||||
--- a/rhel/usr_lib_systemd_system_ovsdb-server.service
|
|
||||||
+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
|
|
||||||
@@ -11,13 +11,15 @@ Restart=on-failure
|
|
||||||
EnvironmentFile=/etc/openvswitch/default.conf
|
|
||||||
EnvironmentFile=-/etc/sysconfig/openvswitch
|
|
||||||
ExecStartPre=/usr/bin/chown ${OVS_USER_ID} /var/run/openvswitch
|
|
||||||
+ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
|
|
||||||
+EnvironmentFile=-/run/openvswitch/useropts
|
|
||||||
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
|
|
||||||
--no-ovs-vswitchd --no-monitor --system-id=random \
|
|
||||||
- --ovs-user=${OVS_USER_ID} \
|
|
||||||
+ ${OVSUSER} \
|
|
||||||
start $OPTIONS
|
|
||||||
ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
|
|
||||||
ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
|
|
||||||
- --ovs-user=${OVS_USER_ID} \
|
|
||||||
+ ${OVSUSER} \
|
|
||||||
--no-monitor restart $OPTIONS
|
|
||||||
RuntimeDirectory=openvswitch
|
|
||||||
RuntimeDirectoryMode=0755
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
From 7e0f69b581705064e2fd767426c5227150a31e6f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ian Stokes <ian.stokes@intel.com>
|
||||||
|
Date: Wed, 21 Mar 2018 20:11:22 +0000
|
||||||
|
Subject: [PATCH 2/2] lib/tc: Fix sparse warnings.
|
||||||
|
|
||||||
|
"sparse" complains with the warning 'incorrect type in argument 1
|
||||||
|
(different base types)' in function nl_parse_flower_ip when parsing a key
|
||||||
|
flag and in function nl_msg_put_flower_options when writing the key
|
||||||
|
flag. Fix this by using network byte order when reading and writing key
|
||||||
|
flags to netlink messages.
|
||||||
|
|
||||||
|
Fixes: 83e86606 ("netdev-tc-offloads: Add support for IP fragmentation")
|
||||||
|
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
|
||||||
|
Signed-off-by: Ben Pfaff <blp@ovn.org>
|
||||||
|
Acked-by: Roi Dayan <roid@mellanox.com>
|
||||||
|
---
|
||||||
|
lib/tc.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/tc.c b/lib/tc.c
|
||||||
|
index c446d8407..6daa44710 100644
|
||||||
|
--- a/lib/tc.c
|
||||||
|
+++ b/lib/tc.c
|
||||||
|
@@ -377,8 +377,9 @@ nl_parse_flower_ip(struct nlattr **attrs, struct tc_flower *flower) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attrs[TCA_FLOWER_KEY_FLAGS_MASK]) {
|
||||||
|
- key->flags = ntohl(nl_attr_get_u32(attrs[TCA_FLOWER_KEY_FLAGS]));
|
||||||
|
- mask->flags = ntohl(nl_attr_get_u32(attrs[TCA_FLOWER_KEY_FLAGS_MASK]));
|
||||||
|
+ key->flags = ntohl(nl_attr_get_be32(attrs[TCA_FLOWER_KEY_FLAGS]));
|
||||||
|
+ mask->flags =
|
||||||
|
+ ntohl(nl_attr_get_be32(attrs[TCA_FLOWER_KEY_FLAGS_MASK]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attrs[TCA_FLOWER_KEY_IPV4_SRC_MASK]) {
|
||||||
|
@@ -1503,9 +1504,9 @@ nl_msg_put_flower_options(struct ofpbuf *request, struct tc_flower *flower)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flower->mask.flags) {
|
||||||
|
- nl_msg_put_u32(request, TCA_FLOWER_KEY_FLAGS,
|
||||||
|
+ nl_msg_put_be32(request, TCA_FLOWER_KEY_FLAGS,
|
||||||
|
htonl(flower->key.flags));
|
||||||
|
- nl_msg_put_u32(request, TCA_FLOWER_KEY_FLAGS_MASK,
|
||||||
|
+ nl_msg_put_be32(request, TCA_FLOWER_KEY_FLAGS_MASK,
|
||||||
|
htonl(flower->mask.flags));
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
From 14ebc6c199a7c3c1097776e18a9c29ced8cc8cc9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eric Garver <e@erig.me>
|
|
||||||
Date: Thu, 1 Mar 2018 17:59:42 -0500
|
|
||||||
Subject: [PATCH 2/2] tests/ofproto-dpif: New test for action_set after
|
|
||||||
traversing patch port
|
|
||||||
|
|
||||||
Signed-off-by: Eric Garver <e@erig.me>
|
|
||||||
Signed-off-by: Ben Pfaff <blp@ovn.org>
|
|
||||||
---
|
|
||||||
tests/ofproto-dpif.at | 25 +++++++++++++++++++++++++
|
|
||||||
1 file changed, 25 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
|
|
||||||
index 48cbc672d204..d2058eddd3eb 100644
|
|
||||||
--- a/tests/ofproto-dpif.at
|
|
||||||
+++ b/tests/ofproto-dpif.at
|
|
||||||
@@ -371,6 +371,31 @@ AT_CHECK([tail -1 stdout], [0],
|
|
||||||
OVS_VSWITCHD_STOP
|
|
||||||
AT_CLEANUP
|
|
||||||
|
|
||||||
+AT_SETUP([ofproto-dpif - patch port with action set])
|
|
||||||
+OVS_VSWITCHD_START([ \
|
|
||||||
+ add-br br1 -- \
|
|
||||||
+ set bridge br1 datapath-type=dummy fail-mode=secure -- \
|
|
||||||
+ add-port br0 patch10 -- \
|
|
||||||
+ set interface patch10 type=patch options:peer=patch20 ofport_request=10 -- \
|
|
||||||
+ add-port br1 patch20 -- \
|
|
||||||
+ set interface patch20 type=patch options:peer=patch10 ofport_request=20
|
|
||||||
+ ])
|
|
||||||
+add_of_ports br0 1
|
|
||||||
+add_of_ports br1 2
|
|
||||||
+AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br1 'ip actions=write_actions(pop_vlan,output:2)'])
|
|
||||||
+AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=output:10'])
|
|
||||||
+AT_CHECK([ovs-appctl ofproto/trace br1 'in_port=20,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_vlan=100,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
|
|
||||||
+AT_CHECK([tail -1 stdout], [0],
|
|
||||||
+ [Datapath actions: pop_vlan,2
|
|
||||||
+])
|
|
||||||
+AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_vlan=100,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
|
|
||||||
+AT_CHECK([tail -1 stdout], [0],
|
|
||||||
+ [Datapath actions: pop_vlan,2
|
|
||||||
+])
|
|
||||||
+OVS_VSWITCHD_STOP
|
|
||||||
+AT_CLEANUP
|
|
||||||
+
|
|
||||||
+
|
|
||||||
AT_SETUP([ofproto-dpif - select group])
|
|
||||||
OVS_VSWITCHD_START
|
|
||||||
add_of_ports br0 1 10 11
|
|
||||||
--
|
|
||||||
2.11.0
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Copyright (C) 2017, Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# set_config.sh will copy a configuration from $1 to $2, in the process
|
|
||||||
# checking that the sha header for $1 matches the header in $2
|
|
||||||
|
|
||||||
source configlib.sh
|
|
||||||
|
|
||||||
if (( $# < 2 )); then
|
|
||||||
echo "$0: source dest [comment-marker]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$1" ]; then
|
|
||||||
echo "Source file $1 must exist."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
src_file=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [ ! -f "$1" ]; then
|
|
||||||
echo "Dest file $1 must exist."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dst_file=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
comment_sep=${1:-#}
|
|
||||||
|
|
||||||
export LANG=en_US.utf8
|
|
||||||
|
|
||||||
DEST_FILE_SHA=""
|
|
||||||
SRC_FILE_SHA=""
|
|
||||||
|
|
||||||
calc_sha DEST_FILE_SHA "$dst_file" "$comment_sep" || echo "Failed to calc sha"
|
|
||||||
retr_sha SRC_FILE_SHA "$src_file" "$comment_sep" || echo "Failed to retrieve sha"
|
|
||||||
|
|
||||||
if [ "$DEST_FILE_SHA" != "$SRC_FILE_SHA" ]; then
|
|
||||||
echo "ERROR: The requisite starting sha from $dst_file does not match the"
|
|
||||||
echo " specified sha in $src_file."
|
|
||||||
echo "[ $DEST_FILE_SHA ] vs [ $SRC_FILE_SHA ]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mv "$dst_file" "$dst_file".OLD
|
|
||||||
cp "$src_file" "$dst_file"
|
|
||||||
echo "copied 1 config file."
|
|
||||||
exit 0
|
|
@ -1 +1 @@
|
|||||||
SHA512 (openvswitch-2.9.0.tar.gz) = c9feb45c650b73093ad1f25f2fc6dbd135dfab691b3322bf87c6efe34bcbfc0a099d1db85c14fe08eb05f4154eae56dd81de54c0a6be97b42a4aa4b6ae53e37b
|
SHA512 (openvswitch-2.9.1.tar.gz) = a8a69f4c23aeba5ab962b9ce135fba9ec297fd789123bd9cbd21f0255c02405c20a326678cb88f3a2465e3b9e35e7083ef5472438f46e3a220c6612c3bd5bee0
|
||||||
|
Loading…
Reference in new issue