Closed manojmpanicker closed 3 years ago
TypeError: type object got multiple values for keyword argument 'name'
You are sending the name explicitly as well as implicitly by using the syntactic sugar
VhostUser0::PMDPort(name='VhostUser0',vdev='vhost0,iface=/tmp/vhost_user0.sock,queues=1')
Instead, do this
VhostUser0::PMDPort(vdev='vhost0,iface=/tmp/vhost_user0.sock,queues=1')
I had tried that as well but that ran into another error:
Error: Unhandled exception in the configuration script (most recent call last)
File "/home/amd/BESS/bess/bessctl/conf/samples/mysample.bess", line 7, in
@manojmpanicker net_
prefix is required when conveying vdev names as per DPDK. These errors are reported by DPDK. BESS simply passes the args.
https://github.com/DPDK/dpdk/blob/v20.11/drivers/net/vhost/rte_eth_vhost.c#L1663-L1673
Try this
VhostUser0::PMDPort(vdev='net_vhost0,iface=/tmp/vhost_user0.sock,queues=1')
Thanks @krsna1729. With the change you suggested, I am able to create the vhost interfaces and create a pipeline with them.
I'm trying to get a create a vhost interface as shown below following the example semantics provided in the documentation: VhostUser0::PMDPort(name='VhostUser0',vdev='vhost0,iface=/tmp/vhost_user0.sock,queues=1')
but I run into a failure: _localhost:10514 $ run samples/mysample Error: Unhandled exception in the configuration script (most recent call last) File "/home/amd/BESS/bess/bessctl/conf/samples/mysample.bess", line 5, in
VhostUser0::PMDPort(name='VhostUser_0',vdev='vhost0,iface=/tmp/vhost_user0.sock,queues=1')
File "/home/amd/BESS/bess/bessctl/commands.py", line 139, in __bess_module__
return make_modules([module_names])[0]
File "/home/amd/BESS/bess/bessctl/commands.py", line 119, in make_modules
obj = mclass_obj( args, name=module, kwargs)
TypeError: type object got multiple values for keyword argument 'name'_
Another simple test using a basic forwarding conf script shown below worked fine: _dpdkp0::PMDPort(port_id=0, num_inc_q=1, num_out_q=1) dpdkp1::PMDPort(port_id=1, num_inc_q=1, num_out_q=1)
InDpdkP0::QueueInc(port=dpdkp0, qid=0) InDpdkP1::QueueInc(port=dpdkp1, qid=0)
OutDpdkP0::QueueOut(port=dpdkp0, qid=0) OutDpdkP1::QueueOut(port=dpdkp1, qid=0)
InDpdkP0 -> OutDpdkP0 InDpdkP1 -> OutDpdkP1_
I just added the line to create the vhost interface when I ran into this failure.
The git commit for the BESS sources is commit ae52fc5804290fc3116daf2aef52226fafcedf5d
Python version is Python 3.8.10.