netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shaozhengchao <shaozhengchao@huawei.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>
Cc: "ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"hawk@kernel.org" <hawk@kernel.org>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	"andrii@kernel.org" <andrii@kernel.org>,
	"kafai@fb.com" <kafai@fb.com>,
	"songliubraving@fb.com" <songliubraving@fb.com>,
	"yhs@fb.com" <yhs@fb.com>,
	"kpsingh@kernel.org" <kpsingh@kernel.org>,
	"bigeasy@linutronix.de" <bigeasy@linutronix.de>,
	"imagedong@tencent.com" <imagedong@tencent.com>,
	"petrm@nvidia.com" <petrm@nvidia.com>,
	"memxor@gmail.com" <memxor@gmail.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"weiyongjun (A)" <weiyongjun1@huawei.com>,
	yuehaibing <yuehaibing@huawei.com>
Subject: 答复: [PATCH bpf-next] bpf/xdp: Can't detach BPF XDP prog if not exist
Date: Thu, 5 May 2022 08:21:15 +0000	[thread overview]
Message-ID: <594b5198d54c4c729728c20d167d9c2d@huawei.com> (raw)
In-Reply-To: <875ymlwnmy.fsf@toke.dk>


-----邮件原件-----
发件人: Toke Høiland-Jørgensen [mailto:toke@redhat.com] 
发送时间: 2022年5月4日 19:20
收件人: shaozhengchao <shaozhengchao@huawei.com>; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; bpf@vger.kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com
抄送: ast@kernel.org; daniel@iogearbox.net; hawk@kernel.org; john.fastabend@gmail.com; andrii@kernel.org; kafai@fb.com; songliubraving@fb.com; yhs@fb.com; kpsingh@kernel.org; bigeasy@linutronix.de; imagedong@tencent.com; petrm@nvidia.com; memxor@gmail.com; arnd@arndb.de; weiyongjun (A) <weiyongjun1@huawei.com>; shaozhengchao <shaozhengchao@huawei.com>; yuehaibing <yuehaibing@huawei.com>
主题: Re: [PATCH bpf-next] bpf/xdp: Can't detach BPF XDP prog if not exist

Zhengchao Shao <shaozhengchao@huawei.com> writes:

> if user sets nonexistent xdp_flags to detach xdp prog, kernel should 
> return err and tell user that detach failed with detail info.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>

I kinda see your point, but this will change user-visible behaviour that applications might be relying on, so I don't think we can make this change at this stage. Why can't your application just query the link for whether a program is attached?

-Toke


Thank you for your reply. I wiil change sample application firstly. But if kernel does nothing and return 0, maybe user will think setup is OK, actually It failed. Is this acceptable?

  reply	other threads:[~2022-05-05  8:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04  3:52 [PATCH bpf-next] bpf/xdp: Can't detach BPF XDP prog if not exist Zhengchao Shao
2022-05-04 11:19 ` Toke Høiland-Jørgensen
2022-05-05  8:21   ` shaozhengchao [this message]
2022-05-05 14:27     ` 答复: " Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=594b5198d54c4c729728c20d167d9c2d@huawei.com \
    --to=shaozhengchao@huawei.com \
    --cc=andrii@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=imagedong@tencent.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yhs@fb.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).