From nobody Wed Oct 02 19:53:21 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 4XJlq62Dnzz5Y1Ry; Wed, 02 Oct 2024 19:53:22 +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 4XJlq612T0z4Xy3; Wed, 2 Oct 2024 19:53:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898802; 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=Cb7c1P8d5J2Z7j/ye/LscShG0cwctRTToq6jxEEksQI=; b=xynfG5y7jt2wJ8QSqivxJcPP4hMEN9r7pvNdt3e6GIFF/80L/ngoVkehoz/+esSO7NQ/iA O5oM3ITiBTl+1CsvWyWj+z05PVqsY2gUTwLr53pKBS/Q02vv2RCb50OHXeF4dpOmRiMNMf KOnkgLoDnOkefUL4WH9AtPjp6OthYyo8wwDgQwlLbOnDYY+jm9QlOkrIQl5dK2BHFsSaZz mm0ra0euK12OmYNRnkw5evaOPhe73RRo79HBAYWp4AfLlrWqshiewDJ2MVkBLxuLvTCYrg E2E8WlzO7N0GqceaE5szZJtgvfVRHjyaOkly8mHVNFxfH4FXFES+zkRqphJ9EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727898802; 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=Cb7c1P8d5J2Z7j/ye/LscShG0cwctRTToq6jxEEksQI=; b=yRrY2tVltDQvV+GIoAYUDLqtPty1ZBKn65z+5wgrADoGQqNFu++LBqEPQlLcezqWTAsOt6 oNIkugavBtKwax0K4tfuB/SLRGq68Z41tzJ8HWKCBB3Hnjtz5whoG05xTsJ/Or68Owfvoq l8W19cZRckkdvic6sS6HzGwxSue1HGIANTUgnPz8JkSbQTm5hJ56C5SKLEjkWBcubZUQwA iZOrSqMakkdBG7kInHShwuS9/4LEfLMm9Qmpp5tky30dm0vhLctecnR67QUoRi6LvAmoaI EIUyDoaL9odG8P5JFc9ROqLGmcOk/wWbR5MrYu3ET0TiLP2eVhRC3D4Ldy7ckw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727898802; a=rsa-sha256; cv=none; b=M/4+0L/YD5X6JikYxW6+sD7ir+RTs6CxDnK/BSREMcm12NdMwLEsYBnXV/aWUBB7MT1ixF 1+Pn6OhqArrBSuwFSngKfGOo2NftIfQcGPZvMvTdXTkXwc/k6Vri8HwZ9432J8GNCsveYC EZ4iys5tnzedX1s+Hn3a0i/RlkCspR7K+2vod9/uZ8aSNJd1HIp/HutgNeLtuYhigfGbdC +W5cwVkaUTlnNAZ4fu9MumBi+Y13yMAvjdM/QsdsojsqHh2odqbcbDXJJ41kBpSPKcJhCp 6GbyjUtuo+agOzvFNEMdbTCJUAVotz5Sv0uuBPwjv+07Hs79mYFbg/Y03ZWqhg== 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 4XJlq60bFxzKHD; Wed, 2 Oct 2024 19:53:22 +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 492JrLlq060665; Wed, 2 Oct 2024 19:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JrLDI060661; Wed, 2 Oct 2024 19:53:21 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:53:21 GMT Message-Id: <202410021953.492JrLDI060661@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: d3c81ec4e90d - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: d3c81ec4e90dfea3d2ecb2dc759f4f104bed0ce1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d3c81ec4e90dfea3d2ecb2dc759f4f104bed0ce1 commit d3c81ec4e90dfea3d2ecb2dc759f4f104bed0ce1 Author: Krzysztof Galazka AuthorDate: 2024-09-25 20:28:52 +0000 Commit: Kevin Bowling CommitDate: 2024-10-02 19:52:39 +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 8cb0d0610a21..fa6227f3f80a 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6424,15 +6424,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; @@ -6440,17 +6436,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,