Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp748171pxv; Thu, 22 Jul 2021 11:09:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK0/yZ+74nW4h3egQITjr6H1aVMNfCoby5tbCW5T0tEd60nBjF1fFSJlqlvlBETlp05CEA X-Received: by 2002:a50:ee88:: with SMTP id f8mr984225edr.331.1626977367677; Thu, 22 Jul 2021 11:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626977367; cv=none; d=google.com; s=arc-20160816; b=DL6/cJnBGLC17kJplBDZ+vlVk3BrYYmpct2IB+/2y/BjHoGH+1/2YLb2daftG1cFAZ 6gw8e4kqpa6+uvtovZJ1eojfKaqwidqEKxYpZ/PkVZUrjiolG9POsVmmAPWywOmEFG1O aiTvYwTOMpfVqj4vdpPYfctl3GGyk56UEU9/6frgiklAGtLU2hcY3DBarkP+kAsZBKwV xgCcc5ijYsISelD/YAk3eU19mrOEMbBbzRt/DZ82W4uRxpiKZwROPpMpbigQ6M/H/bLF qPb+ir3DPBQo++E+X7nCwPXE8zPuPlui0HG3vxZUGArbvzjovftAoUaKazcnGJybx8lw PtFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=5J0qwBdBS7fcF6aNR2SSsSD6SMyIr5NqfTbUWr3OAbs=; b=zNMzA4UNVUiQhoT1TCii3baAxZ0uspiowl+Mf6V7r1h7LZGQgv+CTjPmssWmxt4Hb2 5e3i7rGMFnyzInS2YnUXLH+Myd4LmMOvo1Dm0sBMzw5wA/y5Pk0MJ+plxcyCAOwb1NmI OaWm+5BuF5M9JJGzMydmaePGHtVIXPM5/B9SoKrlpgrAmHU3tK4WLSSm1kgZmliE1gN4 amnPFbj+Dt+nUfVcuME8ZipDFyaEbRngYwXWyWk5LyJBmBR67qXshZd665HtgelBNXrM rdFi1UmA83cRKnh2Rxq0T+R/gM19Jd4b6b61pCc6DHZEzgNZ9iVc8llcpRnUO5y9lYGF mWew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tYB1uSLr; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si31706774edw.161.2021.07.22.11.09.03; Thu, 22 Jul 2021 11:09:27 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tYB1uSLr; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbhGVR1a (ORCPT + 99 others); Thu, 22 Jul 2021 13:27:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbhGVR1a (ORCPT ); Thu, 22 Jul 2021 13:27:30 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4271C061575 for ; Thu, 22 Jul 2021 11:08:03 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id i18so9591804yba.13 for ; Thu, 22 Jul 2021 11:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=5J0qwBdBS7fcF6aNR2SSsSD6SMyIr5NqfTbUWr3OAbs=; b=tYB1uSLrJZSWIfSrc7H/BAQ0E/frZCh33UDSZtvyjDpDKw5t5F82X0PWRdkUPS+qd+ 1N843wGAU8MWmxm2t+xpw7LOcMtSbDYWdBNuDN+QQI9E5+ukmzFTex7gWSzsiq3kyFPz emeCYi20WuwaEQGGBLDIDg/y9QQBRO1LigfbR9JgqzeFe2AZ9UhEEEN6dZ+QRhMpG/Mi YTxMxEfFdZZl8JSvEqa74ZL3MGG/3icLgyUuUze8Izj3naEsAn7PpLV2IXudr2vb2s7k gebj7cTsXKM+wRDXzC565zDOWbs2OoxXOOptXM6ZpEqioI3Okd5z1E6slYsUaK4cKCP9 PBhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=5J0qwBdBS7fcF6aNR2SSsSD6SMyIr5NqfTbUWr3OAbs=; b=FBJkjPxP72475360riRS+7rXIuWtaZwb1Rpy+9iFTuUlDe0mU5Ty0n/S28WUyB/5GE 6U3Lcop0ypMb1X+U8zsY9r4dKLqwAssRCBC6+m/y3pdNz9DODC/B9+2dtUwohI9Nv+9X Ph83OpwhqhefJHg18Q4jbZMtYq05R3K9b2lLxQFssPuMGxm5+UjvYZbqQWun6JTtDys5 qU7bC/ZK6Q9GnR2RgkDKhyZuoPvNucKxsX2h/fpbhqz8WgE/dLKbEAMu9Yds0CqXiTb5 4s+/mRKf8GPurjFAp4aoJX+g8cbhI7JXtz3FMm3NDhYKPnNxlpsdbgYINW2lbo0M+KpM k96Q== X-Gm-Message-State: AOAM532tzRAa9crZ/as1HdZniSfLHS44LXaSEvWPsTsAjEpaKH90Ox2p vVudv4mfcWI0gYTfzUu7Xy/FIFR2iQfP+n9+GyI= X-Received: by 2002:a25:be02:: with SMTP id h2mr1095352ybk.91.1626977283118; Thu, 22 Jul 2021 11:08:03 -0700 (PDT) MIME-Version: 1.0 References: <20210630080807.12600-1-kiran.k@intel.com> <20210630080807.12600-10-kiran.k@intel.com> <87EBBD58-71B1-4712-A5BC-8B53E739DAFE@holtmann.org> In-Reply-To: <87EBBD58-71B1-4712-A5BC-8B53E739DAFE@holtmann.org> From: Luiz Augusto von Dentz Date: Thu, 22 Jul 2021 11:07:52 -0700 Message-ID: Subject: Re: [PATCH v10 10/10] Bluetooth: Add offload feature under experimental flag To: Marcel Holtmann Cc: Kiran K , "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Thu, Jul 22, 2021 at 10:59 AM Marcel Holtmann wrot= e: > > 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=E2=80=99t 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 ra= ther 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 a= n experimental option to control the use of offload. Alright, then we don't need the Kconfig after all, the experimental flag will only control the use of the codecs e.g. socketopts would not work if the flag is not enabled I assume? > Regards > > Marcel > --=20 Luiz Augusto von Dentz