use only port1 / nf0

This commit is contained in:
Nico Schottelius 2019-07-21 12:27:10 +02:00
parent 6d212abe4d
commit 89e0576d22

View file

@ -43,7 +43,7 @@ nf_id_map = {
sss_sdnet_tuples.clear_tuple_files() sss_sdnet_tuples.clear_tuple_files()
def applyPkt(pkt, ingress, time): def applyPkt(pkt, ingress, time):
print("Applying pkt on {} at {}".format(ingress, time)) print("Applying pkt on {} at {}: ".format(ingress, time))
pktsApplied.append(pkt) pktsApplied.append(pkt)
sss_sdnet_tuples.sume_tuple_in['src_port'] = nf_port_map[ingress] sss_sdnet_tuples.sume_tuple_in['src_port'] = nf_port_map[ingress]
sss_sdnet_tuples.sume_tuple_expect['src_port'] = nf_port_map[ingress] sss_sdnet_tuples.sume_tuple_expect['src_port'] = nf_port_map[ingress]
@ -78,6 +78,7 @@ def write_pcap_files():
if (len(nf_expected[i]) > 0): if (len(nf_expected[i]) > 0):
wrpcap('nf{0}_expected.pcap'.format(i), nf_expected[i]) wrpcap('nf{0}_expected.pcap'.format(i), nf_expected[i])
# i = 0..3
for i in nf_applied.keys(): for i in nf_applied.keys():
print "nf{0}_applied times: ".format(i), [p.time for p in nf_applied[i]] print "nf{0}_applied times: ".format(i), [p.time for p in nf_applied[i]]
@ -107,8 +108,8 @@ def test_port1():
pkt = Ether(dst=MAC2, src=MAC1) pkt = Ether(dst=MAC2, src=MAC1)
pkt = pad_pkt(pkt, 64) pkt = pad_pkt(pkt, 64)
for inport in [ 'nf0', 'nf1', 'nf2', 'nf3' ]: # for inport in [ 'nf0', 'nf1', 'nf2', 'nf3' ]:
# for inport in [ 'nf0' ]: for inport in [ 'nf0' ]:
# Send on nf0..nf3 # Send on nf0..nf3
applyPkt(pkt, inport, pktCnt) applyPkt(pkt, inport, pktCnt)
@ -118,5 +119,4 @@ def test_port1():
pktCnt += 1 pktCnt += 1
test_port1() test_port1()
write_pcap_files() write_pcap_files()