From nobody Wed Nov 27 02:14:30 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 4XyjgW1skjz5fMpp; Wed, 27 Nov 2024 02:14:31 +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 4XyjgV73jNz4gMy; Wed, 27 Nov 2024 02:14:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673671; 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=mhXL/MfBb+1tdFtGHYvA3tE4DhcTlyH3rW7SEdLrnKA=; b=sOstmDaR94a+XL8bb+t3O3H9kX2QKKZEUF/pnbhebQ1eZiJzCTaecrnm6dlrVDWUHMYwbH 2zOqQWpF4ehskPABLK6pag99pOcJUp0Dy0YMO7s2SU5lrkdd1Q/52f9Yy/UVPJUf+TTIk6 OTcM909+JNZaZXpMUeagvjfeLrYPi4uJn1y49tskPFZLIIZaXKo5+QBTwlPnLq8NgSvOYm tKEaFgIj7D0iZIn1pHayuNlbbO2gMfR3IrpnyH1cs/mFcdyYOfGOtwmjfeJLUJeOFvPGUb +ylIlFrQBGlKFLiLdyItV8HNI6yem3PPiiHM9f1GW+L38I8IKfKGuoFG6m+xqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732673671; 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=mhXL/MfBb+1tdFtGHYvA3tE4DhcTlyH3rW7SEdLrnKA=; b=kOCJJfMselVxvvpJjpju/SDmlotv3ZvsIbu/XPS7dQQ0ruwKiDm9fQ6ECcv+ZLzhmPcLln mhQnzuM/eT3A/1vureefKmVtzGdeF4HpJoKAH02Bc8OjZzX7WziAUgajS8/wiSQk3SbxBU KNToiJdYpGf1/VBUABXD45mZvnNlUVQRbgBjQTbKVFktzspg34yF4i3o5zCdLMcuw7LQ7G 5Aiyt/tFOxuQbIJLd6He82swYsUDlqIrVh52o5CDVIlMVaZLXP+txZUrN/uGOURm8ZZVWX qMSbdU41ZAoHd5b4sOsdZUbc8XIlBV+CNprYlYbNiVf8wk0eVziilsuWEjVlWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732673671; a=rsa-sha256; cv=none; b=nj6nvH176wQdYy3DzzG4pdq7HUgWB3J5uGGs0PLX3tKahvmCHyaQuovkgtSn3pYOjkiqYA MD1RMkVwggAzRCd222JczaL6vmmLit2t/pBurLsiFMn1FDGFNREHA4per2bRykYrxK33NN UM1x47PvGsKNJEbXzgkzwCDn9cW4fW9VU00/gdOSvvClr1nCzfsawPeO2OgcdtXlCdRAc5 DqFHAMph9Wpo7/sDzbD9gMgiWNmxJm8au0vznXtq/AM6m68xtVi8EVpgHKz0gurizzL4A9 7oYrpOeWsF11Qwwr86A11GnFng4UW5MO9kBbEsMYzUuHAz6EAE9QRRU/AeyqoA== 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 4XyjgV6C1bzqmY; Wed, 27 Nov 2024 02:14:30 +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 4AR2EUTa067016; Wed, 27 Nov 2024 02:14:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AR2EUg3067013; Wed, 27 Nov 2024 02:14:30 GMT (envelope-from git) Date: Wed, 27 Nov 2024 02:14:30 GMT Message-Id: <202411270214.4AR2EUg3067013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 987d5642ebbd - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 987d5642ebbd9ba496d18dc572a44248da756cbf Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=987d5642ebbd9ba496d18dc572a44248da756cbf commit 987d5642ebbd9ba496d18dc572a44248da756cbf Author: Kevin Bowling AuthorDate: 2024-11-24 07:27:12 +0000 Commit: Kevin Bowling CommitDate: 2024-11-27 01:18:41 +0000 igc: Style pass igc_txrx Fix up indentation and reflow long lines. MFC after: 3 days Sponsored by: BBOX.io (cherry picked from commit c7fb7b5d9fcd1fc67794228820aa54df388d47b4) --- 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); } }