From afb3ff0092801294a8a7893c24440cfd321f6e56 Mon Sep 17 00:00:00 2001 From: ahothan Date: Sun, 24 Feb 2019 11:53:00 -0800 Subject: NFVBENCH-122 Allow config to have more dest MACs than chains requested Change-Id: I887cf14e76ae59abfec6fea5bd2181d8b3238d4c Signed-off-by: ahothan --- nfvbench/traffic_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py index 13ebfb7..58ae345 100755 --- a/nfvbench/traffic_client.py +++ b/nfvbench/traffic_client.py @@ -391,10 +391,11 @@ class GeneratorConfig(object): port_index: the port for which dest macs must be set dest_macs: a list of dest MACs indexed by chain id """ - if len(dest_macs) != self.config.service_chain_count: + if len(dest_macs) < self.config.service_chain_count: raise TrafficClientException('Dest MAC list %s must have %d entries' % (dest_macs, self.config.service_chain_count)) - self.devices[port_index].set_dest_macs(dest_macs) + # only pass the first scc dest MACs + self.devices[port_index].set_dest_macs(dest_macs[:self.config.service_chain_count]) LOG.info('Port %d: dst MAC %s', port_index, [str(mac) for mac in dest_macs]) def set_vtep_dest_macs(self, port_index, dest_macs): -- cgit 1.2.3-korg