Skip to contentSkip to conversation

txgbe: vlan offload setting errors

DISCUSSION Wangyunjian(wangyunjian,TongTu) 2 participants 4 messages Dec 9, 2024 – Dec 10, 2024 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello everyone,
I recently added a txgbe port and enabled vlan offload.
However, when I checked the dpdk logs, I noticed the following error: "2024-12-09T10:32:26.420709+08:00 txgbe_vlan_offload_set(): Please stop port first."

Upon reviewing the txgbe pmd driver code, I discovered that the variable hw->adapter_stopped is initially set to 0 and is not changed to 1 in the device initialization function (eth_txgbe_dev_init). This causes an error in the txgbe_vlan_offload_set function, which checks the value of adapter_stopped and reports an error when it is 0.

How can we fix this issue? Is it possible to set adapter_stopped to 1 in the eth_txgbe_dev_init function?

Best regards,
Wei Li

#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Wangyunjian(wangyunjian,TongTu) <[email protected]>
Sent: Monday, December 9, 2024 8:30 PM
To: [email protected]; [email protected]; [email protected]
Cc: liwei (DT) <[email protected]>; xiawei (H) <[email protected]>
Subject: txgbe: vlan offload setting errors

Hello everyone,
I recently added a txgbe port and enabled vlan offload.
However, when I checked the dpdk logs, I noticed the following error: "2024-12-09T10:32:26.420709+08:00 txgbe_vlan_offload_set():
Please stop port first."

You should stop the device first, since VLAN offload cannot be changed when Rx ring is enabled.

Quoted 2 lines

Upon reviewing the txgbe pmd driver code, I discovered that the variable hw->adapter_stopped is initially set to 0 and is not

changed

Quoted 2 lines

to 1 in the device initialization function (eth_txgbe_dev_init).
This causes an error in the txgbe_vlan_offload_set function, which checks the value of adapter_stopped and reports an error when

it

Quoted 1 line

is 0.

It was set to 1 in txgbe_stop_hw().

Quoted 6 lines

How can we fix this issue? Is it possible to set adapter_stopped to 1 in the eth_txgbe_dev_init function?

Best regards,
Wei Li

#3 lore raw
Quoted 15 lines

-----Original Message-----
From: Jiawen Wu [mailto:[email protected]]
Sent: Tuesday, December 10, 2024 10:00 AM
To: Wangyunjian(wangyunjian,TongTu) <[email protected]>; [email protected]
Cc: liwei (DT) <[email protected]>; xiawei (H) <[email protected]>
Subject: RE: txgbe: vlan offload setting errors

Quoted 7 lines

-----Original Message-----
From: Wangyunjian(wangyunjian,TongTu) <[email protected]>
Sent: Monday, December 9, 2024 8:30 PM
To: [email protected]; [email protected]; [email protected]
Cc: liwei (DT) <[email protected]>; xiawei (H) <[email protected]>
Subject: txgbe: vlan offload setting errors

Quoted 8 lines
Quoted 3 lines

Hello everyone,
I recently added a txgbe port and enabled vlan offload. However, when I checked the dpdk logs, I noticed the following error:

"2024-12-09T10:32:26.420709+08:00 txgbe_vlan_offload_set():

Quoted 1 line

Please stop port first."

You should stop the device first, since VLAN offload cannot be changed when Rx ring is enabled.

However, I haven't start the port yet. The port is new added.

Quoted 20 lines
Quoted 3 lines

Upon reviewing the txgbe pmd driver code, I discovered that the variable

hw->adapter_stopped is initially set to 0 and is not changed

Quoted 2 lines

to 1 in the device initialization function (eth_txgbe_dev_init). This causes an error in the txgbe_vlan_offload_set function, which checks the

value of adapter_stopped and reports an error when it

Quoted 1 line

is 0.

It was set to 1 in txgbe_stop_hw().

Quoted 2 lines

How can we fix this issue? Is it possible to set adapter_stopped to 1 in the

eth_txgbe_dev_init function?

Quoted 4 lines

Best regards,
Wei Li

#4 lore raw
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines

Hello everyone,
I recently added a txgbe port and enabled vlan offload. However, when I checked the dpdk logs, I noticed the following error:
"2024-12-09T10:32:26.420709+08:00 txgbe_vlan_offload_set():
Please stop port first."

You should stop the device first, since VLAN offload cannot be changed when Rx ring is enabled.

However, I haven't start the port yet. The port is new added.

Enable VLAN offload, then start the device.
It will be configured in txgbe_vlan_offload_config(), which is not limited by hw->adapter_stopped.