Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp562906pxv; Thu, 22 Jul 2021 07:04:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygbxPPxTsQbya7u1EJqHJTQPuzGXC39tlGD5BL0diuT9sDP+JuPtYjcKXCV9wwoHr5YrAh X-Received: by 2002:aa7:c5c3:: with SMTP id h3mr55448579eds.376.1626962676806; Thu, 22 Jul 2021 07:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626962676; cv=none; d=google.com; s=arc-20160816; b=B1/03meIAhJLeS7qFmA1MVvVo4el/v/dY9yMeDOZ8A6Mb6qMilNHdYNRVdO+JNdIQ7 dY/hXWTzbDU8I4A9fQudM11+IXpZpErPo34S3OrMs9QhAKbU6aDBy8hmvDEepbwoyCWt Bg8BS600RbbsSqD7jvIbq4vBV7Bld1sTNvV0pb1mMH2e95ZxVPlA9SSq3Mgm3osgplA3 X7k/QwqUtYjgLVRXTgeiU67IhXV+WMhc1LkZE+dbwJh5Ql8JFL7yK+7UH8oYgODCuhf4 iqI53h5xx/6JFx7jnwub34pvJSDmASbqXoz/ZCdm56vErrkv0eJ9GPiEVPk3z6uKz1vo Vugw== 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=HE7umaklklphAHIQW+ZeSM4kIoLsBfNY2uxb9G6IbdU=; b=C3wMMu95C1T5H6i916Fr1G532Tf8JubRuF9pFlnwGOeM9g2Zs/e+zQWmaolsSg/FTt 2A7h8QV9gsno8PpsVc909tsz+Vv31YXEKSQaPhiv3fljqh7ssi/42/uZXY/Zc07hzeNB B4TlTP9abiibrIQDRKQmOl7a7nHIk0UuWJgfTK7s2VRjuk7j4BxmgUkka0yl1PPT/NVh 2pWWPbENwxftrGdGY4LxUS2+Jcln8U94QRraiJtwcXrujNEqMVQWm2s9Ei5CXoc1TDMg yYwI8sC3jRAXDiOH+O1lAEVFCtEHKgX5Qq3K6nVCY7e/koF/XbQvoaOzenki4VnfNBkg d9bA== 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 h18si22166039eds.154.2021.07.22.07.03.51; Thu, 22 Jul 2021 07:04:36 -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 S232105AbhGVNUr convert rfc822-to-8bit (ORCPT + 99 others); Thu, 22 Jul 2021 09:20:47 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:49362 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbhGVNUr (ORCPT ); Thu, 22 Jul 2021 09:20:47 -0400 Received: from smtpclient.apple (p5b3d2eb8.dip0.t-ipconnect.de [91.61.46.184]) by mail.holtmann.org (Postfix) with ESMTPSA id 1019BCECDC; Thu, 22 Jul 2021 16:01:21 +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 16:01:20 +0200 Cc: Kiran K , "linux-bluetooth@vger.kernel.org" Content-Transfer-Encoding: 8BIT Message-Id: 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. Regards Marcel