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 <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
return 0;
}
-static bool
+static int
dpif_linux_port_dump_next__(const struct dpif *dpif_, struct nl_dump *dump,
struct dpif_linux_vport *vport)
{
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