Ask Your Question
0

How ODL knows switch's multiple flow tables capability

asked 2015-03-03 20:37:09 -0700

tech.kals gravatar image

updated 2015-03-03 21:04:44 -0700

Hi Experts,

1) I would like to know how ODL or any other controller knows the hardware capability? For eg, there might be n number of flow tables supported on the hardware, how the controller comes know about it?

2) will the controller knows about on which flow table, the entry needs to be programmed ?

3) Is the hardware capabilities are exchanged through TTP (Table Type Pattern) or using through the "switch capability message" ?

Thanks, tech.kals

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-03-03 21:33:13 -0700

faizan gravatar image

updated 2015-03-03 21:35:00 -0700

Hi :) For Point 1 and 3: Openflow enabled switches , Upon session establishment, the controller sends an OFPTFEATURESREQUEST message. This message does not contain a body beyond the OpenFlow header. The switch responds with an OFPTFEATURESREPLY message.

/* Switch features. / struct ofp_switch_features { struct ofp_header header; uint64_t datapath_id; / Datapath unique ID. The lower 48-bits are for a MAC address, while the upper 16-bits are implementer-defined. / uint32_t n_buffers; / Max packets buffered at once. / uint8_t n_tables; / Number of tables supported by datapath. / uint8_t auxiliary_id; / Identify auxiliary connections / uint8_t pad[2]; / Align to 64-bits. / / Features. / uint32_t capabilities; / Bitmap of support "ofpcapabilities". */ uint32t reserved; }; OFPASSERT(sizeof(struct ofpswitch_features) == 32);

The datapath_id field uniquely identifies a datapath. The lower 48 bits are intended for the switch MAC address, while the top 16 bits are up to the implementer. An example use of the top 16 bits would be a VLAN ID to distinguish multiple virtual switch instances on a single physical switch. This field should be treated as an opaque bit string by controllers.

The n_buffers field specifies the maximum number of packets the switch can buffer when sending packets to the controller using packet-in messages.

The n_tables field describes the number of tables supported by the switch, each of which can have a different set of supported match fields, actions and number of entries. When the controller and switch first communicate, the controller will find out how many tables the switch supports from the Features Reply.

If it wishes to understand the size, types, and order in which tables are consulted, the controller sends a OFPMPTABLEFEATURES multipart request. A switch must return these tables in the order the packets traverse the tables.

The capabilities field uses the following flags: /* Capabilities supported by the datapath. / enum ofp_capabilities { OFPC_FLOW_STATS = 1 << 0, / Flow statistics. / OFPC_TABLE_STATS = 1 << 1, / Table statistics. / OFPC_PORT_STATS = 1 << 2, / Port statistics. / OFPC_GROUP_STATS = 1 << 3, / Group statistics. / OFPC_IP_REASM = 1 << 5, / Can reassemble IP fragments. / OFPC_QUEUE_STATS = 1 << 6, / Queue statistics. / OFPC_PORT_BLOCKED = 1 << 8 / Switch will block looping ports. */ };

reference: OpenFlow Switch Specification

Regards, Faizan

edit flag offensive delete publish link more
0

answered 2015-03-03 22:43:06 -0700

Vishal Thapar gravatar image
  1. OFPT_FEATURES_REQUEST/REPLY are used to exchange basic capabilities like no. of tables, switch capabilities etc.

  2. Controller needs to be somewhat familiar with underlying switch's pipeline to know which tables to program because of reasons mentioned in 3.

  3. TTP is partially supported in ODL but most switches don't support it yet. OFPMT_TABLE_FEATURES is supported in some switches but not in OVS. Table Features support is also partially there in ODL. Once both are supported in ODL, what is actually used will depend more on what the switch supports. To answer your specific question, switch capabilities is the only way it is fully supported as of today.

edit flag offensive delete publish link more

Comments

Hi Vishal, Thanks for your reply. I have one more doubt... you have mentioned that "Table Features support is also partially there in ODL", it means what? how many tables can be supported by ODL ? where i can find its capability? will ODL supports Broadcom's OFDPA to support multiple flow tables? Can you please share your thoughts...

tech.kals ( 2015-03-06 00:07:05 -0700 )edit

ODL supports multiple flow tables [won't be OF1.3 compliant if it didn't]. But it doesn't fully support Table Features message. This should answer all your questions: https://lists.opendaylight.org/pipermail/openflowplugin-dev/2014-November/002224.html

Vishal Thapar ( 2015-03-08 21:30:43 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-03-03 20:37:09 -0700

Seen: 574 times

Last updated: Mar 03 '15