Commit 222837 (dpif-linux: Factor out port dumping helper functions.) introduced a bug by making dpif_linux_port_dump_next__() return 'bool' instead of 'int' as defined in dpif-provider.h. This bug causes ovs- vswitchd failure with SEGFAULT when processing slow-path packet.
This commit fixes the bug by following the dpif-provider specification. Signed-off-by: Alex Wang <al...@nicira.com> --- lib/dpif-linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index d75bc95..52c3f65 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -739,7 +739,7 @@ dpif_linux_port_dump_start(const struct dpif *dpif, void **statep) return 0; } -static bool +static int dpif_linux_port_dump_next__(const struct dpif *dpif_, struct nl_dump *dump, struct dpif_linux_vport *vport) { @@ -1300,7 +1300,7 @@ dpif_linux_refresh_channels(struct dpif *dpif_) dpif->n_events = dpif->event_offset = 0; dpif_linux_port_dump_start__(dpif_, &dump); - while (dpif_linux_port_dump_next__(dpif_, &dump, &vport)) { + while (!dpif_linux_port_dump_next__(dpif_, &dump, &vport)) { uint32_t port_no = odp_to_u32(vport.port_no); struct nl_sock *sock = (port_no < dpif->uc_array_size ? dpif->channels[port_no].sock -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev