From owner-svn-src-head@freebsd.org Wed Jun 3 22:30:44 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE5252F51A8; Wed, 3 Jun 2020 22:30:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ckBr5Q1Zz3dl3; Wed, 3 Jun 2020 22:30:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4040154C0; Wed, 3 Jun 2020 22:30:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 053MUia4040061; Wed, 3 Jun 2020 22:30:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 053MUiiN040059; Wed, 3 Jun 2020 22:30:44 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202006032230.053MUiiN040059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 3 Jun 2020 22:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361778 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 361778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 22:30:44 -0000 Author: adrian Date: Wed Jun 3 22:30:44 2020 New Revision: 361778 URL: https://svnweb.freebsd.org/changeset/base/361778 Log: [run] Fix up tx/rx frame size. This specifically fixes that TX frames are large enough now to hold a 3900 odd byte AMSDU (the little ones); me flipping it on earlier messed up transmit! Tested: * if_run, STA mode, TX/RX TCP/UDP iperf. TCP is now back to normal and correctly does ~ 3200 byte AMSDU/fast frames (2x1600ish byte MSDUs). Modified: head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Wed Jun 3 22:19:52 2020 (r361777) +++ head/sys/dev/usb/wlan/if_run.c Wed Jun 3 22:30:44 2020 (r361778) @@ -3050,10 +3050,11 @@ run_bulk_rx_callback(struct usb_xfer *xfer, usb_error_ tr_setup: if (sc->rx_m == NULL) { sc->rx_m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, - MJUMPAGESIZE /* xfer can be bigger than MCLBYTES */); + RUN_MAX_RXSZ); } if (sc->rx_m == NULL) { - RUN_DPRINTF(sc, RUN_DEBUG_RECV | RUN_DEBUG_RECV_DESC, + RUN_DPRINTF(sc, RUN_DEBUG_RECV | + RUN_DEBUG_RECV_DESC | RUN_DEBUG_USB, "could not allocate mbuf - idle with stall\n"); counter_u64_add(ic->ic_ierrors, 1); usbd_xfer_set_stall(xfer); Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Wed Jun 3 22:19:52 2020 (r361777) +++ head/sys/dev/usb/wlan/if_runvar.h Wed Jun 3 22:30:44 2020 (r361778) @@ -23,14 +23,15 @@ #ifndef _IF_RUNVAR_H_ #define _IF_RUNVAR_H_ +/* Support up to 4KB frames - useful for A-MSDU/FF. */ #define RUN_MAX_RXSZ \ MIN(4096, MJUMPAGESIZE) -/* NB: "11" is the maximum number of padding bytes needed for Tx */ +/* Support up to 8KB frames - useful for A-MSDU/FF. */ #define RUN_MAX_TXSZ \ (sizeof (struct rt2870_txd) + \ sizeof (struct rt2860_txwi) + \ - MCLBYTES + 11) + 8192 + 11) #define RUN_TX_TIMEOUT 5000 /* ms */