Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci fix PR kern/52068 (82574 Tx csum offload bug in ...
details: https://anonhg.NetBSD.org/src/rev/8b307d2f22c9
branches: trunk
changeset: 822465:8b307d2f22c9
user: knakahara <knakahara%NetBSD.org@localhost>
date: Tue Mar 21 10:39:52 2017 +0000
description:
fix PR kern/52068 (82574 Tx csum offload bug in not only i386 but also amd64).
The packets sent from txq[1] could not be enabled any tx offload.
This has been enbugged since r1.454.
diffstat:
sys/dev/pci/if_wm.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (52 lines):
diff -r 608650ed7e9f -r 8b307d2f22c9 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Tue Mar 21 10:20:38 2017 +0000
+++ b/sys/dev/pci/if_wm.c Tue Mar 21 10:39:52 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.497 2017/03/08 08:00:09 kardel Exp $ */
+/* $NetBSD: if_wm.c,v 1.498 2017/03/21 10:39:52 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.497 2017/03/08 08:00:09 kardel Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.498 2017/03/21 10:39:52 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -711,8 +711,8 @@
static void wm_free_txrx_queues(struct wm_softc *);
static int wm_init_txrx_queues(struct wm_softc *);
/* Start */
-static int wm_tx_offload(struct wm_softc *, struct wm_txsoft *,
- uint32_t *, uint8_t *);
+static int wm_tx_offload(struct wm_softc *, struct wm_txqueue *,
+ struct wm_txsoft *, uint32_t *, uint8_t *);
static inline int wm_select_txqueue(struct ifnet *, struct mbuf *);
static void wm_start(struct ifnet *);
static void wm_start_locked(struct ifnet *);
@@ -6405,10 +6405,9 @@
* specified packet.
*/
static int
-wm_tx_offload(struct wm_softc *sc, struct wm_txsoft *txs, uint32_t *cmdp,
- uint8_t *fieldsp)
-{
- struct wm_txqueue *txq = &sc->sc_queue[0].wmq_txq;
+wm_tx_offload(struct wm_softc *sc, struct wm_txqueue *txq,
+ struct wm_txsoft *txs, uint32_t *cmdp, uint8_t *fieldsp)
+{
struct mbuf *m0 = txs->txs_mbuf;
struct livengood_tcpip_ctxdesc *t;
uint32_t ipcs, tucs, cmd, cmdlen, seg;
@@ -6863,7 +6862,7 @@
(M_CSUM_TSOv4 | M_CSUM_TSOv6 |
M_CSUM_IPv4 | M_CSUM_TCPv4 | M_CSUM_UDPv4 |
M_CSUM_TCPv6 | M_CSUM_UDPv6)) {
- if (wm_tx_offload(sc, txs, &cksumcmd,
+ if (wm_tx_offload(sc, txq, txs, &cksumcmd,
&cksumfields) != 0) {
/* Error message already displayed. */
bus_dmamap_unload(sc->sc_dmat, dmamap);
Home |
Main Index |
Thread Index |
Old Index