From nobody Wed Mar 20 16:52:37 2024 X-Original-To: freebsd-net@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 4V0F5H5dCyz5FvDB for ; Wed, 20 Mar 2024 16:52:51 +0000 (UTC) (envelope-from pavel.popa@edu.unife.it) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V0F5F6xJqz3yjV for ; Wed, 20 Mar 2024 16:52:49 +0000 (UTC) (envelope-from pavel.popa@edu.unife.it) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=edu.unife.it header.s=google header.b=mZ2PJw3R; dmarc=pass (policy=reject) header.from=edu.unife.it; spf=pass (mx1.freebsd.org: domain of pavel.popa@edu.unife.it designates 2607:f8b0:4864:20::531 as permitted sender) smtp.mailfrom=pavel.popa@edu.unife.it Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-5cfd95130c6so11918a12.1 for ; Wed, 20 Mar 2024 09:52:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edu.unife.it; s=google; t=1710953568; x=1711558368; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=6x/WhwrBxQntRYRIIHnvZ1bw3JS3lYUoKq0g9mfjolU=; b=mZ2PJw3Rbj14UJutF0AryD4jwIxgO/Fr5Zapvv4ot3qO4NmdM4oxi/v8FDRfpniPvq 26yxfPS/nuxcUbZlgmZcKtrCm+6+bMD+yT9FdRlXrt+s464W1UX6x4to3TGiYyyy+R4K l2h7qckYMImQvHAVY6kV0Ta9E7B5+ajmus0LM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710953568; x=1711558368; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6x/WhwrBxQntRYRIIHnvZ1bw3JS3lYUoKq0g9mfjolU=; b=ZuFrnxx0sZHFTMW5hJndccwfkBq5UL2NeuYcIailbCB/8Ewogcg6PbJJdmNqejWP+m fEsz1ruwm2CnDlj3LUPPminK6fnoc1pL9r8VVQBk2Uhi71QdbG/s0j+JwgTHvz1hf6sI OnC4RhrC3y1TqJPWGuWRA9kF2jDleb/ySblK1RL7SG2B2IGYbbcZmrN2jS2DKrpUpfk0 vQcGlDLP06NIulCJThsdmI7rfmlcirWpGZAxK0wnZCDKCOULNYuxNN02FVjYyx7sIiok 31exQ5xNz+ykjqgLNl0UVgCJKXV8g7Q3usvqhghwP2KdLkNZRicfmTCvJxy7mSVqxQjy fFcQ== X-Gm-Message-State: AOJu0YxBM5fedXh+pVXEWHSKos/kU40yHXcS5WBVYuZjgo91O369uN9+ anHaca3o3Mwopuy0a3u2f6E++WKsObxjhScEfgLLslm6m/h4mmlZqwKEx+1VkNvu2Epgu1990MP Z9JgKc8m1iZ+mPVf+AmKvZ40HNaszrXOGR4fGSR84f1pDjHEg/H97bw== X-Google-Smtp-Source: AGHT+IFisYEQ2e5hvVDhh5S/A6LB37OcN3SaoWWfNHxJq0N3rp/9vhnUiggJrumVqFpWm3o50IRhJwdsYkDeFdhXClE= X-Received: by 2002:a05:6a20:29a1:b0:1a3:4785:c8be with SMTP id f33-20020a056a2029a100b001a34785c8bemr5299950pzh.16.1710953567761; Wed, 20 Mar 2024 09:52:47 -0700 (PDT) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 From: PAVEL POPA Date: Wed, 20 Mar 2024 17:52:37 +0100 Message-ID: Subject: IFLIB msi-x initialization extension/patch request To: freebsd-net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[unife.it:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.972]; DMARC_POLICY_ALLOW(-0.50)[edu.unife.it,reject]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[edu.unife.it:s=google]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::531:from]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; DKIM_TRACE(0.00)[edu.unife.it:+] X-Rspamd-Queue-Id: 4V0F5F6xJqz3yjV Hi everyone, Don't know where I should ask this, so I'll just try with this mailing list as a first attempt. I have implemented an IFLIB based network device driver for a Xilinx FPGA card with a custom firmware, everything seems to work fine except for the number of RX/TX queues selected by IFLIB during 'iflib_msix_init()', which seems to be based on the number of MSI-X vectors actually available on the HW, which in my specific case that's 8. This FPGA does implement a solution that bypasses the fact of dedicating an MSI-X vector per queue, by providing an "interrupt aggregation ring" for which the driver receives interrupts to read from this interrupt ring whose descriptors tell which specific queue and queue type (if RX or TX) needs servicing. In this way the number of RX/TX queues that can be allocated is independent of the MSI-X vectors available on the HW. I have implemented this successfully in the driver already, but with the limitation of not being able to allocate more than 8 RX/TX queues due to the way IFLIB decides that. Finally to my question, it seems to me that a pretty simple patch on the IFLIB side could do the trick, i.e. allowing to have this "flexibility" in the number of RX/TX queues decided, when the related interrupts are to be processed via such "interrupt ring" mechanism/design. Who should I ask for this if such an extension/patch is even possible and acceptable? Should I propose the patch myself or it can be handled by some maintainer? Thanks