Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2012 03:20:10 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/168649: commit references a PR
Message-ID:  <201206050320.q553KAJb087659@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/168649; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/168649: commit references a PR
Date: Tue,  5 Jun 2012 03:15:00 +0000 (UTC)

 Author: adrian
 Date: Tue Jun  5 03:14:49 2012
 New Revision: 236597
 URL: http://svn.freebsd.org/changeset/base/236597
 
 Log:
   Create a function - ath_tx_kick() - which is called where ath_start() is
   called to "kick" along TX.
   
   For now, schedule a taskqueue call.
   
   Later on I may go back to the direct call of ath_rx_tasklet() - but for
   now, this will do.
   
   I've tested UDP and TCP TX. UDP TX still achieves 240MBit, but TCP
   TX gets stuck at around 100MBit or so, instead of the 150MBit it should
   be at.  I'll re-test with no ACPI/power/sleep states enabled at startup
   and see what effect it has.
   
   This is in preparation for supporting an if_transmit() path, which will
   turn ath_tx_kick() into a NUL operation (as there won't be an ifnet
   queue to service.)
   
   Tested:
   	* AR9280 STA
   
   TODO:
   	* test on AR5416, AR9160, AR928x STA/AP modes
   
   PR:		kern/168649
 
 Modified:
   head/sys/dev/ath/if_ath.c
   head/sys/dev/ath/if_ath_misc.h
   head/sys/dev/ath/if_ath_rx.c
 
 Modified: head/sys/dev/ath/if_ath.c
 ==============================================================================
 --- head/sys/dev/ath/if_ath.c	Tue Jun  5 03:14:39 2012	(r236596)
 +++ head/sys/dev/ath/if_ath.c	Tue Jun  5 03:14:49 2012	(r236597)
 @@ -142,6 +142,7 @@ static void	ath_vap_delete(struct ieee80
  static void	ath_init(void *);
  static void	ath_stop_locked(struct ifnet *);
  static void	ath_stop(struct ifnet *);
 +static void	ath_tx_tasklet(void *arg, int npending);
  static int	ath_reset_vap(struct ieee80211vap *, u_long);
  static int	ath_media_change(struct ifnet *);
  static void	ath_watchdog(void *);
 @@ -2330,7 +2331,7 @@ ath_start(struct ifnet *ifp)
  	taskqueue_enqueue(sc->sc_tq, &sc->sc_txstarttask);
  }
  
 -void
 +static void
  ath_tx_tasklet(void *arg, int npending)
  {
  	struct ath_softc *sc = (struct ath_softc *) arg;
 @@ -3509,8 +3510,7 @@ ath_tx_proc_q0(void *arg, int npending)
  	sc->sc_txproc_cnt--;
  	ATH_PCU_UNLOCK(sc);
  
 -	// ath_start(ifp);
 -	ath_tx_tasklet(sc, 1);
 +	ath_tx_kick(sc);
  }
  
  /*
 @@ -3560,8 +3560,7 @@ ath_tx_proc_q0123(void *arg, int npendin
  	sc->sc_txproc_cnt--;
  	ATH_PCU_UNLOCK(sc);
  
 -	//ath_start(ifp);
 -	ath_tx_tasklet(sc, 1);
 +	ath_tx_kick(sc);
  }
  
  /*
 @@ -3604,8 +3603,7 @@ ath_tx_proc(void *arg, int npending)
  	sc->sc_txproc_cnt--;
  	ATH_PCU_UNLOCK(sc);
  
 -	//ath_start(ifp);
 -	ath_tx_tasklet(sc, 1);
 +	ath_tx_kick(sc);
  }
  #undef	TXQACTIVE
  
 
 Modified: head/sys/dev/ath/if_ath_misc.h
 ==============================================================================
 --- head/sys/dev/ath/if_ath_misc.h	Tue Jun  5 03:14:39 2012	(r236596)
 +++ head/sys/dev/ath/if_ath_misc.h	Tue Jun  5 03:14:49 2012	(r236597)
 @@ -83,7 +83,17 @@ extern void ath_setslottime(struct ath_s
   * we can kill this.
   */
  extern void ath_start(struct ifnet *ifp);
 -extern void ath_tx_tasklet(void *arg, int npending);
  
 +static inline void
 +ath_tx_kick(struct ath_softc *sc)
 +{
 +
 +	/*
 +	 * Use a taskqueue to schedule a TX completion task,
 +	 * even if we're in taskqueue context.  That way this can
 +	 * be called from any context.
 +	 */
 +	taskqueue_enqueue(sc->sc_tq, &sc->sc_txstarttask);
 +}
  
  #endif
 
 Modified: head/sys/dev/ath/if_ath_rx.c
 ==============================================================================
 --- head/sys/dev/ath/if_ath_rx.c	Tue Jun  5 03:14:39 2012	(r236596)
 +++ head/sys/dev/ath/if_ath_rx.c	Tue Jun  5 03:14:49 2012	(r236597)
 @@ -899,8 +899,7 @@ rx_proc_next:
  		ieee80211_ff_age_all(ic, 100);
  #endif
  		if (!IFQ_IS_EMPTY(&ifp->if_snd))
 -			ath_tx_tasklet(sc, 1);
 -			//ath_start(ifp);
 +			ath_tx_kick(sc);
  	}
  #undef PA2DESC
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206050320.q553KAJb087659>