[Bro] Question about packet-bricks

C. L. Martinez carlopmart at gmail.com
Thu Mar 26 03:01:37 PDT 2015


Hi all,

 I am trying to use packet-bricks in a FreeBSD 10.1 host with netmap
enabled. Following README, I have executed the following commands:

[     pmain(): line  463] Executing (null)
[print_version(): line  345] BRICKS Version 0.1-alpha
bricks> BRICKS.help()
BRICKS Commands:
    help()
    print_status()
    show_stats()
    shutdown()
  Available subsystems within BRICKS have their own help() methods:
    PktEngine
bricks> utilObj:enable_nmpipes()
[    report(): line  222] stdin:1: attempt to index global 'utilObj'
(a nil value)
stack traceback:
    stdin:1: in main chunk
    [C]: ?bricks> pe = PktEngine.new("e0")
bricks> print_status()
[    report(): line  222] stdin:1: attempt to call global
'print_status' (a nil value)
stack traceback:
    stdin:1: in main chunk
    [C]: ?bricks> pe = PktEngine.new("e0", 1024, 1)
[pktengine_new(): line  178] Engine with name: e0 already exists
bricks> lb = Brick.new("LoadBalancer", 2)
bricks> lb:connect_input("vtnet2")
bricks> lb:connect_output("vtnet2{0", "vtnet2{1", "em0")
bricks> pe:link(lb)
546.982488 nm_open [444] overriding ARG3 0
546.982547 nm_open [457] overriding ifname vtnet2 ringid 0x0 flags 0x1
[netmap_link_iface(): line  175] Wait for 2 secs for phy reset
[brick_link(): line  101] Linking e0 with link vtnet2 with batch size:
512 and qid: -1
549.055808 nm_open [444] overriding ARG3 0
[netmap_create_channel(): line  761] zerocopy for vtnet2 --> vtnet2{0
(index: 0) enabled
[netmap_create_channel(): line  766] Created netmap:vtnet2{0 interface
549.101244 nm_open [444] overriding ARG3 0
[netmap_create_channel(): line  761] zerocopy for vtnet2 --> vtnet2{1
(index: 1) enabled
[netmap_create_channel(): line  766] Created netmap:vtnet2{1 interface
549.142483 nm_open [444] overriding ARG3 0
[netmap_create_channel(): line  761] zerocopy for vtnet2 --> em0
(index: 2) enabled
[netmap_create_channel(): line  766] Created netmap:em0 interface
bricks> pe:start()
bricks> [initiate_backend(): line  346] Engine e0 is listening on port 1239
pe.show_stats()
[    report(): line  222] stdin:1: bad argument #1 to 'show_stats'
(userdata expected, got no value)
stack traceback:
    [C]: in function 'show_stats'
    stdin:1: in main chunk
    [C]: ?bricks> show.stats()
[    report(): line  222] stdin:1: attempt to index global 'show' (a nil value)
stack traceback:
    stdin:1: in main chunk
    [C]: ?bricks>

dmesg shows me the following:

544.880658 [ 407] vtnet_netmap_config       vtnet config txq=1,
txd=512 rxq=1, rxd=512
544.946020 [ 676] netmap_update_config      configuration changed (but fine)
544.981566 [1219] netmap_mem_global_config  reconfiguring
545.014116 [ 818] netmap_config_obj_allocator XXX aligning object by 1 bytes
546.288980 [ 407] vtnet_netmap_config       vtnet config txq=1,
txd=512 rxq=1, rxd=512
546.353092 [  79] vtnet_netmap_free_bufs    freed 256 mbufs, 0 netmap
bufs on 1 queues
546.982572 [ 407] vtnet_netmap_config       vtnet config txq=1,
txd=512 rxq=1, rxd=512
547.011973 [ 407] vtnet_netmap_config       vtnet config txq=1,
txd=512 rxq=1, rxd=512
549.055837 [ 325] netmap_pipe_krings_create 0xfffff80110f9ac00: case
1, create everything
549.101272 [ 325] netmap_pipe_krings_create 0xfffff801105e0800: case
1, create everything
em0: link state changed to DOWN
em0: link state changed to UP

As you can see, stats failed. When I try to use tcpdump:

root at nsm02:/dev # tcpdump -i 'netmap:vtnet2{0'
tcpdump: netmap:vtnet2{0: No such device exists
(BIOCSETIF failed: Device not configured)

Please, any help??


More information about the Bro mailing list