From 74cacf6067201633fa1eefd84aabfb6f3385465f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 10 Sep 2008 19:59:26 -0700 Subject: [PATCH] Get rid of OFP_MAXLEN. Statistics or vendor extensions can fill up the whole 64 kB. --- include/openflow.h | 5 ----- lib/dpif.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/openflow.h b/include/openflow.h index e77dd714..6f38ec8b 100644 --- a/include/openflow.h +++ b/include/openflow.h @@ -60,11 +60,6 @@ #define OFP_PACKED /* SWIG doesn't understand __attribute. */ #endif -/* Maximum length of a OpenFlow packet. */ -#define OFP_MAXLEN (sizeof(struct ofp_switch_features) \ - + (sizeof(struct ofp_phy_port) * OFPP_MAX) + 200) - - /* The most significant bit being set in the version field indicates an * experimental OpenFlow version. */ diff --git a/lib/dpif.c b/lib/dpif.c index 4f993123..4a60334a 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -111,7 +111,7 @@ static const struct nl_policy openflow_policy[] = { [DP_GENL_A_DP_IDX] = { .type = NL_A_U32 }, [DP_GENL_A_OPENFLOW] = { .type = NL_A_UNSPEC, .min_len = sizeof(struct ofp_header), - .max_len = OFP_MAXLEN }, + .max_len = 65535 }, }; /* Tries to receive an openflow message from the kernel on 'sock'. If -- 2.30.2