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 28042A052A; Tue, 2 Feb 2021 11:03:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9281624033C; Tue, 2 Feb 2021 11:03:34 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id B56CB24033B for ; Tue, 2 Feb 2021 11:03:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612260211; 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=aD5tjRWXNLI5mzrWF1UgqyjxNl2Mxt3KRR9J4aAss9g=; b=HWbuTsZkehotRDk+D9xp17a2u9M93vTFFTZ1ySUi7e0ENEnT+l/x2pFX3+U0qpD+WX+0EJ DwMCSbWokEkl+yJ9JhD3F680dqg4ZtLs6rh9UfzmJd6aGEOCCa+92ZhIHBgqgwgqZwTYxP VDepoZzU1wC2GeX8RFOy1oFW/cJLkog= Received: from mail-vk1-f197.google.com (mail-vk1-f197.google.com [209.85.221.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-202-UNJhK-C0OmW6LitsDKbnuQ-1; Tue, 02 Feb 2021 05:03:30 -0500 X-MC-Unique: UNJhK-C0OmW6LitsDKbnuQ-1 Received: by mail-vk1-f197.google.com with SMTP id d68so1831198vkg.10 for ; Tue, 02 Feb 2021 02:03:30 -0800 (PST) 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=aD5tjRWXNLI5mzrWF1UgqyjxNl2Mxt3KRR9J4aAss9g=; b=gudzbn7QzYqN5qfismmpUkm/Lo67ljKVDVf3S5iEFsVe4r7U1LpvvU0ugLspm5blXJ xGrfErfR/ykyGoMCZgF/1d73cWT5ei0Wvc3yGd1JodbPENqsgYs8wf/9BBwVMAfsNbjj isC9WD1ZQBdrO9yU2Lav7eigsiuEN0R0t1fueciq5MnWHaqIXjU5HRQWntMMyvTX/i+Y Sg98G6ncelT3/Y0S965GACv1jYuuJ1HJ+qdK+TFxrzNrW5gEHZc0W1F/IoBcfbZE2gtN gqg0sU8Ei62Z2gsd2Jv8ExFfcaE6wBp75k+dJOp4WvI6qXy19JdWI45Bo+Gu7NfThJiK NJaQ== X-Gm-Message-State: AOAM533WqGRIQw3ia9TsZ5lwLbE6kUV2wGuv+CoWhF+W1ibFUCjRyXzV jHBUynHfx88i8aFg9kzqMMuaggjGDmZSvJjkpDl/RXvgiUy/LoGlLyae5+20g6gLV5RAOsRxvgK BbcjAw7mvEtkrtFt3lg8= X-Received: by 2002:a05:6102:21cd:: with SMTP id r13mr11631859vsg.5.1612260210095; Tue, 02 Feb 2021 02:03:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxduB7WgJme6QVX/sMdTBinYCfwFZveiiRFz7bBYQL/51UgHeSMyh7RGdTjYrLCY1GCfcjBOHYYQ8NdBtYSsrI= X-Received: by 2002:a05:6102:21cd:: with SMTP id r13mr11631835vsg.5.1612260209890; Tue, 02 Feb 2021 02:03:29 -0800 (PST) MIME-Version: 1.0 References: <20210201203138.87301-1-maxime.coquelin@redhat.com> In-Reply-To: <20210201203138.87301-1-maxime.coquelin@redhat.com> From: David Marchand Date: Tue, 2 Feb 2021 11:03:18 +0100 Message-ID: To: Maxime Coquelin Cc: dev , "Wang, Yinan" , "Xia, Chenbo" , Adrian Moreno Zapata , Wei Ling , Yu Jiang 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 v2] net/virtio: fix Virtio-PCI ops assignment 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 Mon, Feb 1, 2021 at 9:33 PM Maxime Coquelin wrote: > > VIRTIO_OPS() macro relies on the port ID stored in the > virtio_hw struct. Issue is that it is used before being > assigned at init time. It results in all devices setting > ops on port ID 0, causing crash later when calling ops > for port IDs other than 0. > > This patch ensures port ID assignment is done at early > primary process probe time, before it is being used. > > Bugzilla ID: 631 > Fixes: 512e27eeb743 ("net/virtio: move PCI specific dev init to PCI ethdev init") > > Reported-by: Wei Ling > Signed-off-by: Maxime Coquelin Reviewed-by: David Marchand -- David Marchand