From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30198C43461 for ; Wed, 9 Sep 2020 15:38:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA3D620672 for ; Wed, 9 Sep 2020 15:38:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hc2Nv68f" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730374AbgIIPil (ORCPT ); Wed, 9 Sep 2020 11:38:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38735 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730413AbgIIPhc (ORCPT ); Wed, 9 Sep 2020 11:37:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599665850; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EuXDHvuAdSkUYMH4iVJeihKuXi2neB1nlUOzoXyEoh8=; b=hc2Nv68fFpDEt7mALbucFXZAiDmqvnCmnbhrazc9oyqS1P8cDg46f4d+BMRScsu/kSV6XJ uJY3Hcz7xP0XtdHV5VdwjHv3o5j6WGSlHjBtO1DjStge03oS59APxv47/39+b7C43sXoh8 9ElShCECJ03lGK1GzH538rBnozoxAyI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-18-zNQccg6MPpSbu914gkb6BQ-1; Wed, 09 Sep 2020 11:37:26 -0400 X-MC-Unique: zNQccg6MPpSbu914gkb6BQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EAA11DDFD; Wed, 9 Sep 2020 15:37:24 +0000 (UTC) Received: from carbon (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85ECA19C78; Wed, 9 Sep 2020 15:37:16 +0000 (UTC) Date: Wed, 9 Sep 2020 17:37:14 +0200 From: Jesper Dangaard Brouer To: Maxim Mikityanskiy Cc: brouer@redhat.com, =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , , , , , Maxim Mikityanskiy , , , , , , Subject: Re: [PATCH bpf-next 0/6] xsk: exit NAPI loop when AF_XDP Rx ring is full Message-ID: <20200909173714.25a3ce43@carbon> In-Reply-To: <11f663ec-5ea7-926c-370d-0b67d3052583@nvidia.com> References: <20200904135332.60259-1-bjorn.topel@gmail.com> <0257f769-0f43-a5b7-176d-7c5ff8eaac3a@intel.com> <11f663ec-5ea7-926c-370d-0b67d3052583@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 8 Sep 2020 13:32:01 +0300 Maxim Mikityanskiy wrote: > From the driver API perspective, I would prefer to see a simpler API if > possible. The current API exposes things that the driver shouldn't know > (BPF map type), and requires XSK-specific handling. It would be better > if some specific error code returned from xdp_do_redirect was reserved > to mean "exit NAPI early if you support it". This way we wouldn't need > two new helpers, two xdp_do_redirect functions, and this approach would > be extensible to other non-XSK use cases without further changes in the > driver, and also the logic to opt-in the feature could be put inside the > kernel. I agree. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer