<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Afer create flow message successly, how to send it to specific DataPath? in Software Defined Networking</title>
    <link>https://community.hpe.com/t5/software-defined-networking/afer-create-flow-message-successly-how-to-send-it-to-specific/m-p/6617016#M1606</link>
    <description>&lt;P&gt;Hi,ALL!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Where's the problem with below codes? The codes can't send flow message to specific DataPath! Why function "sendFlowMode" return null? &amp;nbsp;How can i send flow to specific DataPath?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Construct OfmMutableFlowMod&amp;nbsp;&lt;/P&gt;&lt;P&gt;OfmMutableFlowMod mod = (OfmMutableFlowMod) MessageFactory .create(pv, MessageType.FLOW_MOD);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Assemble the match fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add the values to flow mod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Convert to Immutable&lt;/P&gt;&lt;P&gt;OfmFlowMod flow = (OfmFlowMod)mod.toImmutable();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;//Call the method, below codes don't work!&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;DataPathId dpid=DataPathId.valueof("00:03:9c:b6:54:cb:c6:80");&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;ControllerService cs =new ControllerServiceAdapter();&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;MessageFuture mf=cs.sendFlowMod(flow,dpid); &amp;nbsp;//return mf is null&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Sep 2014 14:48:41 GMT</pubDate>
    <dc:creator>harcy</dc:creator>
    <dc:date>2014-09-15T14:48:41Z</dc:date>
    <item>
      <title>Afer create flow message successly, how to send it to specific DataPath?</title>
      <link>https://community.hpe.com/t5/software-defined-networking/afer-create-flow-message-successly-how-to-send-it-to-specific/m-p/6617016#M1606</link>
      <description>&lt;P&gt;Hi,ALL!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Where's the problem with below codes? The codes can't send flow message to specific DataPath! Why function "sendFlowMode" return null? &amp;nbsp;How can i send flow to specific DataPath?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Construct OfmMutableFlowMod&amp;nbsp;&lt;/P&gt;&lt;P&gt;OfmMutableFlowMod mod = (OfmMutableFlowMod) MessageFactory .create(pv, MessageType.FLOW_MOD);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Assemble the match fields&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Add the values to flow mod&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Convert to Immutable&lt;/P&gt;&lt;P&gt;OfmFlowMod flow = (OfmFlowMod)mod.toImmutable();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;//Call the method, below codes don't work!&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;DataPathId dpid=DataPathId.valueof("00:03:9c:b6:54:cb:c6:80");&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;ControllerService cs =new ControllerServiceAdapter();&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN class="login-bold"&gt;MessageFuture mf=cs.sendFlowMod(flow,dpid); &amp;nbsp;//return mf is null&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 14:48:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/afer-create-flow-message-successly-how-to-send-it-to-specific/m-p/6617016#M1606</guid>
      <dc:creator>harcy</dc:creator>
      <dc:date>2014-09-15T14:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Afer create flow message successly, how to send it to specific DataPath?</title>
      <link>https://community.hpe.com/t5/software-defined-networking/afer-create-flow-message-successly-how-to-send-it-to-specific/m-p/6624292#M1607</link>
      <description>&lt;P&gt;Hello harcy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since sendFlowMod() function is returning null so please check if the argument for this function i.e. flow as well as dpid have proper values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per Programming guide page 31 you can use&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;private ControllerService cs = ...;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can have private static ControllerService mControllerService;&amp;nbsp; in your class and initialize that member and call sendFlowMod function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you still face the issue please share the exact code for flow creation and for dpid initialization.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;HP SDN Team&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 06:47:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/software-defined-networking/afer-create-flow-message-successly-how-to-send-it-to-specific/m-p/6624292#M1607</guid>
      <dc:creator>sdnindia</dc:creator>
      <dc:date>2014-09-19T06:47:41Z</dc:date>
    </item>
  </channel>
</rss>

