2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
cca408daa5 ofpbuf: New functions ofpbuf_use_stub() and ofpbuf_get_uninit_pointer().
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-18 20:28:42 -07:00
Ethan Jackson
6aa728e0ef ofpbuf: Maintain header pointers in clone functions.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-10 14:29:17 -08:00
Ben Pfaff
63f2140a55 openflow: Make stats replies more like other OpenFlow messages. 2011-06-14 11:21:50 -07:00
Ben Pfaff
7ecb095d0b ofpbuf: Make ofpbufs initialized with ofpbuf_use_stack() not expandable.
My original intent for ofpbufs initialized with ofpbuf_use_stack() was that
the caller was providing enough space on the stack for the common case,
with dynamic allocation as a fallback.  But in practice, none of the
clients actually do this.  Instead, all of them actually know that the
stack-allocated buffer is big enough and, since they don't want to bother
with having to call ofpbuf_delete(), they instead assert that the buffer
wasn't reallocated.

Since this is a bit of a pain, this commit changes the semantics of
ofpbuf_use_stack() to be that the stack-allocated buffer cannot be
reallocated at all.  This is more convenient for the existing clients.
2011-03-30 15:08:47 -07:00
Ben Pfaff
933369b119 ofpbuf: New function ofpbuf_steal_data().
This will have its first use in an upcoming commit.
2011-03-18 14:40:55 -07:00
Ben Pfaff
a46c577af5 ofpbuf: New function ofpbuf_clone_data_with_headroom().
This new function is a simple helper that creates a new ofpbuf with some
initial contents plus a caller-specified amount of headroom.

This will be used in upcoming commits.

Acked-by: Jesse Gross <jesse@nicira.com>
2011-01-27 09:26:05 -08:00
Ben Pfaff
0dce369bdd ofpbuf: Enable ofpbuf_push() to expand headroom.
Until now, ofpbuf_put() has been able to reallocate an ofpbuf to
expand the tailroom, but ofpbuf_push() has not been able to expand
the headroom in an analogous way.  This omission is simply because
it has never been useful to do this.  However, an upcoming change
will make the amount of headroom in an ofpbuf passed up from a
dpif to ofproto harder to predict.  It seems that we might as well
simply implement expanding headroom, so this commit does that.

Acked-by: Jesse Gross <jesse@nicira.com>
2011-01-27 09:26:05 -08:00
Ben Pfaff
31ac1e590b ofpbuf: New function ofpbuf_use_stack().
This new function is useful in a situation where a small stack-allocated
buffer is usually appropriate but occasionally it must be expanded.

Acked-by: Jesse Gross <jesse@nicira.com>
2011-01-27 09:26:05 -08:00
Ben Pfaff
78090f6300 ofpbuf: New function ofpbuf_put_hex().
This commit converts nx_match_from_string() to use this new function.  The
new function will also have another user in an upcoming commit.
2010-12-09 14:51:31 -08:00
Ben Pfaff
0bc9407dbb ofpbuf: New function ofpbuf_use_const().
This is a code cleanup.

Suggested-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2010-12-07 13:44:17 -08:00
Ben Pfaff
b3907fbc6c queue: Get rid of ovs_queue data structure.
ovs_queue doesn't seem very useful; it's just a singly-linked list.  It's
more generally useful to use a general-purpose "struct list" for lists of
packets, so this commit adds such a member to "struct ofpbuf" and shifts
the existing users to use it.
2010-12-06 10:03:31 -08:00
Ben Pfaff
68efcbec41 ofpbuf: Add ofpbuf_new_with_headroom(), ofpbuf_clone_with_headroom().
These new functions simplify an increasingly common usage pattern.

Suggested-by: Jesse Gross <jesse@nicira.com>
2010-09-01 12:55:50 -07:00
Joe Perches
d295e8e97a treewide: Remove trailing whitespace
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2010-08-30 13:23:08 -07:00
Ben Pfaff
1f5cbaa3ba ofpbuf: Implement unsupported feature in ofpbuf_trim().
Until now, ofpbuf_trim() has not handled the case where the ofpbuf has
nonzero headroom.  This causes an assertion failure when pinsched_send()
queues a packet to be sent later, because such packets have been
guaranteed to have nonzero headroom since commit 43253595 "ofproto: Avoid
buffer copy in OFPT_PACKET_IN path."  This commit fixes the problem by
implementing the until-now unsupported case.

This commit factors code out of ofpbuf_prealloc_tailroom() into two new
functions, ofpbuf_rebase__() and ofpbuf_resize_tailroom__(), and uses the
latter to implement both ofpbuf_prealloc_tailroom() and ofpbuf_trim().
ofpbuf_rebase__() isn't used on its own at all, but it seems potentially
useful so I made it an independent function.

Reported-by: Tom Everman <teverman@google.com>
2010-07-14 15:00:08 -07:00
Ben Pfaff
30f07f1a5e ofpbuf: New function ofpbuf_push_zeros(). 2010-04-26 14:57:49 -07:00
Ben Pfaff
0ab8e15fd7 ofpbuf: New function ofpbuf_to_string().
Useful for debugging.

From Jean Tourrilhes <jt@hpl.hp.com>.
2010-02-12 13:55:46 -08:00
Ben Pfaff
5019f688d4 ofpbuf: Mark ofpbuf_headroom(), ofpbuf_tailroom() parameters const. 2010-02-12 13:55:46 -08:00
Ben Pfaff
d45e9c65c6 ofpbuf: Rename ofpbuf "private" member for C++ header compatibility.
From partner.
2010-02-01 09:46:31 -08:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00