From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56690606A6B1 for ; Wed, 2 Dec 2026 17:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=GDV5U4Py Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2155440608; Wed, 2 Dec 2026 18:29:16 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mails.dpdk.org (Postfix) with ESMTPS id 5BE0B402D5 for ; Wed, 2 Dec 2026 18:29:14 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-8a0880a46e7so39614b3a.1 for ; Wed, 02 Dec 2026 09:29:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796232553; x=1796837353; darn=dpdk.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=QLoX+WJSnGLSih10lZn2yFulhJS2bDXaZgl5iBByYdI=; b=GDV5U4PyShPc3O0MIO47XCpMSLSFn4frGhtPmcfRxrWkhq0CkstShtVKb0ZWjOYZD3 NG/aKU91oocbDcAvT3UlimCy/R7rHxv72U7TaWZkAliEyXGxeofCTVt/AhUxtHaFs1TG Sb2HkhCxCOxqnZl111R95E6fwX+UwCLe8oZsoUbodabdiH30i/MFNu6GL+1H2d9w683Q 839vVRk4tYC0eyLt2xabUcJtiqH/DdBk/h6/jITSp+MrqXyl3gNY7+DPQ0Am6oSCSwDY KLsC3qebo7vVpJaFYpeBnbyFMQDxcq+IrJDlfNIINh+Vfguk42HBjyEYgOXDrOIGLDnM +WFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796232553; x=1796837353; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=QLoX+WJSnGLSih10lZn2yFulhJS2bDXaZgl5iBByYdI=; b=F2sibMtQ6/PhxNbw5h9w09dVUGmp5yPN1f8SwYriE5CKwFuBKR/5E87hSzSBNc70YK bXj4YQXtZi7lLsHPBePEM2QgYKbBpVNPa2hJbY4NTm6K5qlPLq9z2E9NSk6vOJcAKDQD 5MQqf/qNlAmfIw+UbqM41/7dFydKh/Dub2Hm0frsYEi4Z24RFn/bz8nsaQCcsGi774NB M8jZr/jxIGVDdczaO5jll9gtiC0mFVKjoGAl55cZeTR23tIjP25uRS1ZLnb9Wn2iiHLm O1CT/rQ+9Dxr4Qq3dcy0M8ajTAK9e3jWTl1A6r0Dwf1FKgyo6wdRzfV2ZN+ELxd2zOCw p1Hw== X-Gm-Message-State: APuU4Z9J6jLq0rnClm0SpF+SNsWje36x1/IOWH4GPaWrAMu455/9Ma7Y z9OjX0/Fd/EREd/NdxZ0oZRd66myJT3Ebmls618nstSpfnXMGFNVVdbWspG3YaCPvJQ= X-Gm-Gg: AZFdTZfs5sJUdr33SSxRdljClykqlDYWtCenZaFpaZnAQLanELrWb9aMPD5oSF6/2Qz UhIuqHcczlZj+JdqmsLxq4ew/k6IuNVI0pSh/aWk4fm4J1XpVtsm4AZzO7RikpnmCot19zt3waG oqhMKbM9E8HsQoBVO8AaYkl6/PqrhCniQyV4tPa/fPo9QdEjqZ+J3d16crD90p+dxPW38YXUbze Z4w117M/Gw8YlMiErCZsEumX3y/FTyTJbuzzD6gynyAd9aK1RjhndJSLbRxvtU+A+pfvh8dfc/Y qozH148os7jf+BINle951WBaZDLHDoN0zLcCwqFjmargBYLYT+LrzUCNqNnG1N5D/ltQau7PVse Orz8wrMjpugaR0JkVsw1ZkWbJWe0jhVEw0VIT0P4eF+1qNK1BDvQrc3Mq5s0UMxvoEGzf9a5uBt jEYsmh72yiiUrGCfLB9tb1iJoYQ4/6iJJcp38CtuUPiVP7pvyS5sZG7KEqNDEgikXUm9V0rSfNe LcJtxqylZJNj8JJ/XV6eiat2PpymWncX8fwCvpRfpKuLa5KM/M4833hXkMJHPNw1I4ao1JUhdxs Mju+JptJnpGWVI6nlUYxcZFR+yEKQ6C/OR9nx9vVVE/y7JUwwyeioabBr5UEANK33sZWuQ== X-Received: by 2002:a05:6a00:4b42:b0:8a0:18bd:dd87 with SMTP id d2e1a72fcca58-8c7dd9d649emr30446195b3a.18.1796232552786; Wed, 02 Dec 2026 09:29:12 -0800 (PST) Received: from phoenix.local (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8c872e4aca2sm22363476b3a.32.2026.12.02.09.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 09:29:12 -0800 (PST) Date: Wed, 2 Dec 2026 09:29:10 -0800 From: Stephen Hemminger To: Scott Mitchell Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com, mb@smartsharesystems.com Subject: Re: [PATCH v8 5/8] net/af_packet: reject invalid ring parameters at probe Message-ID: <20261202092910.2a2fa186@phoenix.local> In-Reply-To: <20261202171804.50287-6-scott.k.mitch1@gmail.com> References: <20261201222405.88922-1-scott.k.mitch1@gmail.com> <20261202171804.50287-1-scott.k.mitch1@gmail.com> <20261202171804.50287-6-scott.k.mitch1@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, 2 Dec 2026 09:18:01 -0800 Scott Mitchell wrote: > + /* Constraints the kernel enforces in packet_set_ring() */ > + frames_per_block = blocksize / framesize; > + if (blocksize % getpagesize() != 0 || blocksize > (unsigned int)INT_MAX || > + framesize < TPACKET2_HDRLEN || framesize % TPACKET_ALIGNMENT != 0 || > + framecount % frames_per_block != 0) { > PMD_LOG(ERR, > - "%s: invalid AF_PACKET MMAP parameters", name); > + "%s: invalid AF_PACKET MMAP parameters: blocksz must be a multiple of the page size up to INT_MAX, " > + "framesz a multiple of %d and at least %zu, and framecnt a multiple of blocksz/framesz", That message is getting to long. I would just put in blocksize and framesize. And check the doc file that the constraints are there.