In l3fwd-power, there is default port configuration which requires RSS and IPV4/UDP/TCP checksum. Once device does not support these, the l3fwd-power will exit and report an error.
Miao -----Original Message----- From: Maxime Coquelin <[email protected]> Sent: Friday, September 10, 2021 3:24 PM To: Li, Miao <[email protected]>; [email protected] Cc: Xia, Chenbo <[email protected]>; David Marchand <[email protected]> Subject: Re: [PATCH 5/5] examples/l3fwd-power: support virtio/vhost On 9/10/21 3:05 PM, Miao Li wrote: > This patch adds two command line arguments which will be needed when > using virtio/vhost vdev. One argument sets rx offloads capabilities > DEV_RX_OFFLOAD_VLAN_STRIP. The other argument sets DCB, PSS and VMDQ > off for RX side. > > Signed-off-by: Miao Li <[email protected]> > --- > examples/l3fwd-power/main.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c > index aa7b8db44a..4e28008578 100644 > --- a/examples/l3fwd-power/main.c > +++ b/examples/l3fwd-power/main.c > @@ -1811,6 +1811,8 @@ parse_args(int argc, char **argv) > {"high-perf-cores", 1, 0, 0}, > {"no-numa", 0, 0, 0}, > {"enable-jumbo", 0, 0, 0}, > + {"vlan-strip", 0, 0, 0}, > + {"rx-none", 0, 0, 0}, > {CMD_LINE_OPT_EMPTY_POLL, 1, 0, 0}, > {CMD_LINE_OPT_PARSE_PTYPE, 0, 0, 0}, > {CMD_LINE_OPT_LEGACY, 0, 0, 0}, > @@ -1986,6 +1988,19 @@ parse_args(int argc, char **argv) > (unsigned int)port_conf.rxmode.max_rx_pkt_len); > } > > + if (!strncmp(lgopts[option_index].name, > + "vlan-strip", 10)) { > + printf("set vlan strip\n"); > + port_conf.rxmode.offloads = > + DEV_RX_OFFLOAD_VLAN_STRIP; > + } > + > + if (!strncmp(lgopts[option_index].name, > + "rx-none", 7)) { > + printf("none of DCB,RSS or VMDQ mode\n"); > + port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; > + } > + > if (!strncmp(lgopts[option_index].name, > CMD_LINE_OPT_PARSE_PTYPE, > sizeof(CMD_LINE_OPT_PARSE_PTYPE))) { > Why not just rely on the capabilities exposed by the driver? Maxime

