Received: by 10.223.176.46 with SMTP id f43csp2299430wra; Thu, 25 Jan 2018 07:51:40 -0800 (PST) X-Google-Smtp-Source: AH8x225TtaowSbu5DNyacAwLnikpeopTflfkkwiHVE/q76Ib3zUvXc3l5brgJv4jC4ygSTw0hPCc X-Received: by 10.98.194.212 with SMTP id w81mr16113461pfk.232.1516895500145; Thu, 25 Jan 2018 07:51:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516895500; cv=none; d=google.com; s=arc-20160816; b=CbrOZccCzF95zrvBNWH4XhC/8yqjUKb3wwwfbS7nFTixhcsYI4VXYGp3q4VjNq23ZX PRVBKwwbCStWHnEacfUhPErJAur4zOAKstmoukjLYiV4lY2VZL1CvACVnjM+fIJWA5LI cqags/A+bC+AAa4ppPwDjxOSNL1V8C5gfyqcgwVlkt3BVf8p+85hxj5gM8RwAmKG1Ssi JjnUjc4uiGTQlUZa1n9ezp7O0MwdWIOttBSfXPg7fgzvIh1wTOPda75z1h9hPnxMyaCe 5tVWFB28CX9Is1Yw9KnLHZqamknKvBogKlrIO01B2RTOiO6eCwPpO5K3ELr5TUUUMNM0 YR3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=wyvc54W7yPVwtZE05ylNpWLwMF40Faz2jAfjTqbyT08=; b=tRbZLWzOkSi3Jcgb2Ei0LVLU2iugFiI7uuhCReW91oCbZNijCo+RJHXQmp8x9PULAd R7GIVCO/v68LyCTd938qyLi/Snrli2jhOej9PNBTMZL3I9tqrMW529HfWkDg0cq5Kw47 toJtYxM5o02NxrBzHksrO29oYZE/YRTYER3v02p0fsWIEZzGFuAhs4S0SUOf+BhGlxwh pePupKFo1CMpvZmeSAFf0i4vadzsorOJnrmo/WnZ+rYG/c/l9zrp8vbKZ+Cytqu5N6HH m1gqlWBKeE/5WEey6RSX62ZFQNCkpfjjMOFLBaPSOcFGrIDeT+pCkS2f3fCqv/cSdHQk HFdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=PJ9xf3Mt; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si2125694plb.137.2018.01.25.07.51.25; Thu, 25 Jan 2018 07:51:40 -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=fail header.i=@gmail.com header.s=20161025 header.b=PJ9xf3Mt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751223AbeAYPuf (ORCPT + 99 others); Thu, 25 Jan 2018 10:50:35 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:40467 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbeAYPud (ORCPT ); Thu, 25 Jan 2018 10:50:33 -0500 Received: by mail-qt0-f193.google.com with SMTP id s39so20271945qth.7; Thu, 25 Jan 2018 07:50:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wyvc54W7yPVwtZE05ylNpWLwMF40Faz2jAfjTqbyT08=; b=PJ9xf3MtfAkVNG7SqIo1mN7WcbNhAMq+e10uy7jc1UKOCHHoZsL6+ps7V1ghdMbGwg 1S6oAk+Rz9cfnHLjpbX3qsOo3SKGd5t/wI7xT8VfarMkZ7DzcDy9X1UOZUoqf3rL1y3N NsKT9ndub7IvC6qwyGFPcWLy4MBLYTCAjCOH1ryV0/LUaYsjdvnbyAbrswM6rLSEKt7s WdhZneUGcbUrIkSR318o9kbJ7bXOaIDhLruAJbX+P4u5DvRRhkBFDiHvoOLhC42RNJNw x/n8SjnAMUorybtDdkQlxRMu71k8POf+QKlFWEsIdjhzvRynH1tbZENVcjzlLSoqpvtb GZpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=wyvc54W7yPVwtZE05ylNpWLwMF40Faz2jAfjTqbyT08=; b=NRu2pSKc8ctKbI0Yds5YJX5lJieL7qNPg92stOUr8rOllqSisPiH//Rsf9ExZjuG5F T8dAPXHhRDRaeTKPiixBhDJw8ZQg4CcsUTQz37kQAbacsTSEJm8ZqmcZdF1NpAUMUlOn 8t58swDLsb970VvKtSEW1tEkBmqss5GNCpo9bLsvPD7evLd8Mw42LJ0ZESYzsZ1Q0GSJ bNhiq6oHx5Qmn6ozWnYR2I4POBb8VMRxLbzUwSj3ngIem6Syxpg5GRtHMP0/IRm+v6S5 Ilu8vBA2LIRP4n9VitZWRg3O5RtcUHGtkuLIeE4Ug8ahAi7MyYo/C5GOXgyv9eeggbXs CtWw== X-Gm-Message-State: AKwxyteErE4TbnJSmnwZKjDMsvacITYhXKq9inxiVscLI5D5K8AQ5xFa P+rPW+yuyZJUCk8jcw6nAwc= X-Received: by 10.200.39.241 with SMTP id x46mr16775519qtx.266.1516895432566; Thu, 25 Jan 2018 07:50:32 -0800 (PST) Received: from localhost (dhcp-ec-8-6b-ed-7a-cf.cpe.echoes.net. [72.28.5.223]) by smtp.gmail.com with ESMTPSA id p103sm2035233qkp.74.2018.01.25.07.50.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 07:50:32 -0800 (PST) Date: Thu, 25 Jan 2018 07:50:29 -0800 From: Tejun Heo To: Yafang Shao Cc: guro@fb.com, davem@davemloft.net, longman@redhat.com, lizefan@huawei.com, hannes@cmpxchg.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH bpf-next] cgroup: support attaching eBPF programs to net_prio cgroup Message-ID: <20180125155029.GG17457@devbig577.frc2.facebook.com> References: <1516894728-2061-1-git-send-email-laoar.shao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516894728-2061-1-git-send-email-laoar.shao@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 25, 2018 at 11:38:48PM +0800, Yafang Shao wrote: > If net_prio is used, we could also use eBPF programs to attach it, > because the net_prio cgroup could be got with prioidx in struct > sock_cgroup_data. > Hence it should not only be limited to cgroup2. I really don't wanna do this. This comes with all sorts of reverse lookup and naming issues. In addition, cgroup1 and 2 aren't mutually exclusive. If the use case is on cgroup1 and wants to use cgroup bpf programs, just replicate the cgroup2 hierarchy for bpf. Hierarchy replication across different controllers is how most use cgroup1 after all. With recent versions of systemd which defaults to using cgroup2 for process management, you get the replication for free too. Thanks. -- tejun