> -----Original Message----- > From: Wangyunjian(wangyunjian,TongTu) <wangyunj...@huawei.com> > Sent: Monday, December 9, 2024 8:30 PM > To: dev@dpdk.org; jiawe...@trustnetic.com; jianw...@trustnetic.com > Cc: liwei (DT) <liwei...@huawei.com>; xiawei (H) <xiawe...@huawei.com> > 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. > > 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. It was set to 1 in txgbe_stop_hw(). > > 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 >