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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A81CC19F2B for ; Mon, 1 Aug 2022 17:42:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232441AbiHARmO (ORCPT ); Mon, 1 Aug 2022 13:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbiHARmM (ORCPT ); Mon, 1 Aug 2022 13:42:12 -0400 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890D11AF01 for ; Mon, 1 Aug 2022 10:42:11 -0700 (PDT) Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-10bd4812c29so14496465fac.11 for ; Mon, 01 Aug 2022 10:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.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=EyD03pfVpeH7iUsN9cfO7bixQfRvh2HMA3MIy+9mnb0=; b=EaLDBYXF7PwQExk638enSBzIYCz8w4YKgHmhUFAfi9ydUT1miL2FJI6k/ArR6MYWTB jngIFoOEMAqtfGdwHuTP/Qf8bILm+LtLE/HVrwm80VShbHiCMx9M6YeuqPSEao3uw17R 6lonxzRiNV6/uzlVDe5Jk5YUSZm7zCH8lxBq4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=EyD03pfVpeH7iUsN9cfO7bixQfRvh2HMA3MIy+9mnb0=; b=51MaYFGK955GIojDNlU8Ej0sQZ8sNsKby9Rf8/k/mFOZA18G3ZuxoLPbdcX3NJGo7Y LyMewVWCcewd3KIisWqVixZgXI9chdBZaZKbOHdiL+HfkpEAcynY0Yt1ogYTi+SjcpWH 3+8AeTYOzNc2KC5YcFfza2blcnSaDOYAqIxErZWMAfNpHfGAvX33SmyYVJguSuNhU/Gh bHnFoj5y757QuJ0p/WrI8mzzo83XuGh3JOW63zvAzyrLgwVc0ITprA33gnzDtz1+UCI+ PcpxMFcwe2qJDQBYjZ3snjVka5d877L4XQzLivqU8r0ISMztn/nuZlxaX8YhzHDHB5mX SJaQ== X-Gm-Message-State: AJIora9zWNH57z54L6IYirvkROUSFoFn4fMBDy4iTN0lVcgZjKFdWavX b1PG5e6m86kppondGQNrjCtLYA== X-Google-Smtp-Source: AGRyM1sISZF/mWnQtd1spLElr1rjiH1whX16vTUR5jYHPvLPwUzLz1srSaeEOE3J8LSR+OxOZyw1FA== X-Received: by 2002:a05:6870:61ca:b0:10c:1358:4eaf with SMTP id b10-20020a05687061ca00b0010c13584eafmr8025002oah.111.1659375730489; Mon, 01 Aug 2022 10:42:10 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id j8-20020a9d7d88000000b0061c3753c30dsm2876274otn.17.2022.08.01.10.42.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Aug 2022 10:42:09 -0700 (PDT) Subject: Re: [PATCH v3 1/2] drivers: usb/core/urb: Add URB_FREE_COHERENT To: Alan Stern , Hongren Zenithal Zheng Cc: Rhett Aultman , linux-usb@vger.kernel.org, linux-can , Oliver Neukum , Marc Kleine-Budde , Greg Kroah-Hartman , Vincent Mailhol , Shuah Khan , Shuah Khan References: <20220609204714.2715188-1-rhett.aultman@samsara.com> <20220610213335.3077375-1-rhett.aultman@samsara.com> <20220610213335.3077375-2-rhett.aultman@samsara.com> <143b863d-c86b-6678-44e6-38799391fa36@linuxfoundation.org> From: Shuah Khan Message-ID: <07e82270-cc75-d346-72cf-0a60ffba06dc@linuxfoundation.org> Date: Mon, 1 Aug 2022 11:42:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On 6/30/22 8:10 PM, Shuah Khan wrote: > On 6/27/22 7:35 PM, Alan Stern wrote: >> On Mon, Jun 27, 2022 at 04:54:17PM -0600, Shuah Khan wrote: >>> On 6/24/22 12:07 PM, Alan Stern wrote: >>>> In the future people will want to make other changes to >>>> include/linux/usb.h and they will not be aware that those changes will >>>> adversely affect usbip, because there is no documentation saying that >>>> the values defined in usb.h are part of a user API.  That will be a >>>> problem, because those changes may be serious and important ones, not >>>> just decorative or stylistic as in this case. >>>> >>> >>> How often do these values change based on our past experience with these >>> fields? >> >> I don't know.  You could check the git history to find out for certain. >> My guess would be every eight or ten years. >> >>>> I agree with Hongren that values defined in include/linux/ should not be >>>> part of a user API.  There are two choices: >>>> >>> >>> I agree with this in general. I don't think this is an explicit decision >>> to make them part of API. It is a consequence of simply copying the >>> transfer_flags. I am with you both on not being able to recognize the >>> impact until as this is rather obscure usage hidden away in the packets. >>> These defines aren't directly referenced. >>> >>>>     Move the definitions into include/uapi/linux/, or >>>> >>> >>> Wouldn't this be easier way to handle the change? With this option >>> the uapi will be well documented. >>> >>>>     Add code to translate the values between the numbers used in >>>>     userspace and the numbers used in the kernel.  (This is what >>>>     was done for urb->transfer_flags in devio.c:proc_do_submiturb() >>>>     near line 1862.) >>>> >>> >>> I looked at the code and looks simple enough. I am okay going this route >>> if we see issues with the option 1. >> >> It's up to you; either approach is okay with me.  However, I do think >> that the second option is a little better; I don't see any good reason >> why the kernel should be forced to use the same numeric values for these >> flags forever.  Especially since the only user program that needs to >> know them is usbip, which is fairly closely tied to the kernel; if there >> were more programs using those values then they would constitute a good >> reason for choosing the first option. >> > > Thank you Alan and Hongren for your help with this problem. Since there > are no changes to the flags for the time being, I am comfortable going > with the second option. > > I will send a patch soon. > Patch is almost ready to be sent out. Changes aren't bad at all. Hoping to get this done sooner - summer vacations didn't cooperate. Just an update that I haven't forgotten and it will taken care of. thanks, -- Shuah