Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp367592rwd; Wed, 7 Jun 2023 00:41:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Le9ZyLvrL6eNeDJco85760oP60g+4LMibHsntJD5QQEdoZuKgN9w8PixYw8uD60gwNAr7 X-Received: by 2002:a05:6a21:3714:b0:112:6217:7a62 with SMTP id yl20-20020a056a21371400b0011262177a62mr2032669pzb.45.1686123697181; Wed, 07 Jun 2023 00:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686123697; cv=none; d=google.com; s=arc-20160816; b=tFU2AhFKAEmvLrgPfRN7064h6BTD2/nb6ttVhW2XVGE2Q7Bi33S4zwWYE8PWOcqYvq BgX6UJs53GJ2OV0I5+kXG7+LIwuDXpTqbYtA/fui+cx6SlYwW31R3CNKIlFDTtzT/fwi GfhMQVBBDJdeVWNFIxg3+uTCaw3p/6jyOz9SqoJ3SSnElfIhm7WVIpEQAfSJ8fBPjNO2 gg4c6GoT7/LYFsslxJwA+E2IkpyfRW9V1pyT2Dq0j2LPzUYjBwBxWZtxdqoA/IahaeWf EXU10l8HmhTKMe5wv3nwELA97zELnnAfKQv1IlNNrv1lXFOqkZoIHjKmHK2zBU2e6K32 2j9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=+ONAd5aO4w+0jIblwmIlwRjaR1u1YzCMx+VJMd7C/Ho=; b=zDo9mk9s+mdV5oSCzcP7OzyeCq73ATYVPNKfjj98E/IH2jXaFptacCcx2Vg9AqDnnq 5D3ivP/Kmm9zeikdB+9LoydyN2fJJDBk3cHIaePLBOKAf2LGljBc+W0mphra+alAlWky c56WhMGrrfbDiVC/7wI2POCmgV1euEeFQKFC5Zb3rK7sWkxe4JTHpWDZ12XQDwneV8/4 OurZEJLyuwbQQbCiA1lLP8WPG9G428f9BK2F//RUu0z1wnv90tnlY9UC+3oXHz1zdeDI 1eQhEq2Som+pal5F+L7dfR24C0/OPXayq/6Q+DUE7RTBToQloTtq8aRrnETbvHB7KiM2 vSYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=KTN8PlVk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 38-20020a630e66000000b0051b4f835d4dsi7559147pgo.515.2023.06.07.00.40.43; Wed, 07 Jun 2023 00:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=KTN8PlVk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238859AbjFGHgN (ORCPT + 99 others); Wed, 7 Jun 2023 03:36:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239774AbjFGHfp (ORCPT ); Wed, 7 Jun 2023 03:35:45 -0400 X-Greylist: delayed 61 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 07 Jun 2023 00:34:31 PDT Received: from smtpdh19-1.aruba.it (smtpdh19-1.aruba.it [62.149.155.148]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD4081BE4 for ; Wed, 7 Jun 2023 00:34:31 -0700 (PDT) Received: from [192.168.1.56] ([79.0.204.227]) by Aruba Outgoing Smtp with ESMTPSA id 6nfbqxSUNBHmg6nfbqYsfQ; Wed, 07 Jun 2023 09:33:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1686123207; bh=6BOAWa6skAWoa3xgLfnmgkeGr2K9HUOFJEmthuXgIns=; h=Date:MIME-Version:Subject:To:From:Content-Type; b=KTN8PlVkP9NkGa1UjzQHChP7SfZWN0L2vXNku9dcrDeJfOutwolxWOmKXZHyepEeO 1yNbGDSdq6686iFTdjeufqf9H1SUQmLHdhBrHr+3RCpu0NZxzFF1HYM7O+0Kfzaqo6 j+diMs44TjwneInLVCOMpSWaEEqPla87f/welhWpaC06ebOOehT683eLIx8zyq1FAa yel+9hZKxu4CE/rzMIs0euYDlIxKGArSDfSh00vWzzg5s1ifxTZ4FuOXBRAnjL/XyS +j159MB1qxiXHKl5Nf09z+tp1UFiystn1ElEzpmu0YujZT2JHKbXWhsiWZ3oIxJr5x 3/DmTViAJrKCA== Message-ID: Date: Wed, 7 Jun 2023 09:33:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [RFC PATCH] pps: Increase PPS_MAX_SOURCES value. Content-Language: en-US To: Charlie Johnston Cc: linux-kernel@vger.kernel.org, brenda.streiff@ni.com References: <20230605203147.694716-1-charlie.johnston@ni.com> From: Rodolfo Giometti In-Reply-To: <20230605203147.694716-1-charlie.johnston@ni.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfLTYkMUEuW2vhxsNEeroTMJhjNfA9K0/XOUHaTLQVev1GSrinW6jBgBBc8C2R3YM1kvS9Ngb2CQeA/BKEikt2I3QfP5JjeKDKROj/zEI9vy/KxxxnHaG RWPFoNJ/uOu7uk/zDmzekwzI18G+9Gb/fJ883STb+2EqwIfZa6h/ssLqXteCcMC88X/UAmQiUpdrcW5cfV+Y/v/woNh2WVFN1QUVC4n2QnRcFqpLTWjZ3qjZ LDjvczs3uYknKNKt3Nq4rmAK88vkPVnMWZX+1ZsZSys= X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/06/23 22:31, Charlie Johnston wrote: > For consistency with what ptp uses for minors, this > change sets PPS_MAX_SOURCES to MINORMASK + 1. > > The PPS_MAX_SOURCES value is currently set to 16. In > some cases this was not sufficient for a system. For > example, a system with multiple (4+) PCIe cards each > with 4 PTP-capable ethernet interfaces could run out > of the available PPS major:minors if each interface > registers a PPS source. > > Signed-off-by: Charlie Johnston > --- > include/uapi/linux/pps.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/uapi/linux/pps.h b/include/uapi/linux/pps.h > index 009ebcd8ced5..85f472330da8 100644 > --- a/include/uapi/linux/pps.h > +++ b/include/uapi/linux/pps.h > @@ -26,7 +26,7 @@ > #include > > #define PPS_VERSION "5.3.6" > -#define PPS_MAX_SOURCES 16 /* should be enough... */ > +#define PPS_MAX_SOURCES (MINORMASK + 1) > > /* Implementation note: the logical states ``assert'' and ``clear'' > * are implemented in terms of the chip register, i.e. ``assert'' I have just one question: are you sure that it's safe to call idr_alloc(..., 0, (MINORMASK + 1), ...)? Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti