...
Once the upgrade is done, reload the box. You will of course lose your ssh session. But once it is back, login again to configure the OpenFlow instance.
CPqD Software Switch
The goal of this project was to demonstrate SDN control of segment routing on switching hardware that exists today. We did that with the Dell 4810 switches. However, during controller development we mostly relied on a software switch that could emulate the Hardware Abstraction Layer that the Dell team was building the FTOS to support. In other words, we needed a software switch that we could put in Mininet, and point to the controller as part of a segment routed network. But more importantly the software switch had to emulate the hardware pipeline, so that when we actually moved to hardware switches, there would be minimal changes in the controller.
In reality the hardware switching ASIC has tens of tables. The controller does not need to know all the tables, registers etc. Many of the tables can be abstracted away by creating the right Hardware Abstraction Layer. Think of it as the contract between the controller and the switch – the switch supports the HAL and the controller programs the switch according to the HAL. In OpenFlow terms such a HAL is known as a Typed Table Pipeline (TTP). For more project we developed our own TTP known as the SPRING-OPEN TTP.
Download the source code
Code Block language text git clone https://github.com/CPqD/ofsoftswitch13.git
Go back to the specific version of Cpqd
Code Block language text git checkout f308c28242de57502f06d3dee80ce47ac17b6603
Apply Download the following patch
Code Block language text title patchfile_cpqd collapse true diff --git oflib/oxm-match.c oflib/oxm-match.c index e21edaa..d763cf9 100644 --- oflib/oxm-match.c +++ oflib/oxm-match.c @@ -202,14 +202,22 @@ oxm_prereqs_ok(const struct oxm_field *field, const struct ofl_match *rule) return false; } + /* Check for eth_type */ if (!field->dl_type[0]) return true; + else if (field->dl_type[0] == htons(0x8847)) + // quick-fix:ignore check for ethtpe when setting mpls label-id + // needs a cleaner solution which checks for a push-mpls action before the set + return true; else { HMAP_FOR_EACH_WITH_HASH (omt, struct ofl_match_tlv, hmap_node, hash_int(OXM_OF_ETH_TYPE, 0), &rule->match_fields) { uint16_t eth_type; memcpy(ð_type, omt->value, sizeof(uint16_t)); + //VLOG_INFO_RL(LOG_MODULE,&rl, "field-dltype %x ethtype %x htons %x", field->dl_type[0], + // eth_type, htons(eth_type)); + if (field->dl_type[0] == htons(eth_type)) { return true; } else if (field->dl_type[1] && field->dl_type[1] == htons(eth_type)) { @@ -349,7 +357,8 @@ parse_oxm_entry(struct ofl_match *match, const struct oxm_field *f, case OFI_OXM_OF_IPV4_SRC_W: case OFI_OXM_OF_ARP_SPA_W: case OFI_OXM_OF_ARP_TPA_W: - ofl_structs_match_put32m(match, f->header, *((uint32_t*) value), *((uint32_t*) mask)); + // note that the mask is bitwise notted to match 1.3 description of mask + ofl_structs_match_put32m(match, f->header, *((uint32_t*) value), ~(*((uint32_t*) mask))); return 0; case OFI_OXM_OF_ARP_SHA: case OFI_OXM_OF_ARP_THA:
You can apply the patch with the commandIf you save it as a file (patchfile_cpqd), then you can apply the patch as following
Code Block language text patch -p0 < ../patchfile_cpqd
- Build it following the README.md file in the directory
...