Пример #1
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for spp-primary application container")

    parser = app_helper.add_eal_args(parser)

    # Application specific arguments
    parser.add_argument('-n',
                        '--nof-ring',
                        type=int,
                        default=10,
                        help='Maximum number of Ring PMD')
    parser.add_argument('-p', '--port-mask', type=str, help='Port mask')
    parser.add_argument('-dv',
                        '--dev-vhost-ids',
                        type=str,
                        help='vhost device IDs')
    parser.add_argument('-dt',
                        '--dev-tap-ids',
                        type=str,
                        help='TAP device IDs')
    parser.add_argument('-ip',
                        '--ctrl-ip',
                        type=str,
                        help="IP address of SPP controller")
    parser.add_argument('--ctrl-port',
                        type=int,
                        default=5555,
                        help="Port of SPP controller")

    parser = app_helper.add_sppc_args(parser)

    return parser.parse_args()
Пример #2
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for spp-primary application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific arguments
    parser.add_argument('-n',
                        '--nof-ring',
                        type=int,
                        default=10,
                        help='Maximum number of Ring PMD')
    parser.add_argument('-p', '--port-mask', type=str, help='Port mask')
    parser.add_argument('-ip',
                        '--ctl-ip',
                        type=str,
                        help="IP address of spp-ctl")
    parser.add_argument('--ctl-port',
                        type=int,
                        default=5555,
                        help="Port for primary of spp-ctl")

    parser = app_helper.add_sppc_args(parser)
    return parser.parse_args()
Пример #3
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for spp-vm application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific arguments
    parser.add_argument(
        '-i', '--sec-id',
        type=int,
        help='Secondary ID')
    parser.add_argument(
        '-ip', '--ctrl-ip',
        type=str,
        help="IP address of SPP controller")
    parser.add_argument(
        '--ctrl-port',
        type=int,
        default=6666,
        help="Port of SPP controller")
    parser.add_argument(
        '-p', '--port-mask',
        type=str,
        help="Port mask")

    parser = app_helper.add_sppc_args(parser)

    return parser.parse_args()
Пример #4
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for suricata container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)
    parser = app_helper.add_sppc_args(parser)
    return parser.parse_args()
Пример #5
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for l2fwd application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # No application specific args for helloworld

    parser = app_helper.add_sppc_args(parser)
    return parser.parse_args()
Пример #6
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for l2fwd application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific args
    parser.add_argument('-p', '--port-mask', type=str, help="Port mask")

    parser = app_helper.add_sppc_args(parser)
    return parser.parse_args()
Пример #7
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for pktgen-dpdk application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    parser.add_argument(
        '-s',
        '--pcap-file',
        type=str,
        help="PCAP packet flow file of port, defined as 'N:filename'")
    parser.add_argument('-f',
                        '--script-file',
                        type=str,
                        help="Pktgen script (.pkt) to or a Lua script (.lua)")
    parser.add_argument('-lf',
                        '--log-file',
                        type=str,
                        help="Filename to write a log, as '-l' of pktgen")
    parser.add_argument('-P',
                        '--promiscuous',
                        action='store_true',
                        help="Enable PROMISCUOUS mode on all ports")
    parser.add_argument(
        '-G',
        '--sock-default',
        action='store_true',
        help="Enable socket support using default server values of " +
        "localhost:0x5606")
    parser.add_argument(
        '-g',
        '--sock-address',
        type=str,
        help="Same as -G but with an optional IP address and port number")
    parser.add_argument('-T',
                        '--term-color',
                        action='store_true',
                        help="Enable color terminal output in VT100")
    parser.add_argument('-N',
                        '--numa',
                        action='store_true',
                        help="Enable NUMA support")
    parser.add_argument('--matrix',
                        type=str,
                        help="Matrix of cores and port as '-m' of pktgen, " +
                        "such as [1:2].0 or 1.0")

    parser = app_helper.add_sppc_args(parser)
    return parser.parse_args()
Пример #8
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for l3fwd-acl application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific args
    parser.add_argument('-p',
                        '--port-mask',
                        type=str,
                        help='(Mandatory) Port mask')
    parser.add_argument(
        '--config',
        type=str,
        help='(Mandatory) Define set of port, queue, lcore for ports')
    parser.add_argument(
        '-P',
        '--promiscous',
        action='store_true',
        help='Set all ports to promiscous mode (default is None)')
    parser.add_argument('--rule_ipv4',
                        type=str,
                        help='Specifies the IPv4 ACL and route rules file')
    parser.add_argument('--rule_ipv6',
                        type=str,
                        help='Specifies the IPv6 ACL and route rules file')
    parser.add_argument('--scalar',
                        action='store_true',
                        help='Use a scalar function to perform rule lookup')
    parser.add_argument(
        '--enable-jumbo',
        action='store_true',
        help='Enable jumbo frames, [--enable-jumbo [--max-pkt-len PKTLEN]]')
    parser.add_argument(
        '--max-pkt-len',
        type=int,
        help='Max packet length (64-9600) if jumbo is enabled.')
    parser.add_argument('--no-numa',
                        action='store_true',
                        help='Disable NUMA awareness (default is None)')

    parser = app_helper.add_sppc_args(parser)

    return parser.parse_args()
Пример #9
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for load-balancer application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific args
    parser.add_argument(
        '-rx', '--rx-ports',
        type=str,
        help="List of rx ports and queues handled by the I/O rx lcores")
    parser.add_argument(
        '-tx', '--tx-ports',
        type=str,
        help="List of tx ports and queues handled by the I/O tx lcores")
    parser.add_argument(
        '-wl', '--worker-lcores',
        type=str,
        help="List of worker lcores")
    parser.add_argument(
        '-rsz', '--ring-sizes',
        type=str,
        help="Ring sizes of 'rx_read,rx_send,w_send,tx_written'")
    parser.add_argument(
        '-bsz', '--burst-sizes',
        type=str,
        help="Burst sizes of rx, worker or tx")
    parser.add_argument(
        '--lpm',
        type=str,
        help="List of LPM rules")
    parser.add_argument(
        '--pos-lb',
        type=int,
        help="Position of the 1-byte field used for identify worker")

    parser = app_helper.add_sppc_args(parser)
    return parser.parse_args()
Пример #10
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for testpmd application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific args
    parser.add_argument('--pci',
                        action='store_true',
                        help="Enable PCI (default is None)")
    parser.add_argument('-i',
                        '--interactive',
                        action='store_true',
                        help="Run in interactive mode (default is None)")
    parser.add_argument(
        '-a',
        '--auto-start',
        action='store_true',
        help="Start forwarding on initialization (default is None)")
    parser.add_argument(
        '--tx-first',
        action='store_true',
        help="Start forwarding, after sending a burst of packets first")
    parser.add_argument(
        '--stats-period',
        type=int,
        help="Period of displaying stats, if interactive is disabled")
    parser.add_argument('--nb-cores',
                        type=int,
                        help="Number of forwarding cores")
    parser.add_argument('--coremask',
                        type=str,
                        help="Hexadecimal bitmask of the cores, " +
                        "do not include master lcore")
    parser.add_argument('--portmask',
                        type=str,
                        help="Hexadecimal bitmask of the ports")
    parser.add_argument(
        '--no-numa',
        action='store_true',
        help="Disable NUMA-aware allocation of RX/TX rings and RX mbuf")
    parser.add_argument(
        '--port-numa-config',
        type=str,
        help="Specify port allocation as (port,socket)[,(port,socket)]")
    parser.add_argument('--ring-numa-config',
                        type=str,
                        help="Specify ring allocation as " +
                        "(port,flag,socket)[,(port,flag,socket)]")
    parser.add_argument(
        '--socket-num',
        type=int,
        help="Socket from which all memory is allocated in NUMA mode")
    parser.add_argument(
        '--mbuf-size',
        type=int,
        help="Size of mbufs used to N (< 65536) bytes (default is 2048)")
    parser.add_argument(
        '--total-num-mbufs',
        type=int,
        help="Number of mbufs allocated in mbuf pools, N > 1024.")
    parser.add_argument(
        '--max-pkt-len',
        type=int,
        help="Maximum packet size to N (>= 64) bytes (default is 1518)")
    parser.add_argument('--eth-peers-configfile',
                        type=str,
                        help="Config file of Ether addrs of the peer ports")
    parser.add_argument('--eth-peer',
                        type=str,
                        help="Set MAC addr of port N as 'N,XX:XX:XX:XX:XX:XX'")
    parser.add_argument('--pkt-filter-mode',
                        type=str,
                        help="Flow Director mode, " +
                        "'none'(default), 'signature' or 'perfect'")
    parser.add_argument('--pkt-filter-report-hash',
                        type=str,
                        help="Flow Director hash match mode, " +
                        "'none', 'match'(default) or 'always'")
    parser.add_argument(
        '--pkt-filter-size',
        type=str,
        help="Flow Director memory size ('64K', '128K', '256K'). " +
        "The default is 64K.")
    parser.add_argument(
        '--pkt-filter-flexbytes-offset',
        type=int,
        help="Flexbytes offset (0-32, default is 0x6) defined in " +
        "words counted from the first byte of the dest MAC address")
    parser.add_argument('--pkt-filter-drop-queue',
                        type=int,
                        help="Set the drop-queue (default is 127)")
    parser.add_argument('--disable-crc-strip',
                        action='store_true',
                        help="Disable hardware CRC stripping")
    parser.add_argument('--enable-lro',
                        action='store_true',
                        help="Enable large receive offload")
    parser.add_argument('--enable-rx-cksum',
                        action='store_true',
                        help="Enable hardware RX checksum offload")
    parser.add_argument('--enable-scatter',
                        action='store_true',
                        help="Enable scatter (multi-segment) RX")
    parser.add_argument('--enable-hw-vlan',
                        action='store_true',
                        help="Enable hardware vlan (default is None)")
    parser.add_argument('--enable-hw-vlan-filter',
                        action='store_true',
                        help="Enable hardware VLAN filter")
    parser.add_argument('--enable-hw-vlan-strip',
                        action='store_true',
                        help="Enable hardware VLAN strip")
    parser.add_argument('--enable-hw-vlan-extend',
                        action='store_true',
                        help="Enable hardware VLAN extend")
    parser.add_argument('--enable-drop-en',
                        action='store_true',
                        help="Enable per-queue packet drop if no descriptors")
    parser.add_argument('--disable-rss',
                        action='store_true',
                        help="Disable RSS (Receive Side Scaling")
    parser.add_argument(
        '--port-topology',
        type=str,
        help="Port topology, 'paired' (the default) or 'chained'")
    parser.add_argument(
        '--forward-mode',
        type=str,
        help="Forwarding mode, " +
        "'io' (default), 'mac', 'mac_swap', 'flowgen', 'rxonly', " +
        "'txonly', 'csum', 'icmpecho', 'ieee1588', 'tm'")
    parser.add_argument('--rss-ip',
                        action='store_true',
                        help="Set RSS functions for IPv4/IPv6 only")
    parser.add_argument('--rss-udp',
                        action='store_true',
                        help="Set RSS functions for IPv4/IPv6 and UDP")
    parser.add_argument(
        '--rxq',
        type=int,
        help="Number of RX queues per port, 1-65535 (default is 1)")
    parser.add_argument(
        '--rxd',
        type=int,
        help="Number of descriptors in the RX rings (default is 128)")
    parser.add_argument(
        '--txq',
        type=int,
        help="Number of TX queues per port, 1-65535 (default is 1)")
    parser.add_argument(
        '--txd',
        type=int,
        help="Number of descriptors in the TX rings (default is 512)")
    parser.add_argument(
        '--burst',
        type=int,
        help="Number of packets per burst, 1-512 (default is 32)")
    parser.add_argument(
        '--mbcache',
        type=int,
        help="Cache of mbuf memory pools, 0-512 (default is 16)")
    parser.add_argument(
        '--rxpt',
        type=int,
        help="Prefetch threshold register of RX rings (default is 8)")
    parser.add_argument(
        '--rxht',
        type=int,
        help="Host threshold register of RX rings (default is 8)")
    parser.add_argument(
        '--rxfreet',
        type=int,
        help="Free threshold of RX descriptors,0-'rxd' (default is 0)")
    parser.add_argument(
        '--rxwt',
        type=int,
        help="Write-back threshold register of RX rings (default is 4)")
    parser.add_argument(
        '--txpt',
        type=int,
        help="Prefetch threshold register of TX rings (default is 36)")
    parser.add_argument(
        '--txht',
        type=int,
        help="Host threshold register of TX rings (default is 0)")
    parser.add_argument(
        '--txwt',
        type=int,
        help="Write-back threshold register of TX rings (default is 0)")
    parser.add_argument(
        '--txfreet',
        type=int,
        help="Free threshold of RX descriptors, 0-'txd' (default is 0)")
    parser.add_argument(
        '--txrst',
        type=int,
        help="Transmit RS bit threshold of TX rings, 0-'txd' (default is 0)")
    parser.add_argument('--rx-queue-stats-mapping',
                        type=str,
                        help="RX queues statistics counters mapping 0-15 as " +
                        "'(port,queue,mapping)[,(port,queue,mapping)]'")
    parser.add_argument('--tx-queue-stats-mapping',
                        type=str,
                        help="TX queues statistics counters mapping 0-15 as " +
                        "'(port,queue,mapping)[,(port,queue,mapping)]'")
    parser.add_argument(
        '--no-flush-rx',
        action='store_true',
        help="Don't flush the RX streams before starting forwarding, " +
        "Used mainly with the PCAP PMD")
    parser.add_argument('--txpkts',
                        type=str,
                        help="TX segment sizes or total packet length, " +
                        "Valid for tx-only and flowgen")
    parser.add_argument(
        '--disable-link-check',
        action='store_true',
        help="Disable check on link status when starting/stopping ports")
    parser.add_argument('--no-lsc-interrupt',
                        action='store_true',
                        help="Disable LSC interrupts for all ports")
    parser.add_argument('--no-rmv-interrupt',
                        action='store_true',
                        help="Disable RMV interrupts for all ports")
    parser.add_argument('--bitrate-stats',
                        nargs='*',
                        action='append',
                        type=int,
                        help="Logical core N to perform bitrate calculation")
    parser.add_argument(
        '--print-event',
        type=str,
        help="Enable printing the occurrence of the designated event, " +
        "<unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|" +
        "intr_rmv|dev_probed|dev_released|all>")
    parser.add_argument(
        '--mask-event',
        type=str,
        help="Disable printing the occurrence of the designated event, " +
        "<unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|" +
        "intr_rmv|dev_probed|dev_released|all>")
    parser.add_argument(
        '--flow-isolate-all',
        action='store_true',
        help="Providing this parameter requests flow API isolated mode " +
        "on all ports at initialization time")
    parser.add_argument(
        '--tx-offloads',
        type=str,
        help="Hexadecimal bitmask of TX queue offloads (default is 0)")
    parser.add_argument(
        '--hot-plug',
        action='store_true',
        help="Enable device event monitor machenism for hotplug")
    parser.add_argument(
        '--vxlan-gpe-port',
        type=int,
        help="UDP port number of tunnel VXLAN-GPE (default is 4790)")
    parser.add_argument('--mlockall',
                        action='store_true',
                        help="Enable locking all memory")
    parser.add_argument('--no-mlockall',
                        action='store_true',
                        help="Disable locking all memory")

    parser = app_helper.add_sppc_args(parser)

    return parser.parse_args()
Пример #11
0
def parse_args():
    parser = argparse.ArgumentParser(
        description="Launcher for l3fwd application container")

    parser = app_helper.add_eal_args(parser)
    parser = app_helper.add_appc_args(parser)

    # Application specific args
    parser.add_argument('-p',
                        '--port-mask',
                        type=str,
                        help='(Mandatory) Port mask')
    parser.add_argument(
        '--config',
        type=str,
        help='(Mandatory) Define set of port, queue, lcore for ports')
    parser.add_argument(
        '-P',
        '--promiscous',
        action='store_true',
        help='Set all ports to promiscous mode (default is None)')
    parser.add_argument('-E',
                        '--exact-match',
                        action='store_true',
                        help='Enable exact match (default is None)')
    parser.add_argument('-L',
                        '--longest-prefix-match',
                        action='store_true',
                        help='Enable longest prefix match (default is None)')
    parser.add_argument('-dst',
                        '--eth-dest',
                        nargs='*',
                        action='append',
                        type=str,
                        help='Ethernet dest for port X (X,MM:MM:MM:MM:MM:MM)')
    parser.add_argument(
        '--enable-jumbo',
        action='store_true',
        help='Enable jumbo frames, [--enable-jumbo [--max-pkt-len PKTLEN]]')
    parser.add_argument(
        '--max-pkt-len',
        type=int,
        help='Max packet length (64-9600) if jumbo is enabled.')
    parser.add_argument('--no-numa',
                        action='store_true',
                        help='Disable NUMA awareness (default is None)')
    parser.add_argument(
        '--hash-entry-num',
        action='store_true',
        help='Specify the hash entry number in hexadecimal (default is None)')
    parser.add_argument(
        '--ipv6',
        action='store_true',
        help='Specify the hash entry number in hexadecimal (default is None)')
    parser.add_argument(
        '--parse-ptype',
        type=str,
        default='ipv4',
        help='Set analyze packet type, ipv4 or ipv6 (default is ipv4)')

    parser = app_helper.add_sppc_args(parser)

    return parser.parse_args()