From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 3/5] bpftool: implement cgattach command Date: Thu, 30 Nov 2017 09:24:48 -0700 Message-ID: References: <20171130134302.2840-1-guro@fb.com> <20171130134302.2840-4-guro@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, ast@kernel.org, daniel@iogearbox.net, jakub.kicinski@netronome.com, kafai@fb.com To: Roman Gushchin , netdev@vger.kernel.org Return-path: In-Reply-To: <20171130134302.2840-4-guro@fb.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 11/30/17 6:43 AM, Roman Gushchin wrote: > + if (bpf_prog_attach(prog_fd, cgroup_fd, attach_type, 0)) { > + bpf_object__close(obj); > + close(prog_fd); > + close(cgroup_fd); > + p_err("Failed to attach program"); > + return -1; > + } Also, what about support for BPF_F_ALLOW_OVERRIDE and BPF_F_ALLOW_MULTI flags?