Received: by 10.223.176.46 with SMTP id f43csp3293214wra; Mon, 22 Jan 2018 11:35:10 -0800 (PST) X-Google-Smtp-Source: AH8x224QXHgB4hJHCLx1PV/Ldml3kj9Tj2HWrfGTcFyH74WU5XN4DGcISO+bVRcK/jsjcxaBLQCy X-Received: by 10.36.3.206 with SMTP id e197mr9953877ite.47.1516649710122; Mon, 22 Jan 2018 11:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516649710; cv=none; d=google.com; s=arc-20160816; b=zby7YlQXz8MSUJhCnx29SyLBH/qtCkqxKllZTnRX5AWPN7pGc3TSQUEvJn+FaFECQW 43BBU/PltWANo94VGZJFKiBxSBX3gu9kaUUbyc/nvhaCrMqDS39jXX7CBcmZCYMb5qNt YGBh0ZNAZw0SxB2/IqEqHBfRmd2stMxyCFOuSBZgYrJafA3qqNkfUFLPSLt6Ibk8XeA8 sp//eplEOxfaxbhbl2vT62q+hm1nZNRmIgnedLJ9pHtg5EUYKc2kyaIsQFy5DChWA7DE 1utD2jCszHe9IwYQLS2a6Qg7HTrc9hzxLYAVVMCvvSdIRwEf0xcYJhjQbCEvFqC9dCsE cEdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=HTQhkNrgriqYmSznbivBhFPyZg6xLV5Rf/9nbFUp1BI=; b=J22EKMZRAvT0U2NCr7z7r7GK84YCmVjPXFX8gRI9A8akGRCL5o2SxxpvjCreGH2dM7 WipuSrWSRa9oAitTdH9ub+u7xGnuBBKVnQPGyY5+UkuEN438X6KFVMh5RXst6i0S9rCg syHGyN/hP5skogQaeFOyOcT2AdVfVfoVpav2P0/LeIEargMhW7K7ylVOYDxRO4MURuIZ qFv2NcGedruAuR1b9i9VmMgYnDZNSOgHfPzSVBVx8QnVvS2xmGapvqkDJcDECuE7ihc6 9/47eL86CMfTvrcFUrQRjtHmLdML+eK9ifllMIX3JKAuvrBaQvAiENlcijxnwMB2phTa DziA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EAksTBsf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o127si6306475ito.127.2018.01.22.11.34.55; Mon, 22 Jan 2018 11:35:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EAksTBsf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751071AbeAVTeD (ORCPT + 99 others); Mon, 22 Jan 2018 14:34:03 -0500 Received: from mail-io0-f179.google.com ([209.85.223.179]:43926 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbeAVTeB (ORCPT ); Mon, 22 Jan 2018 14:34:01 -0500 Received: by mail-io0-f179.google.com with SMTP id 72so10636369iom.10; Mon, 22 Jan 2018 11:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HTQhkNrgriqYmSznbivBhFPyZg6xLV5Rf/9nbFUp1BI=; b=EAksTBsfyXvHR3K1YD4WuYTewpOYvG2ZiPWiNLjXNEPUYZRmrT+CA4W7anxKWsjUvK ga6r2MnKWOAcemtRfRRYY/AELVgX/o+iFdpCHApi7UTlSoxI1lPKSONrrDWT7ouwdTY4 CpA4j2chlywGAwC0grqQY9tLpuUNeWDGU84xbgQXtmeNuANx7nD+QwPrw4Sytky1ycKg jAH8thJSfPBI1pbybXiEqX+seuPcreL/2qiJzfMGG+tkgUWzX6dm9D2oq0iSo5PUlPHc 9Kf8YyWPSaznzqmC5+zxTrKHgcpxrwG8mGAeCZAdAiJ+BtBEYJV9mjo+cRclkD7r4gui jyvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HTQhkNrgriqYmSznbivBhFPyZg6xLV5Rf/9nbFUp1BI=; b=aNkYBnBI/c/4nYy8/09CWO6LMqO+dkUlzupI+NYM9lSCQegaeHOLztV+WO+bTbct6s wc9FvBLDXoLuhk5vOt2qPbowsw+PbK3xbvzi7w+AZCMx6EPexIK9MImM/DLOCazrgAyH 9b0tS9Z1n7g8/7kJRE/8R7RwuchSf7WhKuYi2bnePuxQC2tJagzXrgVDpHg1FPYDf4J/ EpkTgGBwfn51BMLVyLQdX1VC9M1nws5y2SVKqxjJimrF8U1Mp64nbyJnCK1mzmEnDeJ0 PaP+dd3dHdT5ufrsiqqeA3q/vHNJ40JNlZT5KbQyCXBwb9Lxflf7pos7tfsC8nEgz/Ga MmbA== X-Gm-Message-State: AKwxytcCf6k50M28yyT0rkh1lFoG/SCM8xNM46mR5iB+JeqQVSXbHw5M 133lAZWkzYTrvLTRV7iEN/vDeBQ8Arj03LyYhLs= X-Received: by 10.107.9.69 with SMTP id j66mr9657782ioi.91.1516649640264; Mon, 22 Jan 2018 11:34:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.20.129 with HTTP; Mon, 22 Jan 2018 11:33:59 -0800 (PST) In-Reply-To: References: <1516160848-471-1-git-send-email-yi2010.guo@samsung.com> From: Alexander Aring Date: Mon, 22 Jan 2018 14:33:59 -0500 Message-ID: Subject: Re: [PATCH] Bluetooth: 6lowpan: Fix disconnect bug in 6lowpan To: Luiz Augusto von Dentz Cc: Guo Yi , "linux-bluetooth@vger.kernel.org" , "open list:NETWORKING [GENERAL]" , Linux Kernel Mailing List , Marcel Holtmann , "Gustavo F. Padovan" , Johan Hedberg , David Miller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 2018-01-22 8:00 GMT-05:00 Luiz Augusto von Dentz : > Hi Alex, > ... >> >> or is there a special bluetooth API call needed, like the current case >> with debugfs. >> I know hcis are not netdevs, but it bothers me that we running into >> two different worlds on how to deal with that and it just requires >> "more" special bluetooth specific handling in user space applications. >> Later more "netdev" capable link layers will maybe support 6LoWPAN and >> then bluetooth might the only subsystem where different handling is >> needed to do such job like that. > > Keep in mind that the transport on Bluetooth happens to be in a > different layer, so you are basically suggesting that the kernel > maintain a L2CAP connection, similar to TCP, which has several > security implications. > no, I didn't said to change something in protocol handling etc. I just wanted to say that I am aware that hci is not netdev and it's hard to use net core api on these "interface types", because net core knows netdevs only. >> We maybe need to support a special handling in "ip link add" to map to >> bluetooth instead moving that to people in user space? > > Afaik ip tool cannot support any tunnel interface since the kernel > cleanup any socket opened when the tool exit. Btw, with the patches > above bluetoothd would take care of adding/removing the links > automatically so at least this step will not be necessary. Other ip > commands should work though. > not tunneling, etc. I just want to know how you create a netdev capable 6LoWPAN interface, it is not done by net core API so far I see and it will never be done? You say bluetoothd will care about it, but then bluetoothd will call the right bluetooth API (not net core API, e.g. netlink (what iproute uses)) Example: ip link add link hci0 name 6lo0 type 6lowpan This cannot work because the net core API will not work on HCI "devices", I see..., but it highly bothers me that we cannot use similar API to add or delete such interfaces with netlink API and iproute2 -> you are forced to use bluetooth API with everything behind it. At least a delete should work... (I am currently not sure if "ip link del" would work with bluetooth 6LoWPAN). According to adding a 6LoWPAN interface, so far I see it will never be handled by net core API and creating a mapping from net core API to bluetooth sounds fragile... At least there is some command "create an 6LoWPAN interface for my link layer hci device" or it's still magically created/removed by if there exists a connection or not (I highly don't recommend it, because user space applications cannot simple deal with dynamically creation and removal of netdevs (and at the end it should be act like the removed one again)), ifup/ifdown -> that's okay... We already had this discussion once if I remember correctly. - Alex