From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43099A04B5; Thu, 29 Oct 2020 11:53:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25111C9F2; Thu, 29 Oct 2020 11:53:07 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 16843C9F0 for ; Thu, 29 Oct 2020 11:53:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603968783; 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=lXSeaTA5SGgOJOHuh54s7CkKoTSCl1F4E8PCjn0Ahyc=; b=GVPYf88+fzBHzsZRnmMPEVFgabJaqa79/QMAjb2tfwxOM/wEdmkOJG2AbnV5ZyrkwI+eMS znnSUY3CQqOuNeHBRH9I5R37zOsmy2rpc8edZZtDFQAT5E3ZdlzwIlurBUYUSvfRdx9taO Fu9Q0l90GT5PWJk9itsCdIeQxqah52E= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-402-7ulLYmZTPHKm646V56GHfw-1; Thu, 29 Oct 2020 06:53:00 -0400 X-MC-Unique: 7ulLYmZTPHKm646V56GHfw-1 Received: by mail-vs1-f70.google.com with SMTP id u22so532092vsg.4 for ; Thu, 29 Oct 2020 03:53:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lXSeaTA5SGgOJOHuh54s7CkKoTSCl1F4E8PCjn0Ahyc=; b=IyN2I3vAvutUSan8PfXI+EXUNN9xdeIETyVslRm23QSJNkNPof3joqwKxZ0Td0eN6m 7FVkTW50oXSZXgVfjouuakN1IUHx6iDlKVTwkSBRoqZIz+jVj51L4wUbWnwOeosTB+g9 h2ngeWbubFTWxpu6YS50gDa7JJj3US1QPyn0fYn3FquC2qIt91XDO7WulHVDoF4Hj6k8 jTimSd6suS2WIqtcpCLOnBURCZ9w3eQLSyjHDZMd89Kg4QTuwQKV/xrqKDpM9HoI8YBK 2y5UZaxfPrIxaa/IHONUbR+0VGjO82dzAjQXDN0gJNZj4+gExY8upe91uTSDOKE2aoVN j6lg== X-Gm-Message-State: AOAM533tyH1L3c2JEhFWJpmoJfcS5VbxuZixlB6p15CfijOPQc8E1xCy 4VdzRY/Vs5UbSH/FBCJrLmAU8vv1WBl2tDey6DcXXvHaMb9UVMl+h+9MkKrdS+iIE3XdUXH457d /UbNiALtGEgkBkxNkkog= X-Received: by 2002:a67:2fca:: with SMTP id v193mr2446359vsv.18.1603968780375; Thu, 29 Oct 2020 03:53:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwox2dUBjh0xiOnMn+/I14kIduio0pyU1gliN/rGbZyYxMYJnWzYgAqJspMuwamhC4nWeVsmyyrhKMrY3QkS4E= X-Received: by 2002:a67:2fca:: with SMTP id v193mr2446352vsv.18.1603968780158; Thu, 29 Oct 2020 03:53:00 -0700 (PDT) MIME-Version: 1.0 References: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> <20201025054556.14277-1-honnappa.nagarahalli@arm.com> <20201025054556.14277-6-honnappa.nagarahalli@arm.com> In-Reply-To: <20201025054556.14277-6-honnappa.nagarahalli@arm.com> From: David Marchand Date: Thu, 29 Oct 2020 11:52:48 +0100 Message-ID: To: Honnappa Nagarahalli Cc: dev , "Ananyev, Konstantin" , Stephen Hemminger , Dharmik Thakkar , "Ruifeng Wang (Arm Technology China)" , Olivier Matz , nd Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v5 5/8] doc/ring: add zero copy peek APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, Oct 25, 2020 at 6:46 AM Honnappa Nagarahalli wrote: > +.. code-block:: c > + > + /* Reserve space on the ring */ > + n = rte_ring_enqueue_zc_burst_start(r, 32, &zcd, NULL); > + /* Pkt I/O core polls packets from the NIC */ > + if (n != 0) { > + nb_rx = rte_eth_rx_burst(portid, queueid, zcd->ptr1, zcd->n1); > + if (nb_rx == zcd->n1 && n != zcd->n1) > + nb_rx = rte_eth_rx_burst(portid, queueid, zcd->ptr2, > + n - zcd->n1); Should it be nb_rx += ? > + /* Provide packets to the packet processing cores */ > + rte_ring_enqueue_zc_finish(r, nb_rx); > + } > + > +Note that between ``_start_`` and ``_finish_`` no other thread can proceed > +with enqueue(/dequeue) operation till ``_finish_`` completes. -- David Marchand