2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-29 13:27:59 +00:00

20 Commits

Author SHA1 Message Date
Pravin B Shelar
ec6c537986 sflow: use ovs route API to get source IP address.
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
2016-03-24 09:30:57 -07:00
Lance Richardson
97d0619c11 osx: handle differences between OS X and other BSDs
Conditional compilation to account for:
  - OS X does not implement RTM_IFANNOUNCE.
  - OS X does not implement tap netdeivces.
  - OS X does not implement RT_ROUNDUP().

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
2016-03-22 18:42:58 -07:00
YAMAMOTO Takashi
9da6989c49 route-table-bsd: Retry logic
Retry routing requests as the routing socket is unreliable.

Also, add some error checks and logs.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-01-14 10:30:49 +09:00
YAMAMOTO Takashi
43e2a6214e route-table-bsd: Update vlog.h inclusion
This fixes a build failure introduced by the recent vlog change
commit e6211adce42c28453e0004c7a3e342a3d52bb97d.
("lib: Move vlog.h to <openvswitch/vlog.h>")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2014-12-18 15:35:12 +09:00
YAMAMOTO Takashi
36673528f8 route-table-bsd: Add some DBG logs
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-12-10 13:38:06 +09:00
YAMAMOTO Takashi
a7701e29b2 route-table-bsd: Provide gateway info
For userspace tunneling.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-12-10 13:38:03 +09:00
YAMAMOTO Takashi
88ffdc93c8 ovs-router: non-Linux support
Refactor ovs-router so that it can work with non-Linux platforms
at least in some extent, using the existing route-table code as
a fallback.  Known restriction: for such platforms, "ovs/router/show"
command does not show "Cached" kernel routes.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2014-12-10 13:38:01 +09:00
YAMAMOTO Takashi
6595fb00f0 route-table-bsd: Stop caching pid
The cache here doesn't work anymore as the recent
commit b772066ffd066d59d9ebce092f6665150723d2ad
("route-table: Remove Unregister.")
made this function called before daemonizing,
thus with a different pid.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-12-10 13:37:58 +09:00
Pravin B Shelar
b772066ffd route-table: Remove Unregister.
Since dpif registering for routing table at initialization
there is no need to unregister it. Following patch removes
support for turning routing table notifications on and off.
Due to this change OVS always listens for these
notifications.

Reported-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-12-01 14:43:32 -08:00
YAMAMOTO Takashi
ac0facbaf7 lib/route-table-*: Fix non-Linux builds
Fix build failures introduced by
commit 1bc50ef389d40be9ee215e66b49cf66fcbdb9eeb
("dpctl: Fix crash.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-26 11:16:11 +09:00
YAMAMOTO Takashi
2d2b28d518 ovs-router: Fix build on NetBSD
Split the linux-specific part of ovs-router.h
into ovs-router-linux.h.

The breakage was introduced by
commit d9b4ebc5d15202bedad06969353435a4c1951c71
("route-table: Use classifier to store routing table.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-11-11 10:44:52 +09:00
Pravin B Shelar
fb3939930c ovs-router: Define stub for ovs_router_unixctl_register()
ovs_router_unixctl_register() is called from ofproto layer.
But is not defined for all platform. Following patch define
stub to fix compilation error.

Reported-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>-
2014-11-05 19:36:35 -08:00
Pravin B Shelar
d9b4ebc5d1 route-table: Use classifier to store routing table.
Rather than using hmap for storing routing entries we can directly use
classifier which has support for priority and wildcard entries.
This makes route lookup lockless. This help when we use route lookup
for native tunneling.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2014-11-03 13:27:31 -08:00
YAMAMOTO Takashi
101582c1ec route-table-bsd: Remove unused vlog definition
Complained by clang 3.4.

lib/route-table-bsd.c:35:1: error: unused variable 'THIS_MODULE'
      [-Werror,-Wunused-const-variable]
VLOG_DEFINE_THIS_MODULE(route_table);
^
./lib/vlog.h:176:42: note: expanded from macro 'VLOG_DEFINE_THIS_MODULE'
        static struct vlog_module *const THIS_MODULE = &VLM_##MODULE

Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-05-05 08:36:36 +09:00
YAMAMOTO Takashi
e29915b23f route-table-bsd: Sprinkle ALIGNED_CAST where appropriate
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-05-05 08:36:29 +09:00
Alex Wang
41ca1e0afb netdev-vport: Checks tunnel status change when route-table is reset.
Commit 3e912ffcbb (netdev: Add 'change_seq' back to netdev.) added per-
netdev change number for indicating status change.  Future commits used
this change number to optimize the netdev status update to database.
However, the work also introduced the bug in the following scenario:

- assume interface eth0 has address 1.2.3.4, eth1 has adddress 10.0.0.1.
- assume tunnel port p1 is set with remote_ip=10.0.0.5.
- after setup, 'ovs-vsctl list interface p1 status' should show the
  'tunnel_egress_iface="eth1"'.
- now if the address of eth1 is change to 0 via 'ifconfig eth1 0'.
- expectedly, after change, 'ovs-vsctl list interface p1 status' should
  show the 'tunnel_egress_iface="eth0"'

However, 'tunnel_egress_iface' will not be updated on current master.
This is in that, the 'netdev-vport' module corresponding to p1 does
not react to routing related changes.

To fix the bug, this commit adds a change sequence number in the route-
table module and makes netdev-vport check the sequence number for
tunnel status update.

Bug #1240626

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-05-02 14:29:18 -07:00
YAMAMOTO Takashi
339f0a19dc use RT_ROUNDUP on NetBSD
Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-04-22 08:52:47 -07:00
Ed Maste
574b679c2f lib: Correct "old-style function definition" warning.
Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-08-08 12:26:17 -07:00
Ed Maste
47cd84a8d0 Add forgotten header
Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-11 09:01:24 -07:00
Ed Maste
9360d9b7b5 Route-table implementation for (Free)BSD
This is a trivial implementation of the route-table functionality for
FreeBSD, as needed by ofproto/ofproto-dpif-sflow.c.  It has not yet
been extensively tested.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-06-29 14:42:38 -07:00