[ovs-dev] [PATCH] ofp-parse: Set max_len after the port string is parsed in parse_output.

Ben Pfaff blp at nicira.com
Tue Dec 24 17:37:48 UTC 2013


Oh, I see now, the test needs to happen after setting the port number.

Thanks, I'll apply this in a minute.

On Tue, Dec 24, 2013 at 10:17:44AM +0900, Daisuke Kotani wrote:
> The entire packets are sent to the controller when the packets match
> a flow which is set by ovs-ofctl and includes
> actions=output:CONTROLLER.
> 
> Without this patch, output->max_len is always zero, and no packet is
> sent to the controller.
> 
> Thanks,
> 
> Daisuke
> 
> (2013/12/24 3:44), Ben Pfaff wrote:
> >Can you explain what user-visible change this produces?
> >
> >Thanks,
> >
> >Ben.
> >
> >On Mon, Dec 23, 2013 at 06:19:48PM +0900, Daisuke Kotani wrote:
> >>This patch allows to set max_len to UINT16_MAX in parse_output
> >>if output port is OFPP_CONTROLLER.
> >>
> >>Signed-off-by: Daisuke Kotani <kotani at net.ist.i.kyoto-u.ac.jp>
> >>---
> >>  lib/ofp-parse.c |    2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
> >>index 6b69ecd..251adfa 100644
> >>--- a/lib/ofp-parse.c
> >>+++ b/lib/ofp-parse.c
> >>@@ -212,10 +212,10 @@ parse_output(const char *arg, struct ofpbuf *ofpacts)
> >>          struct ofpact_output *output;
> >>
> >>          output = ofpact_put_OUTPUT(ofpacts);
> >>-        output->max_len = output->port == OFPP_CONTROLLER ? UINT16_MAX : 0;
> >>          if (!ofputil_port_from_string(arg, &output->port)) {
> >>              return xasprintf("%s: output to unknown port", arg);
> >>          }
> >>+        output->max_len = output->port == OFPP_CONTROLLER ? UINT16_MAX : 0;
> >>          return NULL;
> >>      }
> >>  }
> 
> 
> -- 
> Daisuke Kotani / kotani at net.ist.i.kyoto-u.ac.jp
> Ph.D Student
> Network Media Group,
> Department of Intelligence Science and Technology,
> Graduate School of Informatics, Kyoto University
> http://www.ecchu.jp/~daisuke/



More information about the dev mailing list