app/testpmd: fix offloads for newly attached port
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Mon, 12 Jul 2021 12:40:53 +0000 (15:40 +0300)
committerAndrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru>
Tue, 13 Jul 2021 09:52:05 +0000 (11:52 +0200)
commitb6b8a1ebd4dadc82733ce4b0a711da918c386115
tree3e92a1a6e6ddd46aacb89fd55a9dd69cf5892136
parentfafa81dece7fe22369073235b636c2fc6cda6601
app/testpmd: fix offloads for newly attached port

For the newly attached ports (with "port attach" command) the
default offloads settings, configured from application command
line, were not applied, causing port start failure following
the attach.

For example, if scattering offload was configured in command
line and rxpkts was configured for multiple segments, the newly
attached port start was failed due to missing scattering offload
enable in the new port settings. The missing code to apply
the offloads to the new device and its queues is added.

The new local routine init_config_port_offloads() is introduced,
embracing the shared part of port offloads initialization code.

Fixes: c9cce42876f5 ("ethdev: remove deprecated attach/detach functions")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
app/test-pmd/testpmd.c