From nobody Wed Oct 02 19:56:02 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 4XJltC2GvZz5Y1bh; Wed, 02 Oct 2024 19:56:03 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJltB6g2Dz4ZYW; Wed, 2 Oct 2024 19:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898963; 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=pVNROi03aguIIdU9Rh/DUU0IyEUzGK+0QmA4gUx96SA=; b=hNKQifwDorel39fJiVZpHCdx+23RLU2UmYAcX7mT+ihYPqtnQwzJuDkS4WTY0rCh9H8g0I S06BGjP2cKjGnu+S6tTF3e41xfmb20QVODx7pp7ozaWc1fUJgHw6uvNXcpm/Kooy0CIXHV IthkRTiMoWu199XDPOhGc5tk1BbMzvvTUpl4+RILSqkoFOjTqO/0Na+pCCLSKx/FF1aJ7T TvdEKgOQ/+jbspW86TH0diQ39/Ngk3UIgdvC51r/eq9ojFrUw+Eg97BkoqNRXWaaynG8IB Tf/2Ds+ATGyr7+09JOoUin9QJsxJ/9udFmpuyAkBhNuCr+TtpDux2IXiOwokeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898963; 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=pVNROi03aguIIdU9Rh/DUU0IyEUzGK+0QmA4gUx96SA=; b=inGa1rJxL4+D9p4N8MmumKVSMxkJLpkK16Dsy9067E0bimjxb2MOwK+oRc1lLshFe3uMIZ Ai/qOojAaW24S/YrR8PlI2tF7KPofcYXNW1hx6BU4/mLZ/g4hx3K7XZ816IGZt1Q5hO9u3 VaOiMcKhYQiDjzsmohyWDeaS+tBFLTD/pjSLy4flIvl325dbGUPLkSY62ppPLcctynCVUL sPHdQaLTkvwzW+MJd0IRQJaoT7VPZZXC+TP9YLnkC21yk0gsPhZqpbom+Gy549nk64FCEE xxU3RphgNDcaPi92BFsggY5tEeu//S6aFB3P1EPnKd43q9FXcMvQo5ah62NtdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898963; a=rsa-sha256; cv=none; b=GIxsQIZAZB74+YcvAHgIgDTBxZ6c9iQHlQolj2iu++foN9o5cDlD3hTViOo3d8B+p8EJg9 v2Iwf8FZYC7au2nBMaKCnQAsxbrdQ526ms17zamKDZwzM/b7BAW3/hUsgK0YH4/Cstg3W2 ubzGHm/h/jGPt+Te3/PgRqKSIdBM1ziGbXL/yHvVinA+kcLKkc0ZpFMhRm58nSghbkWuXL kVA45X7yE/4I/fvGk2zf7Ko7cKpqsZA82ledjutn5ERmS6yIFb5MErUQk7LzLFksG6OE02 nB0CHFzXASDsS+xqbmMJi/Su3eHYd8tla4Lt3VNKRvSy/BFcPel7vuda3dMOXg== 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 4XJltB6Cw4zKYd; Wed, 2 Oct 2024 19:56:02 +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 492Ju2in061612; Wed, 2 Oct 2024 19:56:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492Ju2cl061609; Wed, 2 Oct 2024 19:56:02 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:56:02 GMT Message-Id: <202410021956.492Ju2cl061609@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: fa0f7eefb92b - stable/13 - iflib: Simplify iflib_legacy_setup 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: fa0f7eefb92b01fc55358b59f2d65581edfa07bf Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fa0f7eefb92b01fc55358b59f2d65581edfa07bf commit fa0f7eefb92b01fc55358b59f2d65581edfa07bf Author: Krzysztof Galazka AuthorDate: 2024-09-25 20:28:52 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:55:36 +0000 iflib: Simplify iflib_legacy_setup Follow the pattern from iflib_irq_alloc_generic function and use iflib_fast_intr as a handler for RX only interrupts. Also remove some intermediate variables and use consistent way for referencing queue's structures. Signed-off-by: Krzysztof Galazka Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46061 (cherry picked from commit 36a001923836e280e750b76947b8705fcc47b0b7) --- sys/net/iflib.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 252fb3b529ed..6f91c0c7f2d8 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6652,15 +6652,11 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * device_t dev; struct grouptask *gtask; struct resource *res; - struct taskqgroup *tqg; - void *q; int err, tqrid; bool rx_only; - q = &ctx->ifc_rxqs[0]; - info = &rxq[0].ifr_filter_info; - gtask = &rxq[0].ifr_task; - tqg = qgroup_if_io_tqg; + info = &rxq->ifr_filter_info; + gtask = &rxq->ifr_task; tqrid = *rid; rx_only = (ctx->ifc_sctx->isc_flags & IFLIB_SINGLE_IRQ_RX_ONLY) != 0; @@ -6668,17 +6664,17 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; - info->ifi_ctx = rx_only ? ctx : q; + info->ifi_ctx = rxq; dev = ctx->ifc_dev; /* We allocate a single interrupt resource */ - err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr_ctx : + err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr : iflib_fast_intr_rxtx, NULL, info, name); if (err != 0) return (err); - NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, q); + NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, rxq); res = irq->ii_res; - taskqgroup_attach(tqg, gtask, q, dev, res, name); + taskqgroup_attach(qgroup_if_io_tqg, gtask, rxq, dev, res, name); GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq); taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, dev, res,