Date: Mon, 17 Sep 2012 01:21:55 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240585 - head/sys/dev/ath Message-ID: <201209170121.q8H1Lta0021740@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Sep 17 01:21:55 2012 New Revision: 240585 URL: http://svn.freebsd.org/changeset/base/240585 Log: Add a per-TID filter queue and filter state bits. These are intended for software TX filtering support, where the NIC decides there has been too many successive failues to a destination and will filter it. Although the filtering is done per-destination (via the keycache), the state and queue is kept per-TID for now. It simplifies the overall architecture design and locking. Whilst here, add ATH_TID_UNLOCK_ASSERT(). Modified: head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Sep 17 01:18:47 2012 (r240584) +++ head/sys/dev/ath/if_athvar.h Mon Sep 17 01:21:55 2012 (r240585) @@ -107,6 +107,12 @@ struct ath_tid { int ac; /* which AC gets this trafic */ int hwq_depth; /* how many buffers are on HW */ + struct { + TAILQ_HEAD(,ath_buf) axq_q; /* filtered queue */ + u_int axq_depth; /* SW queue depth */ + char axq_name[48]; /* lock name */ + } filtq; + /* * Entry on the ath_txq; when there's traffic * to send @@ -114,9 +120,16 @@ struct ath_tid { TAILQ_ENTRY(ath_tid) axq_qelem; int sched; int paused; /* >0 if the TID has been paused */ + + /* + * These are flags - perhaps later collapse + * down to a single uint32_t ? + */ int addba_tx_pending; /* TX ADDBA pending */ int bar_wait; /* waiting for BAR */ int bar_tx; /* BAR TXed */ + int isfiltered; /* is this node currently filtered */ + int clrdmask; /* has clrdmask been set */ /* * Is the TID being cleaned up after a transition @@ -336,6 +349,8 @@ struct ath_txq { #define ATH_TID_LOCK_ASSERT(_sc, _tid) \ ATH_TXQ_LOCK_ASSERT((_sc)->sc_ac2q[(_tid)->ac]) +#define ATH_TID_UNLOCK_ASSERT(_sc, _tid) \ + ATH_TXQ_UNLOCK_ASSERT((_sc)->sc_ac2q[(_tid)->ac]) #define ATH_TXQ_INSERT_HEAD(_tq, _elm, _field) do { \ TAILQ_INSERT_HEAD(&(_tq)->axq_q, (_elm), _field); \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209170121.q8H1Lta0021740>