summaryrefslogtreecommitdiff
path: root/lib/ofp-util.c
Commit message (Collapse)AuthorAgeFilesLines
* vlog: Make client supply semicolon for VLOG_DEFINE_THIS_MODULE.Ben Pfaff2010-10-291-1/+1
| | | | | It's kind of odd for VLOG_DEFINE_THIS_MODULE to supply its own semicolon, so this commit switches to the more common form.
* xtoxll: Rename "byte-order" since it now include more than xtoxll.Ben Pfaff2010-10-291-1/+1
| | | | Suggested-by: Justin Pettit <jpettit@nicira.com>
* ofp-util: Fix normalization of IP TOS bits.Jean Tourrilhes2010-10-281-1/+2
| | | | If the packet is not IP, you probably want to also wildcard the ToS.
* datapath: Simplify ODPAT_SET_DL_TCI action.Ben Pfaff2010-10-181-0/+18
| | | | | | | | There's no need to have a mask in this action, because both parts of the TCI are part of the flow structure. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* flow: Get rid of flow_t typedef.Ben Pfaff2010-10-111-4/+4
| | | | | | | | | | When userspace and the kernel were using the same structure for flows, flow_t was a useful way to indicate that a structure was really a userspace flow instead of a kernel one, but now it's better to just write "struct flow" for consistency, since OVS doesn't use typedefs for structs elsewhere. Acked-by: Jesse Gross <jesse@nicira.com>
* ofproto: Avoid wasting memory malloc()'ing empty action sets for subrules.Ben Pfaff2010-10-061-4/+5
| | | | | | | | | | | | GNU libc treats malloc(0) as malloc(1). Subrules always have an n_actions of 0, so this code was wasting time and memory for subrules. This commit stops doing that. Also audits and fixes some very pedantic potential problems with null pointers; e.g. the C standard says that NULL may not be compared with the < operator, even if both arguments are null, and it also says that a null pointer may not be passed to memcpy() or memcmp(), even if the length is zero.
* Add Nicira extension for modifying queue without transmittingJustin Pettit2010-10-021-0/+2
| | | | | | | | | | | The OpenFlow OFPAT_ENQUEUE action sets a queue id and outputs the packet in one shot. There are times in which the queue should be set, but the output port is not yet known. This commit adds the NXAST_SET_QUEUE and NXAST_POP_QUEUE Nicira extension actions to modify the queue configuration without requiring a port argument. CC: Jeremy Stribling <strib@nicira.com> CC: Keith Amidon <keith@nicira.com>
* ofp-util: Also accept NXAST_DROP_SPOOFED_ARP.Ben Pfaff2010-09-151-0/+1
| | | | | | Reported-by: Bryan Fulton <bryan@nicira.com> Reported-by: Michael Mao <mmao@nicira.com> Bug #3655.
* treewide: Remove trailing whitespaceJoe Perches2010-08-301-3/+3
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* vlog: Introduce VLOG_DEFINE_THIS_MODULE for declaring vlog module in use.Ben Pfaff2010-07-211-2/+2
| | | | | | | Adding a macro to define the vlog module in use adds a level of indirection, which makes it easier to change how the vlog module must be defined. A followup commit needs to do that, so getting these widespread changes out of the way first should make that commit easier to review.
* learning-switch: Break packet-in processing into two steps.Ben Pfaff2010-07-201-14/+23
|
* ofproto: Log changes made by flow normalization.Ben Pfaff2010-06-281-0/+37
| | | | | | | | | | | Open vSwitch has always "normalized" flows, that is, zeroed out fields that are wildcarded or that otherwise cannot affect whether a packet actually matches the flow. But until now it has done so silently, which prevents the authors of controllers from learning what is happening and makes it less likely that they will update code on their end. This commit makes OVS log when normalization changes a flow. Suggested by partner.
* ofp-util: Also normalize nw_tos in normalize_match().Ben Pfaff2010-06-221-3/+8
| | | | | | | | | | | The OpenFlow reference implementation was sensibly normalizing these fields but OVS did not. This change should make OVS resemble the OpenFlow reference implementation at least in this respect. For more information: https://mailman.stanford.edu/pipermail/openflow-spec/2010-June/001040.html Reported-by: Takayuki HAMA <t-hama@cb.jp.nec.com>
* Implement QoS framework.Ben Pfaff2010-06-171-4/+54
| | | | | | | | | | | ovs-vswitchd doesn't declare its QoS capabilities in the database yet, so the controller has to know what they are. We can add that later. The linux-htb QoS class has been tested to the extent that I can see that it sets up the queues I expect when I run "tc qdisc show" and "tc class show". I haven't tested that the effects on flows are what we expect them to be. I am sure that there will be problems in that area that we will have to fix.
* vconn: Move OpenFlow utility functions into new file ofp-util.c.Ben Pfaff2010-06-171-0/+701
The main purpose of the vconn code is to ship OpenFlow messages across network connections. Over time a large number of utility functions related to OpenFlow messages have also crept into vconn.c, but that's really logically separate. This commit breaks those functions out into a new file.