Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp742220pxv; Thu, 22 Jul 2021 11:01:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi71kazLEA0S72D5D8Ry9ukVDNYJ1RgaWDSBaG1yNhTSDYl5Uv+RtOIgxXdshu61+pV+IY X-Received: by 2002:a05:6602:342a:: with SMTP id n42mr697493ioz.126.1626976886751; Thu, 22 Jul 2021 11:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626976886; cv=none; d=google.com; s=arc-20160816; b=bJ2yoFz5y/c5bS9WUuAwl/0QUGBK1algN43NxS7o1HB39P4PQaX67L/M8jbzAaoLwH py1ZWeyPwTFjpbSubv5R/o6oBsI0wny5IWA8NDfc8XMlMtapwM37wxtBNtUxa0fIIgPr 9LRjzkpFfEmWf5K1iUhxgK41AIggKi0mmFrl1cc+gASYJFjR9otvb0adHrR3j4m8Gblo PhdusTsLkMgvsZFWutQ8iZoF1Sf4BsVukdNTKggSh5nN0s8eJvQbVpNiHYmMaAz+aSKq UrGc734jt5fW1DqmJRHQ7fHWgnSJQ2nHNlHD7asEoDvqpShkO8YfcJvzKKg6FYTdCQoZ G9vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=sXgv6So7lcpF0pBGtnlILb+BahJQSIkdZH5S+DPuaac=; b=MKvbz9TwxX7wpprog88X9UC5Sti3AymmifAGWehzKXa+1RysO3LvWG42/3N8HPtGI5 JRaqBQ66bCHvZpvqp4RISAkFSzARFiLlrfxdqXGpXP9n4BW1kw46VYDtEkDEECGU/ywl 1szoDj8cT+UtQiWhU8VTVpioqnb1UhWWWtfELfun8/1Pg7ADdi3JvV8/08LAKC1gC4g7 U4D0vBQZpFqOhPqZs62CUJI+/zYwl51YFJHx4YCvMuxJB8j8Ac6E8/yjgO0TQGNIIZIM OynNjQEclgGKQLS6iyKM5TwPVZpAFU4k5I5dtoJ4iTr8rfpKlpLoIdT6uDLNAfSGYInh jF3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si24416005ilf.35.2021.07.22.11.01.00; Thu, 22 Jul 2021 11:01:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbhGVRTL convert rfc822-to-8bit (ORCPT + 99 others); Thu, 22 Jul 2021 13:19:11 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:35024 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbhGVRTK (ORCPT ); Thu, 22 Jul 2021 13:19:10 -0400 Received: from smtpclient.apple (p5b3d2eb8.dip0.t-ipconnect.de [91.61.46.184]) by mail.holtmann.org (Postfix) with ESMTPSA id 10258CECE5; Thu, 22 Jul 2021 19:59:44 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH v10 10/10] Bluetooth: Add offload feature under experimental flag From: Marcel Holtmann In-Reply-To: Date: Thu, 22 Jul 2021 19:59:43 +0200 Cc: Kiran K , "linux-bluetooth@vger.kernel.org" Content-Transfer-Encoding: 8BIT Message-Id: <87EBBD58-71B1-4712-A5BC-8B53E739DAFE@holtmann.org> References: <20210630080807.12600-1-kiran.k@intel.com> <20210630080807.12600-10-kiran.k@intel.com> To: Luiz Augusto von Dentz X-Mailer: Apple Mail (2.3654.100.0.2.22) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, >>>> Allow user level process to enable / disable codec offload >>>> feature through mgmt interface. By default offload codec feature >>>> is disabled. >>>> >>>> Signed-off-by: Kiran K >>>> Reviewed-by: Chethan T N >>>> Reviewed-by: Srivatsa Ravishankar >>>> --- >>>> * changes in v10: >>>> - new patch added to place offload codec feature under experimental flag >>>> >>>> include/net/bluetooth/hci.h | 4 ++ >>>> net/bluetooth/mgmt.c | 106 +++++++++++++++++++++++++++++++++++- >>>> net/bluetooth/sco.c | 10 ++++ >>>> 3 files changed, 119 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h >>>> index e20318854900..5ca98d9f64dd 100644 >>>> --- a/include/net/bluetooth/hci.h >>>> +++ b/include/net/bluetooth/hci.h >>>> @@ -331,6 +331,10 @@ enum { >>>> HCI_CMD_PENDING, >>>> HCI_FORCE_NO_MITM, >>>> >>>> +#if IS_ENABLED(CONFIG_BT_OFFLOAD_CODECS) >>>> + HCI_OFFLOAD_CODECS_ENABLED, >>>> +#endif >>> >>> That is probably a bad idea as it could lead the enum to assume >>> different values based on what is enabled, besides we don't gain >>> anything by not having the symbol defined all the time. >> >> While this would work with dev_flags which are internal and not API, I still don’t like it. >> >> There is really no benefit to make this a compile time option. And as far as I remember I never said this needs to be compile time. Actually I rather have this as an experimental setting so that it can be switched on at runtime. Nobody is going to recompile their kernels to test codec offload. > > Initially I was with the same opinion, but the problem is the codecs > are read at init sequence and the experimental flags are set at a > later stage thus why I suggested a KConfig option until the feature is > more mature and we can remove the option altogether. I am fine with the codec options being read all the time. I mean having an experimental option to control the use of offload. Regards Marcel