git: 7d680875473d - stable/14 - vtnet: Prefer "hardware" accounting for the multicast and total number of octets sent

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Sat, 27 Sep 2025 15:14:03 UTC
The branch stable/14 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=7d680875473d4abc056d0e6ad354842d8909bbdc

commit 7d680875473d4abc056d0e6ad354842d8909bbdc
Author:     Joyu Liao <joyul@juniper.net>
AuthorDate: 2025-09-04 20:00:28 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-09-27 15:11:37 +0000

    vtnet: Prefer "hardware" accounting for the multicast and total number of octets sent
    
    When ALTQ is enabled, this driver does "hardware" accounting and soft
    accounting at the same time. Prefer the "hardware" one to make the logic
    simpler.
    
    Reviewed by:    zlei
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D44817
    
    (cherry picked from commit 2a346c8993cbb92a321a7c25bd9ac4dcaae352d1)
---
 sys/dev/virtio/network/if_vtnet.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index 355027391985..949b3ba0e5bb 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -3052,12 +3052,10 @@ vtnet_get_counter(if_t ifp, ift_counter cnt)
 		return (rxaccum.vrxs_ibytes);
 	case IFCOUNTER_OPACKETS:
 		return (txaccum.vtxs_opackets);
-#ifndef VTNET_LEGACY_TX
 	case IFCOUNTER_OBYTES:
 		return (txaccum.vtxs_obytes);
 	case IFCOUNTER_OMCASTS:
 		return (txaccum.vtxs_omcasts);
-#endif
 	default:
 		return (if_get_counter_default(ifp, cnt));
 	}