From nobody Wed Oct 11 10:59:12 2023 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 4S58sg5XtDz4xFGB for ; Wed, 11 Oct 2023 10:59:19 +0000 (UTC) (envelope-from pavel.popa@edu.unife.it) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (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 4S58sf2tpWz4NcL for ; Wed, 11 Oct 2023 10:59:17 +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=wCFkr85O; spf=pass (mx1.freebsd.org: domain of pavel.popa@edu.unife.it designates 2607:f8b0:4864:20::233 as permitted sender) smtp.mailfrom=pavel.popa@edu.unife.it; dmarc=pass (policy=quarantine) header.from=edu.unife.it Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3af608eb34bso4553104b6e.1 for ; Wed, 11 Oct 2023 03:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edu.unife.it; s=google; t=1697021957; x=1697626757; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=I1BCvB3zF9PS950rUBAE833y0/lRNggAysXCU/+SyYk=; b=wCFkr85OiFk/k0rnqh+Kyi1OV+ggJ/wKgH8HEGg3Qw8VDovnXvRK6TfflQkQRTMdxJ 0FobmN5S/CpASJd3y4rzuY04yObUJOVgMXxSgs/GDpR9AJubCRcDS1vwuUcHPDD1tE+x syeT6cI9gUm9zBFEAA8opJEL2iYZPLaKAqgfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697021957; x=1697626757; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=I1BCvB3zF9PS950rUBAE833y0/lRNggAysXCU/+SyYk=; b=QFFH4PAtT4vl5/WrlKNG4zKnIACo/p1G9msuQ35zo8rju6zaXpR+sjBEU5RNXT955Y 6dNx3v27hk1wqKBG1y5PwEJzGUtQrZPhYkAKutNNCBE9ucMiaIXs6S8wvV7Rge76FeoN D7D75/5sjA/Vsq0lOoem27WN7ySHEjjyxYHoRXck8Q2wedXQ5RB4/QiGdSlK/J5uXGNG +PS9WThYtQD9TdT6V4mH6/NipECYH+LozaVypb4ZI88FXQ5zEHPl3RQfY/tsXD66WtPo u0blzd7tdo+C6LowQ2zInGpo/CyHNhKslpuxpEpQH/U0JJWxLkjJOV9PPoMRQw0mt1fj HLrA== X-Gm-Message-State: AOJu0YxEdGN4f4RncbSFtOA9TA3tvoacPPWph2/Kc4wrOcCsOOaSMqZm 8elIls2lHNtfxMu7TXiJr/zgvUGljj85VSVVFvDD7Zk0G8DTpGetvg57ow== X-Google-Smtp-Source: AGHT+IH/APUP5pgWOPuf2F3fov1thKhPbMhAPDpqd2KalGro2fYpPp2OlzjgfZv9pwrnNZlSV7pUtKyYX3mRN91OtB4= X-Received: by 2002:a05:6358:4298:b0:143:8af4:229e with SMTP id s24-20020a056358429800b001438af4229emr24951084rwc.9.1697021956785; Wed, 11 Oct 2023 03:59:16 -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, 11 Oct 2023 12:59:12 +0200 Message-ID: Subject: About "ifmp_ring" To: freebsd-net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-5.00 / 15.00]; DWL_DNSWL_LOW(-1.00)[unife.it:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[edu.unife.it,quarantine]; 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]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::233:from]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[edu.unife.it:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4S58sf2tpWz4NcL Hi everyone, Reading the IFLIB's code I noticed this "ifmp_ring" data structure, but by checking the "mp_ring.c/h" files, I cannot see a single comment nor any documentation whatsoever about what that really is (I guess some kind of lock-free ring buffer? but then why not using "buf_ring"?), and/or at least a simple example of its intended correct usage. Did anyone work with this "ifmp_ring" that knows what it really is and how to properly use it, and is kind enough to share that here please? As its only user that I can see, seems to be IFLIB, and of course I can dig deeper into IFLIB to (probably) understand all that, but this option seems pretty painful and onerous to me. Thanks in advance, Pavel