svn commit: r342451 - stable/11/sys/dev/sfxge
Andrew Rybchenko
arybchik at FreeBSD.org
Tue Dec 25 07:33:46 UTC 2018
Author: arybchik
Date: Tue Dec 25 07:33:45 2018
New Revision: 342451
URL: https://svnweb.freebsd.org/changeset/base/342451
Log:
MFC r341327
sfxge(4): rollback last seen VLAN TCI if Tx packet is dropped
Early processing of a packet on transmit may change last seen
VLAN TCI in the queue context. If such a packet is eventually
dropped, last seen VLAN TCI must be set to its previous value.
Submitted by: Ivan Malov <Ivan.Malov at oktetlabs.ru>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18288
Modified:
stable/11/sys/dev/sfxge/sfxge_tx.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/sfxge/sfxge_tx.c
==============================================================================
--- stable/11/sys/dev/sfxge/sfxge_tx.c Tue Dec 25 07:33:02 2018 (r342450)
+++ stable/11/sys/dev/sfxge/sfxge_tx.c Tue Dec 25 07:33:45 2018 (r342451)
@@ -359,6 +359,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq,
int rc;
int i;
int eop;
+ uint16_t hw_vlan_tci_prev;
int vlan_tagged;
KASSERT(!txq->blocked, ("txq->blocked"));
@@ -410,6 +411,8 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq,
used_map = &stmp->map;
+ hw_vlan_tci_prev = txq->hw_vlan_tci;
+
vlan_tagged = sfxge_tx_maybe_insert_tag(txq, mbuf);
if (vlan_tagged) {
sfxge_next_stmp(txq, &stmp);
@@ -461,6 +464,7 @@ static int sfxge_tx_queue_mbuf(struct sfxge_txq *txq,
return (0);
reject_mapped:
+ txq->hw_vlan_tci = hw_vlan_tci_prev;
bus_dmamap_unload(txq->packet_dma_tag, *used_map);
reject:
/* Drop the packet on the floor. */
More information about the svn-src-stable-11
mailing list