From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F46C433E1 for ; Tue, 23 Mar 2021 00:04:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C5A3619AE for ; Tue, 23 Mar 2021 00:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231157AbhCWAEO (ORCPT ); Mon, 22 Mar 2021 20:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbhCWADq (ORCPT ); Mon, 22 Mar 2021 20:03:46 -0400 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA2ADC061574 for ; Mon, 22 Mar 2021 17:03:45 -0700 (PDT) Received: by mail-il1-x12a.google.com with SMTP id t14so6698515ilu.3 for ; Mon, 22 Mar 2021 17:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OwTS27lmdu1IYVtfbP6cul5sYprN6Y0AzhhQLQ6dKzs=; b=vXZF9RCKjPousn00RfXby2OHMFqI6CWIZ5uvJuzY2rF85yWRPF+Scujn49PlX5zLng EGVucFBSXnJDnDrH7X+XdZCCArX2/ZUw4bMwvh/1XOTmFZF3UiitqlLdazkfTn/Tj70e 8BFtdUKewkrB1cKg4sJ/prWVn5HBhgdYl928hW+YG9XgNKR3u/tCa7YuQKBDMoQfTAx4 B8PSFe0DpqtCRVCDUZpJsVWq2ZjXOh18jygs/Bz5XvNmXRiGqIyxF3GCxD78/yC9Yx5v AOJ2HliW1umV6qVfNnYbbmvrWcmlrAwbSpVWT6E72Y7RCQpv2yHoYOxfHBLmj2VaYx3s PbcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OwTS27lmdu1IYVtfbP6cul5sYprN6Y0AzhhQLQ6dKzs=; b=CvjnWF/m4a04Oz47rFRGF9JY5HXucc9zG6s+7bGzCKdwqO//qkkg1vxk2yBMV/zp6T xneSyqwEBld7FCnsPxCoUmBxmi6WdlUmncUjH26sdEJVtt3VcoLyCy89Lg7LFSc9lh5A 1rAMHoRU9giYKvVLSTYSi5FJ0BoPJwlO1fXG46JXUDszWGKnhw/mEFdLbqtNH4IPfW5L h9Epz/iUh91X5krT7mO+i23HjpAKYbObbv4QWOsbPzl2HnjiBL3Usux4R07uzSQuaHDT vwBb3dICw7XOaxoqj3upDlgS+q5mtvIVtPuT30QrHCsvotIz4TJ9SoffS2m9xabKqs61 /QJQ== X-Gm-Message-State: AOAM531r6T8J83td0qdeDHmKSQ8y78G+BM4rvqs+PqM881pduTUdylla gE/LdvVrqvOEFIN9nitDcPcn1Q== X-Google-Smtp-Source: ABdhPJy+gtujtGv55KnZhN7pqmjC0X5LL4xK9I4liITDzlvYnOOp1msEbt5i8Dgj0jqRcnUH/uYQEg== X-Received: by 2002:a05:6e02:1a02:: with SMTP id s2mr2284719ild.48.1616457825182; Mon, 22 Mar 2021 17:03:45 -0700 (PDT) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id b9sm8409627iof.54.2021.03.22.17.03.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Mar 2021 17:03:44 -0700 (PDT) Subject: Re: [PATCH net-next v2 2/2] net: ipa: fix IPA validation To: Andrew Lunn Cc: Leon Romanovsky , davem@davemloft.net, kuba@kernel.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210320141729.1956732-1-elder@linaro.org> <20210320141729.1956732-3-elder@linaro.org> <7bc3e7d7-d32f-1454-eecc-661b5dc61aeb@linaro.org> From: Alex Elder Message-ID: Date: Mon, 22 Mar 2021 19:03:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 3/22/21 5:56 PM, Andrew Lunn wrote: >> The solution is to create a user space tool inside the >> drivers/net/ipa directory that will link with the kernel >> source files and will perform all the basic one-time checks >> I want to make. > > Hi Alex > > Have you found any other driver doing this? Where do they keep there > code? > > Could this be a selftest, put somewhere in tools/testing/selftests. > > Or can this be a test kernel module. Eg. we have crypt/testmsg.c which > runs a number of tests on the crypto subsystem, > ./kernel/time/test_udelay.c which runs times on udelay. > > Rather than inventing something new, please follow other examples > already in the kernel. I will. I did see the tools/testing directory and I'll look at how people have done things there. I need to try to get it working first, then I'll figure out where it belongs. I think I'll be able to do a user space test, but it's a little tricky to be sure it's actually testing what I want. If that ends up being too hard, I'll look into kernel test module. Thanks for the suggestions. -Alex > Andrew >