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 58772A0C43; Tue, 28 Sep 2021 21:23:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1771D410D7; Tue, 28 Sep 2021 21:23:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 3F42E40E3C for ; Tue, 28 Sep 2021 21:23:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632857032; 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=l2YpxHVM1yeFqknTNK/qiRe8BSz9ehFEIFK6K8uFO84=; b=N1sBazX4fYJedqz1hithFhQbiyMYP6PjBWxA6/619foZO5GMB3E/uXtKuHxTg+vL6LrsTO LKwnRcmm35qKlx4+xPHRgHEDA6bXQD3vA7XxazwsUqPHDwZqv+9dnB4IUIRigWLeg2uOMK YxJTmtQ48Ai0Ilv85vCohtrzc5/4Uh8= 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-499-UD_KoblsNi6mhbrDC06zXQ-1; Tue, 28 Sep 2021 15:23:51 -0400 X-MC-Unique: UD_KoblsNi6mhbrDC06zXQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34A941019983; Tue, 28 Sep 2021 19:23:50 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C3A360C13; Tue, 28 Sep 2021 19:23:46 +0000 (UTC) Message-ID: <8eebb8e8-aa28-a18e-d2c4-76b0b788ebc5@redhat.com> Date: Tue, 28 Sep 2021 21:23:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 From: Maxime Coquelin To: David Marchand , dev@dpdk.org Cc: Chenbo Xia References: <20210915145447.28481-1-david.marchand@redhat.com> <86cd730e-6573-7e04-5c01-7726e0b02e2a@redhat.com> In-Reply-To: <86cd730e-6573-7e04-5c01-7726e0b02e2a@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] vhost: rework RARP packet injection 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 Sender: "dev" On 9/28/21 17:32, Maxime Coquelin wrote: > > > On 9/15/21 16:54, David Marchand wrote: >> Caught by code review, this copy is unnecessary. >> >> Signed-off-by: David Marchand >> --- >>   lib/vhost/virtio_net.c | 11 +++-------- >>   1 file changed, 3 insertions(+), 8 deletions(-) >> > > Applied to dpdk-next-virtio/main. > > Thanks, > Maxime > As you suggested on IRC, I added back the comment that got removed: @@ -3136,6 +3136,12 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, count = 0; goto out; } + /* + * Inject it to the head of "pkts" array, so that switch's mac + * learning table will get updated first. + */ + pkts[0] = rarp_mbuf; + pkts++; count -= 1; } Regards, Maxime