Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci ale_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEN...
details: https://anonhg.NetBSD.org/src/rev/cb822c879e75
branches: trunk
changeset: 369589:cb822c879e75
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Aug 22 15:43:49 2022 +0000
description:
ale_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with
"IFQ_POLL() -> IFQ_DEQUEUE() on success (or fatal error)".
diffstat:
sys/dev/pci/if_ale.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r 12d3acd36218 -r cb822c879e75 sys/dev/pci/if_ale.c
--- a/sys/dev/pci/if_ale.c Mon Aug 22 15:39:26 2022 +0000
+++ b/sys/dev/pci/if_ale.c Mon Aug 22 15:43:49 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ale.c,v 1.41 2022/08/22 15:39:26 thorpej Exp $ */
+/* $NetBSD: if_ale.c,v 1.42 2022/08/22 15:43:49 thorpej Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -32,7 +32,7 @@
/* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.41 2022/08/22 15:39:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.42 2022/08/22 15:43:49 thorpej Exp $");
#include "vlan.h"
@@ -1039,7 +1039,7 @@
enq = 0;
for (;;) {
- IFQ_DEQUEUE(&ifp->if_snd, m_head);
+ IFQ_POLL(&ifp->if_snd, m_head);
if (m_head == NULL)
break;
@@ -1051,14 +1051,15 @@
if ((error = ale_encap(sc, m_head)) != 0) {
if (error == EFBIG) {
/* This is fatal for the packet. */
+ IFQ_DEQUEUE(&ifp->if_snd, m_head);
m_freem(m_head);
if_statinc(ifp, if_oerrors);
continue;
}
- IF_PREPEND(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m_head);
enq = 1;
/*
Home |
Main Index |
Thread Index |
Old Index