Hi,

My environment is below,
ovs version : 2.9.5
ryu -  4.32

simple_switch_15 works fine..
But I am trying to test the flow stats request/reply msg with openflow 1.5
protocol. i run along with simple_switch_15.
flow stats reply doesnt come.  when i capture the wireshark traces,
STATS_REQUEST MULTIPART MSG was wrong and switch responds with OFP ERROR
response message.
wireshark traces attached for your reference.

Please let me know what could be wrong.


thanks
suresh



-- 

*Regards, *
*Knet solutions.*
*UDEMY SDN Training Course:  UDEMY LINK
<https://www.udemy.com/beginners-sdn-course-with-ryu-controller-practical-handson/?couponCode=TEN_DOLLAR>*
Whatsapp/Mobile:  +919445042007
website:  http://knetsolutions.in/
Facebook Page :   https://www.facebook.com/sdntraining/

<https://www.youtube.com/channel/UCTD6X9_oDqIYs_xpE7moFnQ>
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_5
from ryu.lib import hub
import os
import time
import csv
import math 

INTERVAL = 10
keystore = {}

class FlowStats(app_manager.RyuApp):
    OFP_VERSIONS = [ofproto_v1_5.OFP_VERSION]

    def __init__(self, *args, **kwargs):
        super(FlowStats, self).__init__(*args, **kwargs)
        self.datapaths = {}
        self.monitor_thread = hub.spawn(self._monitor)

    def _monitor(self):
        while True:
            self.logger.info(" start monitoring")
            for dp in self.datapaths.values():
                self.request_flow_metrics(dp)
            hub.sleep(INTERVAL)

    def request_flow_metrics(self, datapath):
        ofp = datapath.ofproto
        ofp_parser = datapath.ofproto_parser
        #print ofp_parser
        req = ofp_parser.OFPFlowStatsRequest(datapath)
        print req
        datapath.send_msg(req)

    @set_ev_cls([ofp_event.EventOFPFlowStatsReply], MAIN_DISPATCHER)
    def flow_stats_reply_handler(self, ev):
        print "received flow-stats-reply", ev.msg
        flows = ev.msg.body
        dpid = ev.msg.datapath.id
        self.parse_flows(dpid, flows)


    @set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)
    def switch_features_handler(self, ev):
        datapath = ev.msg.datapath
        ofproto = datapath.ofproto
        parser = datapath.ofproto_parser
        self.datapaths[datapath.id] = datapath

Attachment: test.pcap
Description: application/vnd.tcpdump.pcap

_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to