git: Update gitignore to include new hstamp suffix.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Log traces when resubmit depth is exceeded.

It can be very difficult to debug xlate_actions() failures due to
excessive resubmit recursion.  In an attempt to make it easier,
this patch adds a (severely rate-limited) full ofproto/trace to the
logs.

Suggested-by: Alan Shieh <ashieh@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs-xapi-sync: Rerun processing when a db update arrives during a commit.

The logic in ovs-xapi-sync didn't handle the case where ovsdb-server sends
a database update before it replies to a transaction that ovs-xapi-sync
sent, like this:

ovs-xapi-sync              ovsdb-server
-------------              ------------

                      .
                      .
                      .
transaction request  --->
                     <---  database contents update
                     <---  transaction reply
                      .
                      .
                      .

The update was not lost but ovs-xapi-sync would not process it until the
database changed again.

Bug #10082.
Reported-by: Krishna Miriyala <krishna@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: rename brcompat.c to brcompat_main.c

This just makes it easier to subsequently rename the brcompat_mod module
to brcompat without introducing circular dependencies.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath: update linux/.gitignore

Remove a couple stale entries:
  brc_sysfs_* was renamed to dp_sysfs_* a few years ago

Add some new entries to ignore:
 # Untracked file:
 #   (use "git add <file>..." to include in what will be committed)
 #	datapath/linux/exthdrs_core.c
 #	datapath/linux/genl_exec.c
 # 	datapath/linux/net_namespace.c
 # 	datapath/linux/workqueue.c

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
netdev-linux: Use "read", not "recv", for tap devices.

"recv" only works for sockets, but tap devices aren't sockets.

Makes the userspace switch work again.

Reported-by: Ravi Kerur <Ravi.Kerur@telekom.com>
Reported-by: 胡靖飞 <hujingfei914@msn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
authors: Fix text alignment.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs-monitor-ipsec: Detect correctly IPSEC configuration changes

If Open vSwitch has IPSEC tunnel (with certificates) and Interface
table was updated, then ovs-monitor-ipsec daemon would incorrectly
remove and readd all existing IPSEC tunnels.

The root cause for this issue was that "peer_cert_file" key was present in
interfaces dictionary, but it was not present in new_interfaces dictionary.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Reported-by: Niklas Andersson <nandersson@nicira.com>
Revert "ovs-monitor-ipsec: Detect correctly IPSEC configuration changes"

This reverts commit e1870e82f5ea35d45d7358c2454e876122a02bfb.

Reverting due to a failing build test.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
ovs-monitor-ipsec: Detect correctly IPSEC configuration changes

If Open vSwitch has IPSEC tunnel (with certificates) and Interface
table was updated, then ovs-monitor-ipsec daemon would incorrectly
remove and readd all existing IPSEC tunnels.

The root cause for this issue was that "peer_cert_file" key was present in
interfaces dictionary, but it was missing in new_interfaces dictionary.

v2: Do not fail buildtests

Issue#10096

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Reported-by: Niklas Andersson <nandersson@nicira.com>
datapath: omit _mod from module names

This renames the datapath modules:

  openvswitch_mod -> openvswitch
  brcompat_mod -> brcompat

The first makes the module name consistent with upstream, and the latter
is just for internal consistency.  This makes tools, and documentation
refer to a common module name regardless if it's coming from upstream
linux or built from datapath/ as part of a local build.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
netdev-linux: Cache drv-info for net device.

Netdev-linux calls ETHTOOL_GDRVINFO on every netdev_linux_get_status()
which is not optimal as drv-info does not change for given device.
So following patch changes netdev_linux_get_status() to read drv-info at
device initialization and cache it.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
netdev-linux: Cache error code from mtu ioctl.

netdev linux devices uses mtu ioctl to get and set MTU for a device.
By caching error code from ioctl we can reduce number of ioctl calls
for device which is unregistered from system.
netdev notification is used to update mtu which saves get-mtu-ioctl.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
netdev-linux: Cache error code from ether-addr ioctl.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
netdev-linux: Cache error code from set-policing.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
netdev-linux: Cache error code from get-features.

Following patch adds support for caching error code from ETHTOOL_GSET
call. Since internal device is virtual device device feature does not
make much sense, so netdev_get_features op is removed for internal
devices.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
netdev-linux: Cache error code from do_get_ifindex().

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
debian: Fix Debian build of modules via module-assistant.

Fixes an error during module-assistant build step:

    install: cannot stat `openvswitch/datapath/linux/*_mod.ko': No such
    file or directory

This was (understandably) overlooked as part of commit 9b80f761be
(datapath: omit _mod from module names).

Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-xapi-sync: Remove useless root_prefix global.

There's no reason for this variable to be global, or to exist at
all for that matter.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs-xapi-sync: Cache nicira-bridge-id in ovs-xapi-sync.

Communicating with xapi from Python can be quite expensive so it
makes sense to cache this data if convenient.

Signed-off-by: Ethan Jackson <ethan@nicira.com>