Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1137628iob; Wed, 4 May 2022 15:42:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi2ALTeaYGPw92+0jE5SSePlmadxwpiB5yXddZBS/lLzL1vVf8WZaiozmlJWbmwZE3vMAh X-Received: by 2002:a05:6402:5114:b0:427:cbe5:e9bd with SMTP id m20-20020a056402511400b00427cbe5e9bdmr17247250edd.255.1651704153229; Wed, 04 May 2022 15:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651704153; cv=none; d=google.com; s=arc-20160816; b=cVyz+VLs8FRzGm5ThhF2KPZ9FDFbyfcQG3/mWEyQ+M5DKSKp22fSxlqZE23NLRWckK UYOTAr4CjVt9+U19Y1Yl+bkkmQHbf9oOzuxWg2nAfclYlWgui17Hj3EYgk9XFpeEXVPs 31tnJzxJqc699jrJyq7RAH5H4Ysk/iDa3PT8iWPwLduky0ycgFHWcx1h4yQfrX8TX0Tn 5s4haKT+5bulZRuDukbRmw3wrl49IB7wcnpIQg4uDm071wXHwrfhBfLhm8E+SMyDCUhJ 15DVGwMo12bFZaiu6iszbRU33B92uw5D7pSy5v3OZf2pdvbw6WohBMaP5gnlyzp/enY7 vWDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=lXMVJx+7jkqkO46ktvyPIT140OLmxQYNMIQN5pPJqZw=; b=divv3CNuHM65zsVvn5GGBE7vobmv8Xqrm7zNuzftaNKVXO62EsXDk9VaRfJ3NKI5GW HE4Va8+YR9/+NE0/8GrdYX6vwhzX/x98JiOAij9PIQsnXsE+2A9qbQy1jYTdD/7Zu6R2 SD9j5wPQlAHrw8n8uKsS3wk6U6/+QNg1XG15sx0XT/Ch7yO3HMQOuzEkXWj0Y6oVExkJ FT3vlcM2BwvbfDEeiYvy3H4XdBSFSHJeXy1bKoQrL8l/Bw7XnrDQf1rtb5y0iIgla/XT povTPDa/KYfVtUC3ZnwVgiYesQmJOGUIBQBChON0cIZyU7+OnZkDJpg15S2bRcq48x/L Z28Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SCYjalym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a50d505000000b00418c2b5bf04si16080148edi.486.2022.05.04.15.42.05; Wed, 04 May 2022 15:42:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SCYjalym; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348704AbiEDLXb (ORCPT + 99 others); Wed, 4 May 2022 07:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235140AbiEDLXa (ORCPT ); Wed, 4 May 2022 07:23:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B5662A270 for ; Wed, 4 May 2022 04:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651663194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lXMVJx+7jkqkO46ktvyPIT140OLmxQYNMIQN5pPJqZw=; b=SCYjalymi6XRXSaP1h/RlDovvtF9qAjCF0lzM0b5t9JasFluZbrZw9oO+oaKU2UHSbvPv2 LwDSf6GNhO8CXK9Joynrr5M17UPtkXWLzP+OU/yc1WDnvj8Uw0Xg2p1sIQ3pWCmtSMNqtq 0zhL7LZsKPdm5X1N2kzQbKD5q1RgqpQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-208-EFN7_W9jPNGba6QV2r9uAw-1; Wed, 04 May 2022 07:19:53 -0400 X-MC-Unique: EFN7_W9jPNGba6QV2r9uAw-1 Received: by mail-ej1-f71.google.com with SMTP id dt6-20020a170907728600b006f40b4ea280so647384ejc.21 for ; Wed, 04 May 2022 04:19:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=lXMVJx+7jkqkO46ktvyPIT140OLmxQYNMIQN5pPJqZw=; b=cy8O5FeCkgJ1bCmwsj7sk4pqbtb3OPYhd17BJBvWfzNIQxDxN2HF+Bfa0si/cYNEuq KzW5jLInCGLmK40Kv2pkZjiTimRbFPAS0hjka/+ndEbRRTRhv4oQKv4aiUHQ2F46GOLO uWn+d+R1yKEsyEI5/qq6izZ1tVOBVtpvKTN34ONuThvDJ4j1oZUk693DgKw4UyTm1T/q gu0pMZxp+KnOrz0Or1HxDhL4Q2rf9wYWbqg+SXPEMgVnfstjlGJJS8OMz5oNIQ8ZzXGa McTWUUrsBSTEBLOfZGurWTog2WJLZroT9sehspdKFxy9NLhz8BpEqGWRW4cRmHxPs2/c NtcQ== X-Gm-Message-State: AOAM5312lGHOFreOxFnCEIO8CNru4v1HT08GW9YJ37xxeqeeDJWO1ipI o7GA0dXxl2h1BEKFAuzCNLObAbHfz8u7FvkESwPDduHt977hEcZVs9zSnj+oAzzlgixtGrsO7xY FRejz88mKdYrqEqgZoArTy5Mh X-Received: by 2002:a17:907:a41f:b0:6f3:e75c:5a77 with SMTP id sg31-20020a170907a41f00b006f3e75c5a77mr18660112ejc.70.1651663192531; Wed, 04 May 2022 04:19:52 -0700 (PDT) X-Received: by 2002:a17:907:a41f:b0:6f3:e75c:5a77 with SMTP id sg31-20020a170907a41f00b006f3e75c5a77mr18660073ejc.70.1651663192175; Wed, 04 May 2022 04:19:52 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id l24-20020a056402029800b0042617ba63a7sm9104938edv.49.2022.05.04.04.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 04:19:50 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 08C323464C2; Wed, 4 May 2022 13:19:50 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Zhengchao Shao , 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 Cc: 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, weiyongjun1@huawei.com, shaozhengchao@huawei.com, yuehaibing@huawei.com Subject: Re: [PATCH bpf-next] bpf/xdp: Can't detach BPF XDP prog if not exist In-Reply-To: <20220504035207.98221-1-shaozhengchao@huawei.com> References: <20220504035207.98221-1-shaozhengchao@huawei.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 04 May 2022 13:19:49 +0200 Message-ID: <875ymlwnmy.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zhengchao Shao 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 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