From: Ben Pfaff Date: Thu, 11 Sep 2008 02:59:26 +0000 (-0700) Subject: Get rid of OFP_MAXLEN. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=74cacf6067201633fa1eefd84aabfb6f3385465f;p=openvswitch Get rid of OFP_MAXLEN. Statistics or vendor extensions can fill up the whole 64 kB. --- 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