rstp.at: Fix intermittent test failure.

Sub-test "RSTP - dummy interface" checks the ovs-vswitchd.log
output immediately after command execution.  The check may
fail if the write of new log is delayed by the IO thread.

This commit fixes the above issue by waiting for the
ovs-vswitchd.log output.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
ofproto-dpif-rid: remove struct rid_map

struct rid_map only has one member which is a struct hmap.
This allows for a slight simplification of the code by removing
struct rid_map and using a struct hmap directly instead.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
ofproto-dpif-rid: remove unused return value of rid_pool_add()

The return value of rid_pool_add() is never used
so the code may be slightly simplified by removing it.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
netdev: Fix error check.

Reported-by: Daniel Badea <daniel.badea@windriver.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
netdev-dpdk: Fix crash when there is no pci numa info.

When kernel cannot obtain the pci numa info, the numa_node file
in corresponding pci directory in sysfs will show -1.  Then the
rte_eth_dev_socket_id() function will return it to ovs.  On
current master, ovs assumes rte_eth_dev_socket_id() always
returns non-negative value.  So using this -1 in pmd thread
creation will cause ovs crash.

To fix the above issue, this commit makes ovs always check the
return value of rte_eth_dev_socket_id() and use numa node 0 if
the return value is negative.

Reported-by: Daniel Badea <daniel.badea@windriver.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
lib/ofproto: Sync RSTP operational state after configuration changes.

Otherwise the RSTP port operational state could be out of sync until
the next time the port's carrier status changes.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Daniele Venturino <daniele.venturino@m3s.it>
README.ovs-vtep: Remotes can be connected through VTEP's manager table.

Reported-by: Ziyou Wang <ziyouw@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
vtep-ctl: Add Tunnel table to vtep_ctl_table_class.

This is needed to create, get, set records in the Tunnel table.

(We need to add the Tunnel table's 'local' and 'remote' columns
that point to the Physical_Locator record to cache because vtep-ctl
commands like 'add-ucast-local' will try to add an entry in
Physical_Locator table based on the contents of the cache.)

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ovs-vtep: Clear left-over local mac information.

Before destroying a logical switch, cleanup any left over local
mac information in Ucast_Macs_Local or Mcast_Macs_Local table.
We need to do this to atleast cleanup the 'unknown-dst' information
added in the Mcast_Macs_Local table while creating the Logical_Switch
class in setup_ls().

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ovs-vtep: Store physical switch name globally.

ovs-vtep is an emulator and it works only on one
physical switch. This switch name is stored in the variable
'ps_name' and then passed around. An upcoming commit requires
access to this variable at more places and it is easier if this
variable is global.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ovs-vtep: Use shlex module to split args.

string.split() function splits a quoted string if there is a whitespace
inside the quote.
ex: The following code snippet will output ['printing', '"No', 'Diagnostic"']
args = 'printing "No Diagnostic"'
print args.split()

The above is a problem if we run the following command through vtep_ctl().
vtep-ctl set tunnel $uuid bfd_status:diagnostic="No Diagnostic"

The workaround is to use the split() function from shlex module.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Acked-by: Justin Pettit <jpettit@nicira.com>