From: Ben Pfaff Date: Tue, 15 Jul 2008 19:43:59 +0000 (-0700) Subject: Prevent switch implementations from complaining about echo-reply messages. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a304614f57ff4637f5818dfad3f3ac3d2ec1e578;p=openvswitch Prevent switch implementations from complaining about echo-reply messages. Thanks to Reid Price for reporting the issue (which only caused spurious warning messages). --- diff --git a/datapath/forward.c b/datapath/forward.c index 4c43cd91..ac044464 100644 --- a/datapath/forward.c +++ b/datapath/forward.c @@ -361,6 +361,13 @@ recv_echo_request(struct sw_chain *chain, const struct sender *sender, return dp_send_echo_reply(chain->dp, sender, msg); } +static int +recv_echo_reply(struct sw_chain *chain, const struct sender *sender, + const void *msg) +{ + return 0; +} + static int add_flow(struct sw_chain *chain, const struct ofp_flow_mod *ofm) { @@ -495,6 +502,10 @@ fwd_control_input(struct sw_chain *chain, const struct sender *sender, sizeof (struct ofp_header), recv_echo_request, }, + [OFPT_ECHO_REPLY] = { + sizeof (struct ofp_header), + recv_echo_reply, + }, }; const struct openflow_packet *pkt; diff --git a/switch/datapath.c b/switch/datapath.c index 487677a6..3d639ff2 100644 --- a/switch/datapath.c +++ b/switch/datapath.c @@ -1501,6 +1501,13 @@ recv_echo_request(struct datapath *dp, const struct sender *sender, return send_openflow_buffer(dp, make_echo_reply(oh), sender); } +static int +recv_echo_reply(struct datapath *dp UNUSED, const struct sender *sender UNUSED, + const void *oh UNUSED) +{ + return 0; +} + /* 'msg', which is 'length' bytes long, was received from the control path. * Apply it to 'chain'. */ int @@ -1545,6 +1552,10 @@ fwd_control_input(struct datapath *dp, const struct sender *sender, sizeof (struct ofp_header), recv_echo_request, }, + [OFPT_ECHO_REPLY] = { + sizeof (struct ofp_header), + recv_echo_reply, + }, }; const struct openflow_packet *pkt;