Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Save the discard_multidesc state to not to...



details:   https://anonhg.NetBSD.org/src/rev/ab924c0fcd68
branches:  trunk
changeset: 1023317:ab924c0fcd68
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Sep 03 08:57:58 2021 +0000

description:
Save the discard_multidesc state to not to forget the state by exiting rxeof().

diffstat:

 sys/dev/pci/ixgbe/ix_txrx.c |  10 +++++++---
 sys/dev/pci/ixgbe/ixgbe.h   |   3 ++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (62 lines):

diff -r a9de9aef0c70 -r ab924c0fcd68 sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c       Fri Sep 03 08:43:23 2021 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c       Fri Sep 03 08:57:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.89 2021/09/03 08:43:23 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.90 2021/09/03 08:57:58 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.89 2021/09/03 08:43:23 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.90 2021/09/03 08:57:58 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1568,6 +1568,7 @@
        rxr->next_to_check = 0;
        rxr->next_to_refresh = adapter->num_rx_desc - 1; /* Fully allocated */
        rxr->lro_enabled = FALSE;
+       rxr->discard_multidesc = false;
        rxr->rx_copies.ev_count = 0;
 #if 0 /* NetBSD */
        rxr->rx_bytes.ev_count = 0;
@@ -1805,7 +1806,7 @@
        u32                     staterr = 0;
        u32                     loopcount = 0;
        u32                     limit = adapter->rx_process_limit;
-       bool                    discard_multidesc = false;
+       bool                    discard_multidesc = rxr->discard_multidesc;
 #ifdef RSS
        u16                     pkt_info;
 #endif
@@ -2114,6 +2115,9 @@
                }
        }
 
+       /* Save the current status */
+       rxr->discard_multidesc = discard_multidesc;
+
        /* Refresh any remaining buf structs */
        if (ixgbe_rx_unrefreshed(rxr))
                ixgbe_refresh_mbufs(rxr, i);
diff -r a9de9aef0c70 -r ab924c0fcd68 sys/dev/pci/ixgbe/ixgbe.h
--- a/sys/dev/pci/ixgbe/ixgbe.h Fri Sep 03 08:43:23 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.h Fri Sep 03 08:57:58 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.79 2021/08/26 09:03:47 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.80 2021/09/03 08:57:58 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -407,6 +407,7 @@
        bool                    lro_enabled;
        bool                    hw_rsc;
        bool                    vtag_strip;
+       bool                    discard_multidesc;
        u16                     next_to_refresh;
        u16                     next_to_check;
        u16                     num_desc;



Home | Main Index | Thread Index | Old Index