Commit d564a295e2b191ceb0dc944feaa60f055589dd64

Authored by adumas
1 parent 648f6599

new wildcard

src/main/java/net/floodlightcontroller/pelstats/PELStats.java
... ... @@ -167,11 +167,11 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
167 167 if (!portsCalls.contains(new Integer(port))){ //if the call isn't already assigned to a queue and we want to add new calls to queue
168 168 System.out.println("@PELStats: \tport add: "+port);
169 169 sendOFFlowMod(sw,port);
170   - }
171   - //Updating the ports calls map
172   - portsCalls.add(port);
173   - portsCallsMap.put(sw, portsCalls);
174   -
  170 +
  171 + //Updating the ports calls map
  172 + portsCalls.add(port);
  173 + portsCallsMap.put(sw, portsCalls);
  174 + }
175 175  
176 176 }
177 177 else{
... ... @@ -248,7 +248,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
248 248 return Command.CONTINUE;
249 249 }
250 250 private void sendOFFlowMod(IOFSwitch sw,int port){
251   - //System.out.println("@PELStats,sendOFFlowMod: trying to craft message");
  251 + //System.out.println("@PELStats,sendOFFlowMod: trying to craft message");
252 252 //OpenFlow message for flow tables modifications
253 253 //
254 254 OFFlowMod OFmessage= new OFFlowMod();
... ... @@ -259,7 +259,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
259 259 OFmessage.setCookie(0);
260 260 OFmessage.setIdleTimeout((short) 0);
261 261 OFmessage.setHardTimeout((short)0);
262   - OFmessage.setPriority((short)0);//queueInfos.get(sw).get(1).shortValue());
  262 + OFmessage.setPriority((short)0xffff);//queueInfos.get(sw).get(1).shortValue());
263 263 OFmessage.setBufferId(0);
264 264 OFmessage.setOutPort((short)0xffff);
265 265 OFmessage.setFlags((short) 0);
... ... @@ -268,12 +268,14 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
268 268 OFmatch.setTransportSource((short)port);
269 269  
270 270  
  271 +
271 272 OFmatch.setWildcards(OFMatch.OFPFW_ALL - OFMatch.OFPFW_IN_PORT
272 273 - OFMatch.OFPFW_TP_SRC - OFMatch.OFPFW_NW_PROTO
273   - - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE);
  274 + - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE);//*/
274 275 OFmatch.setNetworkProtocol((byte)0x11);
275 276 OFmatch.setDataLayerType((short)0x0800);
276 277 OFmatch.setDataLayerVirtualLanPriorityCodePoint((byte)0x0);
  278 +
277 279 OFmatch.setInputPort((short)1);
278 280 OFmessage.setMatch(OFmatch);
279 281  
... ... @@ -301,7 +303,7 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
301 303 OFmessage.setCookie(0);
302 304 OFmessage.setIdleTimeout((short) 0);
303 305 OFmessage.setHardTimeout((short)0);
304   - OFmessage.setPriority((short)0);
  306 + OFmessage.setPriority((short)0xffff);
305 307 OFmessage.setBufferId(0);
306 308 OFmessage.setOutPort((short)0xffff);
307 309 OFmessage.setFlags((short) 0);
... ... @@ -310,12 +312,14 @@ public class PELStats implements IFloodlightModule, IOFMessageListener, RestAPIP
310 312 OFmatch.setTransportSource((short)port);
311 313  
312 314  
  315 +
313 316 OFmatch.setWildcards(OFMatch.OFPFW_ALL - OFMatch.OFPFW_IN_PORT
314 317 - OFMatch.OFPFW_TP_SRC - OFMatch.OFPFW_NW_PROTO
315   - - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE);
  318 + - OFMatch.OFPFW_DL_VLAN_PCP -OFMatch.OFPFW_DL_TYPE);//*/
316 319 OFmatch.setNetworkProtocol((byte)0x11);
317 320 OFmatch.setDataLayerType((short)0x0800);
318 321 OFmatch.setDataLayerVirtualLanPriorityCodePoint((byte)0x0);
  322 +
319 323 OFmatch.setInputPort((short)2);
320 324 OFmessage.setMatch(OFmatch);
321 325  
... ...
src/main/java/net/floodlightcontroller/pelstats/rest/RESTQueue.java
... ... @@ -233,7 +233,7 @@ public class RESTQueue extends ServerResource{
233 233 OFmessage.setCookie(0);
234 234 OFmessage.setIdleTimeout((short) 0);
235 235 OFmessage.setHardTimeout((short)0);
236   - OFmessage.setPriority((short)priority);
  236 + OFmessage.setPriority((short)0xffff);
237 237 OFmessage.setBufferId(0);
238 238 OFmessage.setOutPort((short)0xffff);
239 239 OFmessage.setFlags((short) 0);
... ... @@ -288,8 +288,8 @@ public class RESTQueue extends ServerResource{
288 288 OFmessage.setCookie(0);
289 289 OFmessage.setIdleTimeout((short) 0);
290 290 OFmessage.setHardTimeout((short)0);
291   - OFmessage.setPriority((short)-1);
292   - OFmessage.setBufferId(0);
  291 + OFmessage.setPriority((short)0xffff);
  292 + OFmessage.setBufferId(0xffffffff);
293 293 OFmessage.setOutPort((short)0xffff);
294 294 OFmessage.setFlags((short) 0);
295 295  
... ...