summaryrefslogtreecommitdiff
path: root/lib/route-table-bsd.c
Commit message (Collapse)AuthorAgeFilesLines
* sflow: use ovs route API to get source IP address.Pravin B Shelar2016-03-241-4/+11
| | | | | Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* osx: handle differences between OS X and other BSDsLance Richardson2016-03-221-0/+7
| | | | | | | | | | 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>
* route-table-bsd: Retry logicYAMAMOTO Takashi2015-01-141-8/+52
| | | | | | | | | 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>
* route-table-bsd: Update vlog.h inclusionYAMAMOTO Takashi2014-12-181-1/+1
| | | | | | | | | 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>
* route-table-bsd: Add some DBG logsYAMAMOTO Takashi2014-12-101-0/+13
| | | | | Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Ben Pfaff <blp@nicira.com>
* route-table-bsd: Provide gateway infoYAMAMOTO Takashi2014-12-101-3/+9
| | | | | | | For userspace tunneling. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Acked-by: Ben Pfaff <blp@nicira.com>
* ovs-router: non-Linux supportYAMAMOTO Takashi2014-12-101-6/+2
| | | | | | | | | | 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>
* route-table-bsd: Stop caching pidYAMAMOTO Takashi2014-12-101-3/+1
| | | | | | | | | | | 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>
* route-table: Remove Unregister.Pravin B Shelar2014-12-011-14/+2
| | | | | | | | | | | | 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>
* lib/route-table-*: Fix non-Linux buildsYAMAMOTO Takashi2014-11-261-1/+1
| | | | | | | | | 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>
* ovs-router: Fix build on NetBSDYAMAMOTO Takashi2014-11-111-0/+1
| | | | | | | | | | | | 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>
* ovs-router: Define stub for ovs_router_unixctl_register()Pravin B Shelar2014-11-051-0/+5
| | | | | | | | | | 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>-
* route-table: Use classifier to store routing table.Pravin B Shelar2014-11-031-1/+2
| | | | | | | | | | | 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>
* route-table-bsd: Remove unused vlog definitionYAMAMOTO Takashi2014-05-051-3/+0
| | | | | | | | | | | | | | 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>
* route-table-bsd: Sprinkle ALIGNED_CAST where appropriateYAMAMOTO Takashi2014-05-051-2/+3
| | | | | Acked-by: Ben Pfaff <blp@nicira.com> Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* netdev-vport: Checks tunnel status change when route-table is reset.Alex Wang2014-05-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* use RT_ROUNDUP on NetBSDYAMAMOTO Takashi2013-04-221-0/+6
| | | | | Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
* lib: Correct "old-style function definition" warning.Ed Maste2012-08-081-2/+2
| | | | | Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Add forgotten headerEd Maste2012-07-111-0/+2
| | | | | Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Route-table implementation for (Free)BSDEd Maste2012-06-291-0/+129
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>