Bug 814 - Intel PMD both i40 and iavf send OP_DISABLE_VLAN_STRIPPING and it not mandatory
Summary: Intel PMD both i40 and iavf send OP_DISABLE_VLAN_STRIPPING and it not mandatory
Status: CONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: 21.11
Hardware: All All
: High critical
Target Milestone: ---
Assignee: beilei.xing
URL:
Depends on:
Blocks:
 
Reported: 2021-09-23 22:29 CEST by Mustafa
Modified: 2022-02-09 03:04 CET (History)
2 users (show)



Attachments

Description Mustafa 2021-09-23 22:29:41 CEST
Hi Folks,

There is an issue in i40 and ivfx PMD's both drivers send optional commands that require trusted mode enabled and if OP_DISABLE_VLAN_STRIPPING discard by PF, PMD return error and not gracefully handles.


Example iavf_disable_vlan_strip() same function present in i40 that disable vlan strip.  That is optional and not required and must be gracefully be handled.


EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: Probe PCI driver: net_iavf (8086:1889) device: 0000:13:00.0 (socket 0)
EAL: Error reading from file descriptor 26: Input/output error
EAL: No legacy callbacks, legacy socket not created
testpmd: create a new mbuf pool <mb_pool_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.

Configuring Port 0 (socket 0)
iavf_execute_vf_cmd(): No response for cmd 28
iavf_disable_vlan_strip(): Failed to execute command of OP_DISABLE_VLAN_STRIPPING
iavf_init_rss(): RSS is enabled by PF by default
iavf_execute_vf_cmd(): No response for cmd 24
iavf_configure_rss_lut(): Failed to execute command of OP_CONFIG_RSS_LUT
iavf_dev_configure(): configure rss failed
Port0 dev_configure = -1
Fail to configure port 0
EAL: Error - exiting with code: 1
  Cause: Start ports failed

Thank you,
Mus>
Comment 1 Mustafa 2021-09-25 09:30:46 CEST
Folks,

I did patch it clearly seen that issue with the logic.  PF return 0, while 
iavf_execute_vf_cmd() doesn't properly propagate up that it Unsupported by PF,
For example this iavf_configure_rss_lut() should just return error and fail.

Kind Regards,
Mus
Comment 2 Ajit Khaparde 2021-10-16 19:58:34 CEST
Beilei, Can you take a look at this? Thanks
Comment 3 Mustafa 2021-12-21 17:18:43 CET
Folks,

Do we have any updates ?
So far I'm running my own patch 

https://github.com/spyroot/photongen/blob/main/iavf_vchnl.c
But it is better to add proper logic and handle this.

We really need to differentiate when PF reject vs PF unsupported. 

Thank you,
Mus
Comment 4 Mustafa 2022-01-22 08:17:45 CET
Folks,


I cross-check on the latest firmware, latest intel cards.  Both 20.11/21.11 have the same issue.  ( OP_DISABLE_VLAN_STRIPPING and OP_CONFIG_RSS_LUT and a bunch of other optional OPCode causing this issue).   

Please note Intel has no tool to enable/disable trusted mode for 810 Cards. It is only avaliable for 7xx cards.  

It is clearly seen that PF doesn't respond to cmd 26 and a bunch of other cmd's and logic in the PMD doesn't handle this and propagate error code and crash. 

./dpdk-testpmd
EAL: Detected CPU lcores: 4
EAL: Detected NUMA nodes: 1
EAL: Detected static linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available 1048576 kB hugepages reported
EAL: Probe PCI driver: net_iavf (8086:1889) device: 0000:0b:00.0 (socket 0)
EAL: Error reading from file descriptor 26: Input/output error
iavf_execute_vf_cmd(): No response for cmd 26
iavf_set_hena(): Failed to execute command of OP_SET_RSS_HENA
iavf_default_rss_disable(): fail to disable default RSS,lack PF support
TELEMETRY: No legacy callbacks, legacy socket not created
testpmd: create a new mbuf pool <mb_pool_0>: n=171456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc

Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.

Configuring Port 0 (socket 0)
iavf_execute_vf_cmd(): No response for cmd 28
iavf_disable_vlan_strip(): Failed to execute command of OP_DISABLE_VLAN_STRIPPING
iavf_dev_init_vlan(): Failed to update vlan offload
iavf_dev_configure(): configure VLAN failed: -5
iavf_execute_vf_cmd(): No response for cmd 24
iavf_configure_rss_lut(): Failed to execute command of OP_CONFIG_RSS_LUT
iavf_dev_configure(): configure rss failed
Port0 dev_configure = -1
Fail to configure port 0
EAL: Error - exiting with code: 1
  Cause: Start ports failed


Kind Regards,
Mus
Comment 5 Mustafa 2022-02-09 03:04:26 CET
on PF side in ESXi.

2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: Uplink: 851: Operation 0x12 failed
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: icen: indrv_PassthruOps:3986: 0000:17:00.1:  VMK_NETPTOP_VF_SET_ANTISPOOF: Op code 18 is not supported. MAC antispoofing is enabled by default.
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: Uplink: 851: Operation 0x12 failed
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: icen: indrv_SetVfMacAddr:3272: 0000:17:00.1: VF 0 is already in reset.
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: icen: indrv_PassthruOps:4042: 0000:17:00.1: Op code 14 is not supported
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: Uplink: 851: Operation 0xe failed
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: icen: indrv_PassthruOps:3879: 0000:17:00.1: VMK_NETPTOP_VF_SET_DEFAULT_VLAN: Config will be applied when VF 0 is initilized.
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: icen: indrv_PassthruOps:3986: 0000:17:00.1:  VMK_NETPTOP_VF_SET_ANTISPOOF: Op code 18 is not supported. MAC antispoofing is enabled by default.
2022-02-09T01:07:57.052Z cpu10:2097580)WARNING: Uplink: 851: Operation 0x12 failed
2022-02-09T01:46:45.752Z cpu57:2107212)WARNING: icen: indrv_CheckVfPermission:1847: 0000:17:00.1: Cannot remove 00:50:56:b6:e1:70 from VF 0

Note You need to log in before you can comment on or make changes to this bug.