summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* datapath-protocol: vport_stats types are unsigned.Jesse Gross2011-09-191-1/+1
| | | | | | | | | | The 'u' in uint64_t apparently got clipped off of the tx_dropped member of struct vport_stats in between review and push, incorrectly making this a signed type. CC: Pravin Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin Shelar <pshelar@nicira.com>
* nicira-ext: Clarify comment.Ben Pfaff2011-09-191-6/+6
| | | | | I noticed a couple of typos and inaccuracies here while reviewing Jean's changes to it for OXM at https://www.opennetworking.org/bugs/browse/EXT-1
* datapath: Hardcode vport multicast group ID on older kernels.Ethan Jackson2011-09-162-0/+46
| | | | | | | | | | | Older kernels do not advertise the multicast groups of families when requested by userspace. As a workaround, this patch hardcodes the multicast group ID of the ovs_vport family on these kernels. Userspace will be able to fall back to this hardcoded value if the standard mechanism is unavailable. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Always use generic stats for devices (vports)Pravin Shelar2011-09-154-62/+13
| | | | | | | | | | | | | | | Currently ovs is using device stats for Linux devices and count them itself in other situations. This leads to overlap with hardware stats, inconsistencies, etc. It's much better to just always count the packets flowing through the switch and let userspace do any merging that it wants. Following patch removes vport->get_stats() interface. vport-stat is changed to use new `struct ovs_vport_stat` rather than rtnl_link_stats64. Definitions of rtnl_link_stats64 is removed from OVS. dipf_port->stat is also removed as aggregate stats are only available at netdev layer. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Implement new "learn" action.Ben Pfaff2011-09-131-1/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few loose ends here. First, learning actions cause too much flow revalidation. Upcoming commits will fix that problem. The following additional issues have not yet been addressed: * Resource limits: nothing yet limits the maximum number of flows that can be learned. It is possible to exhaust all system memory. * Age reporting: there is no way to find out how soon a learned table entry is due to be evicted. To try this action out, here's a recipe for a very simple-minded MAC learning switch. It uses a 10-second MAC expiration time to make it easier to see what's going on: ovs-vsctl del-controller br0 ovs-ofctl del-flows br0 ovs-ofctl add-flow br0 "table=0 actions=learn(table=1, hard_timeout=10, \ NXM_OF_VLAN_TCI[0..11], NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[], \ output:NXM_OF_IN_PORT[]), resubmit(,1)" ovs-ofctl add-flow br0 "table=1 priority=0 actions=flood" You can then dump the MAC learning table with: ovs-ofctl dump-flows br0 table=1
* datapath: Strip down vport interface : OVS_VPORT_ATTR_MTUPravin Shelar2011-09-121-5/+2
| | | | | | | | | | | | | | There is no need to have vport attribute MTU (OVS_VPORT_ATTR_MTU) as linux net-dev-ioctl can be used to get/set MTU for linux device. Following patch removes OVS_VPORT_ATTR_MTU from datapath protocol. This patch also adds netdev_set_mtu interface. So that MTU adjustments can be done from OVS userspace. get_mtu() interface is also changed, now get_mtu() returns EOPNOTSUPP rather than returning 0 and setting *pmtu to INT_MAX in case there is no MTU attribute for given device. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: VLAN actions should use push/pop semanticsPravin Shelar2011-09-091-2/+2
| | | | | | | | | | | | | | Currently the kernel vlan actions mirror those used by OpenFlow 1.0. i.e. MODIFY and STRIP. More flexible approach is to have an action to push a tag and pop a tag off, so that it can handle multiple levels of vlan tags. Plus it aligns with newer version of OpenFlow. As this patch replaces MODIFY with PUSH semantic, action mapping done in userpace is fixed accordingly. GSO handling for multiple levels of vlan tags is also added as Jesse suggested before. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Strip down vport interface : iflinkPravin Shelar2011-09-081-3/+0
| | | | | | | | Remove iflink from vport interface. iflink is not used anywhere in OVS. So there is not need to have iflink as vport attribute. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Use "OVS_*" as opposed to "ODP_*" for user<->kernel interactions.Justin Pettit2011-08-192-215/+215
| | | | | | | | | | | | | The prefix "ODP_*" is not overly descriptive in the context of the larger Linux tree. This commit changes the prefix to "OVS_*" for the userpace to kernel interactions. The userspace libraries still use "ODP_" in many of their interfaces since it is more descriptive in the OVS oeuvre. Feature #6904 Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath-protocol: Correct a description in odp_flow_attr structure.Justin Pettit2011-08-181-4/+5
| | | | | | The description referenced "ODPAT_*", but it should be "ODP_ACTION_ATTR_". Signed-off-by: Justin Pettit <jpettit@nicira.com>
* nicra-ext: New action NXAST_OUTPUT_REG.Ethan Jackson2011-08-121-1/+32
| | | | | The NXAST_OUTPUT_REG action outputs to the OpenFlow port contained in a supplied NXM field.
* nicira-ext: Fix NXM example.Ben Pfaff2011-08-091-1/+1
| | | | | | | | The code and the specification say that nxm_length includes both value and mask, but this example showed nxm_length only including the value. This commit fixes it. Reported-by: Justin Pettit <jpettit@nicira.com>
* New action NXAST_RESUBMIT_TABLE.Ben Pfaff2011-08-091-15/+37
| | | | | This makes multiple table support in ofproto-dpif useful, by allowing resubmits into tables other than 0.
* ovs-dpctl: Show number of flowsSimon Horman2011-08-031-0/+1
| | | | | | | | | | | | | | | | | Expose the number of flows present in a datapath to user-space and to users via ovs-dpctl show. e.g.: ovs-dpctl show br3 system@br3: lookups: frags:0, hit:0, missed:0, lost:0 flows: 0 ... Signed-off-by: Simon Horman <horms@verge.net.au> [Jesse: Add same logic to userspace datapath.] Signed-off-by: Jesse Gross <jesse@nicira.com>
* Datapath action should not refer to controllerpravin shelar2011-07-281-5/+5
| | | | | | | | ODP_ACTION_ATTR_CONTROLLER in the kernel actually sends packets to userspace, not the controller. To make it generic rename this action to ODP_ACTION_ATTR_USERSPACE. Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
* nx-match: Make more fields writable with NXAST_REG_MOVE and other actions.Ben Pfaff2011-07-261-0/+12
| | | | | | | | | | Until now, fields writable by actions defined in terms of NXM field numbers were special cases, but commit b3e9b2eda9a "ofproto: Optimize datapath actions" had the side effect of making it easy to modify additional fields. This commit takes advantage of that to make modifiable all the fields that the kernel datapath supports modifying. We could make other fields modifiable by adding more support to the kernel datapath.
* bundle: New action "bundle_load".Ethan Jackson2011-07-221-6/+18
| | | | | The bundle_load action behaves the same as the bundle action, except instead of outputting, it writes its result to a register.
* nx-match: New helpers.Ethan Jackson2011-07-221-6/+4
| | | | | | | | | | | This patch creates two new helper functions, nxm_reg_load() and nxm_dst_check(). The new nxm_dst_check() function may be used to check the validity of destination fields used by actions. The new nxm_reg_load() function may be used by actions which need to write to NXM fields. This patch also allows multipath and autopath to write their result to non-register NXM fields.
* vswitch: Implement bundle action.Ethan Jackson2011-07-191-1/+73
| | | | | | This patch creates a new action called "bundle". Bundles are a way to implement a simple form of multipath in OpenFlow by grouping several ports in a single output-like action.
* nicira-ext: Generalize nx_mp_fields into nx_hash_fields.Ethan Jackson2011-07-191-22/+21
| | | | | | Future patches will use nx_hash_fields for non-multipath related actions. This patch renames nx_mp_fields and creates a new flow_hash_fields() function.
* nicira-ext: Fix incorrect comment in autopath definition.Ethan Jackson2011-06-151-1/+1
|
* Define UINT64_MAX as "unknown" in Open vSwitch specific interfaces.Ben Pfaff2011-06-141-6/+6
| | | | | | | Some hardware supports reporting packet or byte counters but not both, so OVS has to be prepared for that. Suggested-by: Justin Pettit <jpettit@nicira.com>
* openflow: Make stats replies more like other OpenFlow messages.Ben Pfaff2011-06-142-25/+36
|
* nicira-ext: Separate nx_aggregate_stats_reply from ofp_aggregate_stats_reply.Ben Pfaff2011-06-141-6/+5
| | | | | | | | | | | | An upcoming patch will make stats messages much more like other messages, in that their structures will include all of the headers. This means that struct ofp_aggregate_stats_reply will no longer be appropriate as a member of struct nx_aggregate_stats_reply, because it will then include those additional header members. Also, struct nx_aggregate_stats_reply doesn't need to use the special ovs_32aligned_be64 type, since its 64-bit members are correctly aligned, which is another reasonable reason to keep it separate.
* openflow: Merge ofp_flow_stats_request and ofp_aggregate_stats_request.Ben Pfaff2011-06-141-14/+2
|
* openflow: Remove 'body' member from struct ofp_stats_msg.Ben Pfaff2011-06-141-1/+0
| | | | This member does not actually help with anything.
* openflow: Merge ofp_stats_request and ofp_stats_reply.Ben Pfaff2011-06-141-18/+12
| | | | | | | | These structures for OpenFlow stats requests and replies have identical memebers, but until now they have been separate structures. Since in some cases we actually want to treat both of them the same way, this has led to various kinds of awkwardness. This commit merges them into a new "struct ofp_stats_msg" and fixes up the users.
* nicira-ext: Explicitly assign each extension message type a number.Ben Pfaff2011-06-101-16/+16
| | | | | This has no semantic change but it makes the numbering harder to screw up by reordering.
* nicira-ext: Renumber NXT_FLOW_MOD_TABLE_ID.Ben Pfaff2011-06-101-11/+7
| | | | | | We don't know of anyone using this command in production yet, so it seems reasonable to give it a new number instead of coping with it having a conflicting number.
* Remove NXAST_DROP_SPOOFED_ARP action.Justin Pettit2011-06-092-20/+1
| | | | | | | | | The NXAST_DROP_SPOOFED_ARP action has been deprecated in favor of defining flows using the NXM_NX_ARP_SHA flow match for a while. This commit removes it. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Merge 'next' into 'master'.Ben Pfaff2011-05-181-4/+58
|\ | | | | | | | | | | | | | | | | | | I know already that this breaks the statsfixes that were implemented by the following commits: 827ab71c97f "ofproto: Datapath statistics accounted twice." 6f1435fc8f7 "ofproto: Resubmit statistics improperly account during..." These were already broken in a previous merge. I will work on a fix.
| * Merge 'master' into 'next'.Ben Pfaff2011-05-122-25/+6
| |\
| * | Implement basic multiple table support.Ben Pfaff2011-05-121-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements basic multiple table support in ofproto and supporting libraries and utilities. The design is the same as the one that has been on the Open vSwitch "wdp" branch for a long time. There is no support for multiple tables in the software switch implementation (ofproto-dpif), only a set of hooks for other switch implementations to use. To allow controllers to add flows in a particular table, Open vSwitch adds an OpenFlow 1.0 extension called NXT_FLOW_MOD_TABLE_ID.
* | | Make the source tree sparse clean.Ben Pfaff2011-05-169-0/+578
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit, the tree compiles clean with sparse commit 87f4a7fda3d "Teach 'already_tokenized()' to use the stream name hash table" with patch "evaluate: Allow sizeof(_Bool) to succeed" available at http://permalink.gmane.org/gmane.comp.parsers.sparse/2461 applied, as long as the "include/sparse" directory is included for use by sparse (only), e.g.: make CC="CHECK='sparse -I../include/sparse' cgcc"
* | | openflow: Change types from uint<N>_t to ovs_be<N>.Ben Pfaff2011-05-161-102/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | I've been reluctant in the past to make wholesale changes to openflow.h because it would be a divergence from upstream that would make comparisons and merges more difficult. But, in practice, no one does such comparisons and no merges happen (because OpenFlow 1.0 is not changing). I'd still be inclined to resist, except that in this series I'm adding actual checking for byte order conventions (as opposed to just documentation).
* | | Remove unnecessary #include directives.Ben Pfaff2011-05-161-1/+0
| |/ |/|
* | tunneling: Add df_default and df_inherit tunnel options.Andrew Evans2011-04-291-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Split existing pmtud tunnel option's functionality into three. Existing pmtud option still exists, but now governs only whether datapath sends ICMP frag needed messages. New df_inherit option controls whether DF bit is copied from packet inner header to outer tunnel header. New df_default option controls whether DF bit is set if inner packet isn't IP or if df_inherit is disabled. Suggested-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Andrew Evans <aevans@nicira.com> Feature #5456.
* | Remove support for obsolete "tun_id_from_cookie" extension.Ben Pfaff2011-04-261-22/+1
|/ | | | | | | | The "tun_id_from_cookie" OpenFlow extension predated NXM and supports only a fraction of its features. Nothing (at Nicira, anyway) uses it any longer. Support for it had been broken since January and it took until a few days ago for anyone to complain, so it cannot be too important. This commit removes it.
* autopath: Create the autopath action.Ethan Jackson2011-04-111-1/+47
| | | | | The newly created autopath action will be the way OpenFlow interacts with the existing bonding infrastructure.
* ofproto: Get rid of archaic "switch status" OpenFlow extension.Ben Pfaff2011-03-161-9/+2
| | | | | | | | | Back in 2008 or so, I introduced this extension as a way to provide information about switch status to the new "switch UI" program. Since then, the switch UI program has been removed and the important information that was provided by the switch status extension is now available in the database, so we might as well get rid of this extension, and that is what this commit does.
* nicira-ext: Fix comment.Ben Pfaff2011-02-231-2/+3
| | | | | Multipath actions only support registers as destinations, but this was defined by reference in nicira-ext.h and the referenced text changed.
* Remove /proc/net compatibility support.Ben Pfaff2011-02-111-7/+1
| | | | | | | | This feature was included only to allow Citrix QA to run some tests that interacted directly with the bridge. This feature hasn't been turned on for some time, so it should not be necessary any longer. Signed-off-by: Ben Pfaff <blp@nicira.com>
* openflow: Use types and accessors for half-aligned 64-bit fields.Ben Pfaff2011-02-051-27/+28
| | | | | | Without this commit, many of the unit tests for ofp-print.c fail with bus errors on RISC architectures (tested on sparc) and presumably so would any other code that uses these same struct members.
* Add types and accessors for working with half-aligned 64-bit values.Ben Pfaff2011-02-051-1/+24
| | | | | | | | Both OpenFlow and Netlink contain 64-bit fields that are only guaranteed to be aligned on 32-bit boundaries. This commit introduces types for representing these fields and functions for working with them. Followup commits will make the OpenFlow and Netlink code use these types and functions.
* datapath: Tolerate backporting of rtnl_link_stats64 (as in RHEL 6).Ben Pfaff2011-02-041-3/+6
| | | | | | | | | | | | | | | | | | | | Red Hat Enterprise Linux 6 has a 2.6.32 kernel but it backports the rtnl_link_stats64 structure that was introduced in 2.6.35, so we need to check whether it was defined instead of just guessing based on the kernel version number. Build-tested only, on 2.6.32-71.14.1.el6 (RHEL 6), linux-2.6.18-128.1.6.el5.xs5.5.0.496.101 (XenServer 5.5.0), 2.6.18-128.1.6.el5.xs5.5.0.505.1024xen (XenServer 5.5.0 update 1), and upstream 2.6.18, 2.6.26, 2.6.29, 2.6.33, 2.6.34, 2.6.36, all for i386, plus 2.6.36 for x86-64. My machine's userspace headers have <linux/if_link.h> but not rtnl_link_stats64. Jesse Gross tested the case where <linux/if_link.h> has rtnl_link_stats64, on Ubuntu 10.10. Reported-by: Geoff White <gwhite@nicira.com> Tested-by: Jesse Gross <jesse@nicira.com>
* datapath-protocol: Drop useless/obsolete comments.Jesse Gross2011-02-041-10/+0
| | | | | | | | Some of the comments related to compat code that no longer exists, types which are defined elsewhere, or are generally not very helpful. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* datapath-protocol: Dropped unused __aligned_* types.Jesse Gross2011-02-043-21/+1
| | | | | | | | These types are no longer used, are redundantly defined, and were cluttering our interface header. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* datapath: Consider tunnels to have no MTU, fixing jumbo frame support.Ben Pfaff2011-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, tunnel vports have had a specific MTU, in the same way that ordinary network devices have an MTU, but treating them this way does not always make sense. For example, consider a datapath that has three ports: the local port, a GRE tunnel to another host, and a physical port. If the physical port is configured with a jumbo MTU, it should be possible to send jumbo packets across the tunnel: the tunnel can do fragmentation or the physical port traversed by the tunnel might have a jumbo MTU. However, until now, tunnels always had a 1500-byte MTU by default. It could be adjusted using ODP_VPORT_MTU_SET, but nothing actually did this. One alternative would be to make ovs-vswitchd able to set the vport's MTU. This commit, however, takes a different approach, of dropping the concept of MTU entirely for tunnel vports. This also solves the problem described above, without making any additional work for anyone. I tested that, without this change, I could not send 1600-byte "pings" between two machines whose NICs had 2000-byte MTUs that were connected to vswitches that were in turn connected over GRE tunnels with the default 1500-byte MTU. With this change, it worked OK, regardless of the MTU of the network traversed by the GRE tunnel. This patch also makes "patch" ports MTU-less. It might make sense to remove vport_set_mtu() and the associated callback now, since ordinary network devices are the only vports that support it now. Signed-off-by: Ben Pfaff <blp@nicira.com> Suggested-by: Jesse Gross <jesse@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #3728.
* nicira-ext: Support matching IPv6 Neighbor Discovery messages.Justin Pettit2011-02-022-0/+47
| | | | | | | | | | | | | | | | | IPv6 uses Neighbor Discovery messages in a similar manner to how IPv4 uses ARP. This commit adds support for matching deeper into the payloads of Neighbor Solicitation (NS) and Neighbor Advertisement (NA) messages. Currently, the matching fields include: - NS and NA Target (nd_target) - NS Source Link Layer Address (nd_sll) - NA Target Link Layer Address (nd_tll) When defining IPv6 Neighbor Discovery rules, the Nicira Extensible Match (NXM) extension to OVS must be used. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* nicira-ext: Support matching IPv6 traffic.Justin Pettit2011-02-022-4/+46
| | | | | | | | | | | | | | | | | Provides ability to match over IPv6 traffic in the same manner as IPv4. Currently, the matching fields include: - IPv6 source and destination addresses (ipv6_src and ipv6_dst) - Traffic Class (nw_tos) - Next Header (nw_proto) - ICMPv6 Type and Code (icmp_type and icmp_code) - TCP and UDP Ports over IPv6 (tp_src and tp_dst) When defining IPv6 rules, the Nicira Extensible Match (NXM) extension to OVS must be used. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>