-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move pktgen.bess to conf dir and use sim utils
- Moved ddp-rss-pktgen.bess from bessctl to conf dir - Remove duplicate code and use utils in sim.py Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
- Loading branch information
Showing
4 changed files
with
34 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
docker run --name pktgen -td --restart unless-stopped \ | ||
--cpuset-cpus=15-16 --ulimit memlock=-1 --cap-add IPC_LOCK \ | ||
-v /dev/hugepages:/dev/hugepages -v "$PWD/conf":/opt/bess/bessctl/conf \ | ||
--device=/dev/vfio/vfio --device=/dev/vfio/176 \ | ||
upf-epc-bess:"$(<VERSION)" -grpc-url=0.0.0.0:10514 | ||
""" | ||
|
||
import conf.sim as sim | ||
|
||
# flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end | ||
n39_pkts = [sim.gen_gtpu_packet(128, "22:53:7a:15:58:50", "9e:b2:d3:34:ab:27", "11.1.1.129", "198.18.0.1", "16.0.0.1", "9.9.9.9", 0x123456),] | ||
n36_pkts = [sim.gen_gtpu_packet(128, "22:53:7a:15:58:50", "9e:b2:d3:34:ab:27", "11.1.1.129", "198.18.0.1", "16.0.0.1", "6.6.6.6", 0x123456),] | ||
|
||
# flow create 1 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end | ||
n9_pkts = [sim.gen_gtpu_packet(128, "22:53:7a:15:58:50", "c2:9c:55:d4:8a:f6", "13.1.1.199", "198.19.0.1", "9.9.9.9", "16.0.0.1", 0x123456),] | ||
|
||
#flow create 1 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end | ||
n6_pkts = [sim.gen_inet_packet(128, "22:53:7a:15:58:50", "c2:9c:55:d4:8a:f6", "6.6.6.6", "16.0.0.1"),] | ||
|
||
p = PMDPort(port_id=0) | ||
pout::PortOut(port=p.name) | ||
|
||
n3seq_kwargs = sim.gen_gtpu_sequpdate_args(5000, "16.0.0.1", 62, 0x30000000) | ||
n9seq_kwargs = sim.gen_gtpu_sequpdate_args(5000, "16.0.0.1", 66, 0x90000000) | ||
n6seq_kwargs = sim.gen_inet_sequpdate_args(5000, "16.0.0.1") | ||
|
||
Source() -> Rewrite(templates=n39_pkts) -> n39update::SequentialUpdate(**n3seq_kwargs) -> L4Checksum() -> IPChecksum() -> pout | ||
Source() -> Rewrite(templates=n36_pkts) -> n36update::SequentialUpdate(**n3seq_kwargs) -> L4Checksum() -> IPChecksum() -> pout | ||
|
||
Source() -> Rewrite(templates=n9_pkts) -> n9update::SequentialUpdate(**n9seq_kwargs) -> L4Checksum() -> IPChecksum() -> pout | ||
Source() -> Rewrite(templates=n6_pkts) -> n6update::SequentialUpdate(**n6seq_kwargs) -> L4Checksum() -> IPChecksum() -> pout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters