From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E3A1BA00C4; Fri, 1 Jul 2022 18:51:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C94F940A7D; Fri, 1 Jul 2022 18:51:57 +0200 (CEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id A027340A7B for ; Fri, 1 Jul 2022 18:51:56 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id e132so2892645pgc.5 for ; Fri, 01 Jul 2022 09:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WFnSAacGBuOx6n5tW05FTA+pgDL/z0RyCi1EmMIYsP4=; b=jTS262cw2Wh5RcX9A/Ws88/LyvPDYCdrCGRtjRDY0jlH5NqaoQOC8iZYGloVS9M1zy wiXu1lANAEWkbIzhgludNWwFsLgfi8pqzlekr4tUR6p+pOtxkcfCFq0qYAazLudG7waj vKRB6h1m5xJYrkJobrmV1mGgbXVnFG5dZkcYyp/fGqtGJ5kH4PauUBOz83OvGeGDjhPc idIyb+e7G1xcGBdQkKUS/weF6p/DAGlUGVKniMGGcpKoL+wmnHCF1hUZsVQxW3DpBNQc KXjNhVEc8SRD5pJaIXyMtM87VMvqBQx4TS056kF1aBoItHMlqteiKhvFEhxZItZvbgYY d5CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WFnSAacGBuOx6n5tW05FTA+pgDL/z0RyCi1EmMIYsP4=; b=qNIwL8eji4cf3Wcn2BgvlVbCXg2dxlZ/gZp3PjzLx0leUfX3L/7siISJk7gBc8CKvQ aLC0cuow9HmDK+oN8VHYtbZIxL7h0MApVnDHZWBD6UWMckm1kQo11I2MvCbMNS5XQsnC +Ih6ix0/3WWM3tTw/LDmbfxpEgOFARx1VzPse8C5gtl+tgr1kXWvn5mdvMW+rZ9iwkEF 7Yws7fmHSAPTJ98Hu4/m9E9rDwfxNBL2nN6APHIZaQPa4mjy4LSg3BHQTyMrThmmpm3P 0ggKohjdLS4ozrEWu+yc5I+K9oPMqf9uAMzGaKSIo+uQGM3/vBZNxAWJ0OI2JmkLLOyK oxNQ== X-Gm-Message-State: AJIora8rJRXtWBNaCoVYX154Dq7JMirtMoubCWtMyc56SNkcO6AhZwWp LcLBWM8Nn0cqqIlEzhFZuNy9Bw== X-Google-Smtp-Source: AGRyM1tGWexg1GkcvqEEOqs+YbmfuFS/Zy2w0LzuME5gsRsRxg1wtCpnn9qsVI3na7SnWQ+MyvXBtg== X-Received: by 2002:a63:5108:0:b0:3fd:77f1:57a4 with SMTP id f8-20020a635108000000b003fd77f157a4mr12875425pgb.125.1656694315826; Fri, 01 Jul 2022 09:51:55 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id jf3-20020a170903268300b0016a17e5fc6esm15761871plb.104.2022.07.01.09.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 09:51:55 -0700 (PDT) Date: Fri, 1 Jul 2022 09:51:53 -0700 From: Stephen Hemminger To: Joyce Kong Cc: Jakub Grajciar , dev@dpdk.org, nd@arm.com, Ruifeng Wang , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [PATCH v2 1/2] net/memif: add a Rx fast path Message-ID: <20220701095153.2d6deb00@hermes.local> In-Reply-To: <20220701102815.1444223-2-joyce.kong@arm.com> References: <20220517105109.1086090-1-joyce.kong@arm.com> <20220701102815.1444223-1-joyce.kong@arm.com> <20220701102815.1444223-2-joyce.kong@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 1 Jul 2022 10:28:14 +0000 Joyce Kong wrote: > n_slots = last_slot - cur_slot; > + if (likely(mbuf_size >= pmd->cfg.pkt_buffer_size)) { > + while (n_slots && n_rx_pkts < nb_pkts) { > + mbuf_head = rte_pktmbuf_alloc(mq->mempool); > + if (unlikely(mbuf_head == NULL)) > + goto no_free_bufs; > + mbuf = mbuf_head; > + > +next_slot1: > + mbuf->port = mq->in_port; > + s0 = cur_slot & mask; > + d0 = &ring->desc[s0]; > You might get additional speedup by doing bulk allocation. If you know you are going to get N packets than rte_pktmbuf_alloc_bulk() might speed it up?