-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Rodrigo!
Comment inline.
On 05/08/2010 10:22 PM, Rodrigo Braga wrote:
| Hi Hellmich,
|
| I was looking ofp_flow_stats_request structure and there is a field
| out_port.
|
| struct ofp_flow_stats_request {
| struct ofp_match match; /* Fields to match. */
| uint8_t table_id; /* ID of table to read (from
ofp_table_stats)
| or 0xff for all tables. */
| uint8_t pad; /* Align to 32 bits. */
| uint16_t out_port; /* Require matching entries to include this
| as an output port. A value of
| OFPP_NONE
| indicates no restriction. */
| };
|
| So I think that request would be: flow_stats_request =
| {'dpid':dpid,'match':{'in_port':1},'out_port':port_number}
This is what I thought of and tried, too.
Turns out, I had to edit the nox-source.
In file src/nox/coreapps/pyrt/pyglue.cc I modified the function
template <>
ofp_flow_stats_request
from_python(PyObject *pyfsr)
It defined the out_port as fsr.out_port = ntohs(OFPP_NONE);
so it did not take my value into account.
I added
PyObject* out_port = PyDict_GetItemString(pyfsr, "out_port");
if (out_port) {
~ fsr.out_port = ntohs(from_python<uint16_t>(out_port));
}
to read the out_port value from python.
Now it works, I can filter by out_port!
Does anyone know why out_port is not read from python?
Kind regards
Martin
|
| regards
|
|
| On Sat, May 8, 2010 at 8:05 AM, Martin Hellmich
| <[email protected]
| <mailto:[email protected]>> wrote:
|
| Hi Rodrigo,
|
| yes, I saw that part, in pyflow_fetcher_wrap.cc, I think.
| It mentioned that this was an example, so I thought there may be
| other options avaivable.
|
| Could someone who is sure about the feature confirm that it is not
| possible to filter output port or point me in the reight direction
| how to do that?
| I think this feature would make some configuration much easier.
|
| Kind regards
| Martin
|
|
| Rodrigo Braga wrote:
| | Hi Hellmich,
| |
| | Have you read file
| nox/src/nox/netapps/flow_fetcher/pyflow_fetcher.i? there
| | is a brief description of flow_fetcher.
| |
| | I think that is not possible make request with out_port specified,
| because
| | the 'request' takes the form of below dictionary:
| |
| | # ofp_flow_stats_request, e.g.:
| | # {'table_id': ...table id...,
| | # 'match': {'in_port': 0,
| | # 'dl_src': 0x002320ed7e64,
| | # 'dl_dst': 0x002320ed7e65,
| | # 'dl_vlan': 0x234,
| | # 'dl_type': 0x0800,
| | # 'nw_proto': 17,
| | # 'nw_src': 0x525400123502,
| | # 'nw_dst': 0x525400123503,
| | # 'tp_src': 1234,
| | # 'tp_dst': 5678}}
| |
| | regards
| |
| | On Fri, May 7, 2010 at 1:54 PM, Martin Hellmich <
| | [email protected]
| <mailto:[email protected]>> wrote:
| |
| | Hello!
| |
| | I would like to use the method fetch from the module
| python_flow_fetcher
| | distributed with nox to fetch flows.
| |
| | It works fine, but I don't know the exact syntax for
| flow_stats_requests
| | and cannot find find them.
| |
| | It says in the OpenFlow spec that you can request flows with the
| output
| | port as a restriction.
| | I would like to do that?
| |
| | How do I extend flow_stats_request =
| {'dpid':dpid,'match':{'in_port':1}}
| | to only get flow that are sent out port number 2?
| |
| | Thank you very much!
| | Martin
| |>
| _______________________________________________
| nox-dev mailing list
| [email protected] <mailto:[email protected]>
| http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
| |>
|
| --
| Rodrigo de Souza Braga
| Mestrando em Ciência da Computação
| Universidade Federal do Amazonas - UFAM
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkvny5kACgkQDjfQqnl9snBjIQCfQ6uhqgiQYpiVdOkYZROsX/Ql
SaMAn14OXMOAm4FnahqsskvtHmQpLYiy
=sekb
-----END PGP SIGNATURE-----
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org