From nobody Sun Nov 24 07:28:23 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xx0n36BRYz5dgRq; Sun, 24 Nov 2024 07:28:23 +0000 (UTC) (envelope-from git@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xx0n35fZMz4hll; Sun, 24 Nov 2024 07:28:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732433303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2icgXbiIqT2k33PYLBLfo7hqjlAzaqb0Ntlr+aftnyE=; b=iIwobV0Kbl8KB5n3GtJ9oC2VIebIDN3IoxFiD3R6imgJleAQQf1YWclK1JvKjbPWJ79T3r PLQZymRvBHgMamUJQfFhjVZsrdQFScTZ2pBNlFFrEnJcCSBFpGrO0aHdMV1g32M7BWSB6p IrSYyyWQYvY6/Q/DF6cIR2woNbuFhQrWMfItvZNVl1zq9Q/2vLR0QxFb0gSGaQEKHIE5Ea ijKTdVYO9GG8Cm2lMXh3NTvACO2Q8VEtMok3w7nSq319wRQbuuflfzEWvNDVXsimehg4n/ rVvf7498xNZuMTjROiZKLOakO6Iig9Yyg7+MQDH2hOpLZA2TiA1OAersmBYOpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732433303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2icgXbiIqT2k33PYLBLfo7hqjlAzaqb0Ntlr+aftnyE=; b=LRIhlWXC3oggXKB/B3OWIy9ZS5155AW62j6vCbzeTlbijjZgbczeik/M8Pt7xyxUaGz4I1 6yVqcM+E+p5gFQjB7j+uVt1KMpLhKcgwDEEwNRviAAaqVPQIY1Kv59jR1Rd2bWYCOWleHC xHoOxTZjX5CFkFwm/tQgI+EjwiBHUTWrOMZ6ni3t4RuyXRT5Y1BFx1T6EAt0QmWpygvIlZ IAmoOQRAzHs5sIo1ehV3bECMKMSF3KoBDZtQw85sFVCHLms6xy9GlNbofCq1G3pXRwr/zD Rg2eXU7FifQ7sTTgb0mvcdfmSHG4vBaZRvAXCc5RwkgNilWfzetMw/SJBveFiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732433303; a=rsa-sha256; cv=none; b=Hs5g2kkyqn39269biAoOyvjWTy+fvu2qSW8k6wy7GV2E0cS64VrBt+XjhW/4e0whfPnHtE uXKE3+TdSdkocBKGJ8HTfJIPYsrtZOrvI98DWYXShaBo+cGH3jZyKUapbnBSHR1kI1GerD cz9fSLokr7hMBXJ/2Ioi22Nc7ufS94DqkOSzcBWT0qmSKUiHHV56xN2Wj0rve6qJa7IYDh 4H3FjwbsrNvqBiSoSjPSot/4ZPKfWW8Ogiv1LPKDE4sGjFIbyreujAH4Hfd5AuShQJvc2f EFu3Vl9aUgQEJl1RRrVKYXrTJQDdu2oALj/tYO2jG9+Zqd2KIqB9yjQcBLIg9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xx0n35FM4zlDk; Sun, 24 Nov 2024 07:28:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AO7SNqG088630; Sun, 24 Nov 2024 07:28:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AO7SNYW088627; Sun, 24 Nov 2024 07:28:23 GMT (envelope-from git) Date: Sun, 24 Nov 2024 07:28:23 GMT Message-Id: <202411240728.4AO7SNYW088627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: c7fb7b5d9fcd - main - igc: Style pass igc_txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7fb7b5d9fcd1fc67794228820aa54df388d47b4 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c7fb7b5d9fcd1fc67794228820aa54df388d47b4 commit c7fb7b5d9fcd1fc67794228820aa54df388d47b4 Author: Kevin Bowling AuthorDate: 2024-11-24 07:27:12 +0000 Commit: Kevin Bowling CommitDate: 2024-11-24 07:27:12 +0000 igc: Style pass igc_txrx Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io --- sys/dev/igc/igc_txrx.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/sys/dev/igc/igc_txrx.c b/sys/dev/igc/igc_txrx.c index 59f4725388ee..92ba81c79c58 100644 --- a/sys/dev/igc/igc_txrx.c +++ b/sys/dev/igc/igc_txrx.c @@ -97,15 +97,19 @@ igc_dump_rs(struct igc_softc *sc) cur = txr->tx_rsq[rs_cidx]; status = txr->tx_base[cur].upper.fields.status; if (!(status & IGC_TXD_STAT_DD)) - printf("qid[%d]->tx_rsq[%d]: %d clear ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[%d]: %d clear ", + qid, rs_cidx, cur); } else { rs_cidx = (rs_cidx-1)&(ntxd-1); cur = txr->tx_rsq[rs_cidx]; - printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); + printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", + qid, rs_cidx, cur); } - printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, + txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { - if (txr->tx_base[i].upper.fields.status & IGC_TXD_STAT_DD) + if (txr->tx_base[i].upper.fields.status & + IGC_TXD_STAT_DD) printf("%d set ", i); } printf("\n"); @@ -138,14 +142,15 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, break; default: panic("%s: CSUM_TSO but no supported IP version (0x%04x)", - __func__, ntohs(pi->ipi_etype)); + __func__, ntohs(pi->ipi_etype)); break; } TXD = (struct igc_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; /* This is used in the transmit desc in encap */ - paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - pi->ipi_tcp_hlen; + paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - + pi->ipi_tcp_hlen; /* VLAN MACLEN IPLEN */ if (pi->ipi_mflags & M_VLANTAG) { @@ -180,8 +185,8 @@ igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, * **********************************************************************/ static int -igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len, - uint32_t *olinfo_status) +igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, + uint32_t *cmd_type_len, uint32_t *olinfo_status) { struct igc_adv_tx_context_desc *TXD; uint32_t vlan_macip_lens, type_tucmd_mlhl; @@ -275,7 +280,7 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = olinfo_status = 0; /* Basic descriptor defines */ cmd_type_len = (IGC_ADVTXD_DTYP_DATA | - IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); + IGC_ADVTXD_DCMD_IFCS | IGC_ADVTXD_DCMD_DEXT); if (pi->ipi_mflags & M_VLANTAG) cmd_type_len |= IGC_ADVTXD_DCMD_VLE; @@ -324,9 +329,9 @@ igc_isc_txd_encap(void *arg, if_pkt_info_t pi) static void igc_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx) { - struct igc_softc *sc = arg; - struct igc_tx_queue *que = &sc->tx_queues[txqid]; - struct tx_ring *txr = &que->txr; + struct igc_softc *sc = arg; + struct igc_tx_queue *que = &sc->tx_queues[txqid]; + struct tx_ring *txr = &que->txr; IGC_WRITE_REG(&sc->hw, IGC_TDT(txr->me), pidx); } @@ -370,12 +375,13 @@ igc_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear) MPASS(delta > 0); processed += delta; - prev = cur; + prev = cur; rs_cidx = (rs_cidx + 1) & (ntxd-1); - if (rs_cidx == txr->tx_rs_pidx) + if (rs_cidx == txr->tx_rs_pidx) break; cur = txr->tx_rsq[rs_cidx]; - status = ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; + status = + ((union igc_adv_tx_desc *)&txr->tx_base[cur])->wb.status; } while ((status & IGC_TXD_STAT_DD)); txr->tx_rs_cidx = rs_cidx; @@ -411,7 +417,8 @@ igc_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +igc_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct igc_softc *sc = arg; struct igc_rx_queue *que = &sc->rx_queues[rxqid]; @@ -477,7 +484,8 @@ igc_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) MPASS ((staterr & IGC_RXD_STAT_DD) != 0); len = le16toh(rxd->wb.upper.length); - ptype = le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; + ptype = + le32toh(rxd->wb.lower.lo_dword.data) & IGC_PKTTYPE_MASK; ri->iri_len += len; rxr->rx_bytes += ri->iri_len; @@ -558,7 +566,8 @@ igc_rx_checksum(uint32_t staterr, if_rxd_info_t ri, uint32_t ptype) (ptype & IGC_RXDADV_PKTTYPE_SCTP) != 0)) { ri->iri_csum_flags |= CSUM_SCTP_VALID; } else { - ri->iri_csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + ri->iri_csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; ri->iri_csum_data = htons(0xffff); } }