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=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 06F60C43387 for ; Thu, 17 Jan 2019 12:40:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B505720851 for ; Thu, 17 Jan 2019 12:40:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727630AbfAQMkG (ORCPT ); Thu, 17 Jan 2019 07:40:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51400 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbfAQMkG (ORCPT ); Thu, 17 Jan 2019 07:40:06 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id 3EFF781F0F; Thu, 17 Jan 2019 12:40:06 +0000 (UTC) Received: from [10.72.12.16] (ovpn-12-16.pek2.redhat.com [10.72.12.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B1DF4F85; Thu, 17 Jan 2019 12:39:54 +0000 (UTC) Subject: Re: [PATCH net 3/7] virtio_net: Fix not restoring real_num_rx_queues To: Toshiaki Makita , "David S. Miller" , "Michael S. Tsirkin" Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org References: <1547724045-2726-1-git-send-email-makita.toshiaki@lab.ntt.co.jp> <1547724045-2726-4-git-send-email-makita.toshiaki@lab.ntt.co.jp> From: Jason Wang Message-ID: <20c11700-f0a4-dbb8-1646-98da3b771d7f@redhat.com> Date: Thu, 17 Jan 2019 20:39:52 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1547724045-2726-4-git-send-email-makita.toshiaki@lab.ntt.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 17 Jan 2019 12:40:06 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/1/17 下午7:20, Toshiaki Makita wrote: > When _virtnet_set_queues() failed we did not restore real_num_rx_queues. > Fix this by placing the change of real_num_rx_queues after > _virtnet_set_queues(). > This order is also in line with virtnet_set_channels(). > > Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set") > Signed-off-by: Toshiaki Makita > --- > drivers/net/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 7d35e6d..670cc15 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2427,10 +2427,10 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > } > } > > - netif_set_real_num_rx_queues(dev, curr_qp + xdp_qp); > err = _virtnet_set_queues(vi, curr_qp + xdp_qp); > if (err) > goto err; > + netif_set_real_num_rx_queues(dev, curr_qp + xdp_qp); > vi->xdp_queue_pairs = xdp_qp; > > for (i = 0; i < vi->max_queue_pairs; i++) { Acked-by: Jason Wang