[PATCH 05/40] igb: Do not require CTRL.VME for tx VLAN tagging

Akihiko Odaki posted 40 patches 2 years, 10 months ago
There is a newer version of this series
[PATCH 05/40] igb: Do not require CTRL.VME for tx VLAN tagging
Posted by Akihiko Odaki 2 years, 10 months ago
While the datasheet of e1000e says it checks CTRL.VME for tx VLAN
tagging, igb's datasheet has no such statements. It also says for
"CTRL.VLE":
> This register only affects the VLAN Strip in Rx it does not have any
> influence in the Tx path in the 82576.
(Appendix A. Changes from the 82575)

There is no "CTRL.VLE" so it is more likely that it is a mistake of
CTRL.VME.

Fixes: fba7c3b788 ("igb: respect VMVIR and VMOLR for VLAN")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 hw/net/igb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c
index f725ab97ae..5d4884b834 100644
--- a/hw/net/igb_core.c
+++ b/hw/net/igb_core.c
@@ -402,7 +402,7 @@ igb_tx_insert_vlan(IGBCore *core, uint16_t qn, struct igb_tx *tx,
         }
     }
 
-    if (insert_vlan && e1000x_vlan_enabled(core->mac)) {
+    if (insert_vlan) {
         net_tx_pkt_setup_vlan_header_ex(tx->tx_pkt, vlan,
             core->mac[VET] & 0xffff);
     }
-- 
2.40.0
RE: [PATCH 05/40] igb: Do not require CTRL.VME for tx VLAN tagging
Posted by Sriram Yagnaraman 2 years, 10 months ago
> -----Original Message-----
> From: Akihiko Odaki <akihiko.odaki@daynix.com>
> Sent: Friday, 14 April 2023 13:37
> Cc: Sriram Yagnaraman <sriram.yagnaraman@est.tech>; Jason Wang
> <jasowang@redhat.com>; Dmitry Fleytman <dmitry.fleytman@gmail.com>;
> Michael S. Tsirkin <mst@redhat.com>; Alex Bennée <alex.bennee@linaro.org>;
> Philippe Mathieu-Daudé <philmd@linaro.org>; Thomas Huth
> <thuth@redhat.com>; Wainer dos Santos Moschetta
> <wainersm@redhat.com>; Beraldo Leal <bleal@redhat.com>; Cleber Rosa
> <crosa@redhat.com>; Laurent Vivier <lvivier@redhat.com>; Paolo Bonzini
> <pbonzini@redhat.com>; qemu-devel@nongnu.org; Akihiko Odaki
> <akihiko.odaki@daynix.com>
> Subject: [PATCH 05/40] igb: Do not require CTRL.VME for tx VLAN tagging
> 
> While the datasheet of e1000e says it checks CTRL.VME for tx VLAN tagging,
> igb's datasheet has no such statements. It also says for
> "CTRL.VLE":
> > This register only affects the VLAN Strip in Rx it does not have any
> > influence in the Tx path in the 82576.
> (Appendix A. Changes from the 82575)
> 
> There is no "CTRL.VLE" so it is more likely that it is a mistake of CTRL.VME.
> 
> Fixes: fba7c3b788 ("igb: respect VMVIR and VMOLR for VLAN")
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
>  hw/net/igb_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>