summaryrefslogtreecommitdiff
path: root/lib/ofp-errors.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2015-03-02 17:29:44 -0800
committerPravin B Shelar <pshelar@nicira.com>2015-03-03 13:37:39 -0800
commit6fd6ed71cb9f2dba8307da371d5e86c34695783c (patch)
treef531082ec70f33a24c7d7e62c615d8234a0145f3 /lib/ofp-errors.c
parentcf62fa4c7074121184a1f1d07980990113657612 (diff)
downloadopenvswitch-6fd6ed71cb9f2dba8307da371d5e86c34695783c.tar.gz
ofpbuf: Simplify ofpbuf API.
ofpbuf was complicated due to its wide usage across all layers of OVS, Now we have introduced independent dp_packet which can be used for datapath packet, we can simplify ofpbuf. Following patch removes DPDK mbuf and access API of ofpbuf members. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofp-errors.c')
-rw-r--r--lib/ofp-errors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ofp-errors.c b/lib/ofp-errors.c
index ce85f6758..615910520 100644
--- a/lib/ofp-errors.c
+++ b/lib/ofp-errors.c
@@ -327,8 +327,8 @@ ofperr_decode_msg(const struct ofp_header *oh, struct ofpbuf *payload)
/* Translate the error type and code into an ofperr. */
error = ofperr_decode(oh->version, vendor, type, code);
if (error && payload) {
- ofpbuf_init(payload, ofpbuf_size(&b));
- ofpbuf_push(payload, ofpbuf_data(&b), ofpbuf_size(&b));
+ ofpbuf_init(payload, b.size);
+ ofpbuf_push(payload, b.data, b.size);
}
return error;
}