From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B7EEA09FF; Tue, 5 Jan 2021 22:24:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9F671607D8; Tue, 5 Jan 2021 22:24:34 +0100 (CET) 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 787C71607A1 for ; Tue, 5 Jan 2021 22:24:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609881872; 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=kUuqvdJGaVWZ+cJ1/EefgTEnhbZIsa4kXboB0j5Vmd4=; b=PgysNrmVGocZqWXrzR/pSFWbRlyYerni40P3SglJisHBZIsiAwDnd9HT+4DEIsefodGebU xa3yO6Vc/IfeOodUy+Ovb2L/O4DhUaAzxeXgUZeTbQgnMbgv0LjWnG9/KT8F5JaoFgq5Hi T6oKkXTpYsDij7mX66bPWL0biUVC+BE= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-yg1uiNhXOuCcWjtwXJP_Sg-1; Tue, 05 Jan 2021 16:24:31 -0500 X-MC-Unique: yg1uiNhXOuCcWjtwXJP_Sg-1 Received: by mail-vk1-f199.google.com with SMTP id 84so534558vkx.1 for ; Tue, 05 Jan 2021 13:24:31 -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=kUuqvdJGaVWZ+cJ1/EefgTEnhbZIsa4kXboB0j5Vmd4=; b=Vv0mwGZekdX7O08ASWxvIU2XaO+u2eMCDNY+dmxPcyH7Cg87OpO+G3/EJnpXL0w+FI xVPOJt5xnUDnMJ+3t0SbPSIreMcQ2EdRrmZPSxkLmP0l0Tqlk/BiEUsm/8/AYOmLFmG5 pmT424JuAwXOB72hE0MEOgrxEAuLFBY31TNgro4oaJloctvQAqElPemcqkiDKYUTHCbo KV2ffDlX6a7EBPafocb9gKipnIQv/YZJ1Fxev1mpGnn9YV6kw1LTMH2mmoa5MFD4iUcA PT8i8rN+VdThNb8lu/qLyYVeoy59BwEHU0Mt+fVlOWa6ialMrGit8nkUB3UpcjiGrMAb XTJA== X-Gm-Message-State: AOAM532t1wASYGP5yz/4EOylKx6OVCpf2drOW8DKFBv1qNNWPKgisoPC dWy003BzQ8uHUnz3SimBvEt2+UBIe0zIoVaGif7iPm4XkV116Yb46/HS0/6EYR4rlXVVI7qwE4H A3oF4MHk1UblShN3wCes= X-Received: by 2002:a05:6122:2b2:: with SMTP id 18mr1354518vkq.20.1609881871017; Tue, 05 Jan 2021 13:24:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKWTxXC4H8ZANV8jz53kA7GG0oEXIeudmnG4Lxi7MvtYSDoK7w9cisvdfQPBHH7bYCi0ZWwASzWmtzXBXuYkY= X-Received: by 2002:a05:6122:2b2:: with SMTP id 18mr1354514vkq.20.1609881870863; Tue, 05 Jan 2021 13:24:30 -0800 (PST) MIME-Version: 1.0 References: <20201220211405.313012-1-maxime.coquelin@redhat.com> <20201220211405.313012-29-maxime.coquelin@redhat.com> In-Reply-To: <20201220211405.313012-29-maxime.coquelin@redhat.com> From: David Marchand Date: Tue, 5 Jan 2021 22:24:19 +0100 Message-ID: To: Maxime Coquelin Cc: dev , "Xia, Chenbo" , Olivier Matz , Adrian Moreno Zapata 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 28/40] net/virtio: add Virtio-user vring setting ops 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" Skipping to the build error, I did not review this patch yet. On Sun, Dec 20, 2020 at 10:16 PM Maxime Coquelin wrote: > --- a/drivers/net/virtio/virtio_user/vhost_kernel.c > +++ b/drivers/net/virtio/virtio_user/vhost_kernel.c > @@ -219,12 +219,49 @@ vhost_kernel_set_memory_table(struct virtio_user_dev *dev) > return -1; > } > > +static int > +vhost_kernel_set_vring(struct virtio_user_dev *dev, uint64_t req, struct vhost_vring_state *state) > +{ > + int ret, fd; > + uint32_t index = state->index; > + > + /* Convert from queue index to queue-pair & offset */ > + fd = dev->vhostfds[state->index / 2]; > + state->index %= 2; > + > + ret = vhost_kernel_ioctl(fd, req, state); > + if (ret < 0) { > + PMD_DRV_LOG(ERR, "Failed to set vring (request %lu)", req); Breaks 32bits build. > + return -1; > + } > + > + /* restore index back to queue index */ > + state->index = index; > + > + return 0; > +} > + -- David Marchand