Skip to content

Commit

Permalink
Merge into master from pull request floodlight#41:
Browse files Browse the repository at this point in the history
pipeline_bvs: match on dst mac to send slow protocols packets to controller (https://github.com/bigswitch/ivs/pull/41)
  • Loading branch information
abat committed Feb 7, 2014
2 parents 0d4b9e4 + 2eb4adc commit 53688ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/pipeline_bvs/module/src/pipeline_bvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enum table_id {
};

static const bool flood_on_dlf = true;
static const of_mac_addr_t slow_protocols_mac = { { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 } };

static indigo_error_t process_l3( struct ind_ovs_cfr *cfr, uint32_t hash, struct pipeline_result *result);
static indigo_error_t lookup_l2( uint16_t vlan_vid, const uint8_t *eth_addr, uint32_t *port_no, uint32_t *group_id);
Expand Down Expand Up @@ -77,12 +78,18 @@ pipeline_bvs_process(struct ind_ovs_cfr *cfr,
{
uint32_t hash = murmur_hash(cfr, sizeof(*cfr), 0);

if (cfr->dl_type == htons(0x88cc) || cfr->dl_type == htons(0x8809)) {
if (cfr->dl_type == htons(0x88cc)) {
AIM_LOG_VERBOSE("sending ethertype %#x directly to controller", ntohs(cfr->dl_type));
pktin(result, OF_PACKET_IN_REASON_ACTION);
return INDIGO_ERROR_NONE;
}

if (!memcmp(cfr->dl_dst, slow_protocols_mac.addr, OF_MAC_ADDR_BYTES)) {
AIM_LOG_VERBOSE("sending slow protocols packet directly to controller");
pktin(result, OF_PACKET_IN_REASON_ACTION);
return INDIGO_ERROR_NONE;
}

uint16_t default_vlan_vid;
uint32_t lag_id;
bool disable_src_mac_check;
Expand Down

0 comments on commit 53688ba

Please sign in to comment.