++log ++change gen_testdata.py
This commit is contained in:
parent
7599ebb89d
commit
c243778bc3
2 changed files with 69 additions and 4 deletions
23
netpfga/minip4/testdata/gen_testdata-port1.py
vendored
23
netpfga/minip4/testdata/gen_testdata-port1.py
vendored
|
|
@ -103,20 +103,35 @@ lookup_table = {
|
|||
def test_port1():
|
||||
""" packets for a certain mac always go to nf0 """
|
||||
pktCnt = 0
|
||||
|
||||
# First ethernet
|
||||
pktCnt += 1
|
||||
pkt = Ether(dst=MAC2, src=MAC1)
|
||||
pkt = pad_pkt(pkt, 64)
|
||||
|
||||
# Send on nf0
|
||||
pktCnt += 1
|
||||
applyPkt(pkt, 'nf0', pktCnt)
|
||||
|
||||
pktCnt += 1
|
||||
# Receive on nf0
|
||||
expPkt(pkt, 'nf0')
|
||||
|
||||
# Send on nf1
|
||||
pktCnt += 1
|
||||
applyPkt(pkt, 'nf1', pktCnt)
|
||||
|
||||
# Receive on nf0
|
||||
expPkt(pkt, 'nf0')
|
||||
|
||||
# Send on nf2
|
||||
pktCnt += 1
|
||||
applyPkt(pkt, 'nf2', pktCnt)
|
||||
|
||||
# Receive on nf0
|
||||
expPkt(pkt, 'nf0')
|
||||
|
||||
# Send on nf3
|
||||
pktCnt += 1
|
||||
applyPkt(pkt, 'nf2', pktCnt)
|
||||
|
||||
# Receive on nf0
|
||||
expPkt(pkt, 'nf0')
|
||||
|
||||
# Test that packets are being mirrored
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue