From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by dpdk.org (Postfix) with ESMTP id DA16E5951 for ; Thu, 19 Jul 2018 21:13:22 +0200 (CEST) Received: by mail-wr1-f65.google.com with SMTP id v14-v6so9102125wro.5 for ; Thu, 19 Jul 2018 12:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=gdZr0fdCHEYxPzaiQOzXM3djjtpxdn7VeEvvyPrZuqE=; b=p3Bwwur4iWXYXuj77vVcgPPCLaZzq7wfHZEu2oei+gHoIwPZwUFs+8WKMRIjupUeyz E8kux5hP1Pix3HK/CvviU4SRE9Uch9kO0+lb7q4YUEvykpnN78M57/OwIt7CDLAiuhZf rO4n7ZpgxaO3RA9IDEqp8Ka1I2n/CvORnwQMR15OCA2p6ZFbGEMSVjIo/t4qScx8+PWp bk1k9OFpnBy22HxfZ67JFh4lYWirWwK2gVDcfuxnPDM6SgLVoOuRJQa0Y4YhnH3hSW20 bcb26ZoZrJpKo6ivKMX7YHRabmdTHR3qMw7aEx9H8tY6ES+kzaYyFANEDJDSeGzWIkJM +Htg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=gdZr0fdCHEYxPzaiQOzXM3djjtpxdn7VeEvvyPrZuqE=; b=lBcS90KzbHPsBE2mWfJZFElrAmw0Ww9e0f57FUo2TuOyZROCFn6sWDD82RL+dzHwCc 6qu85PJ4z2oW7hVfcFdEDLmvR8PGm9XSyvJ9XLOcGvBnKthMdiT1oGL56vlGWWXoTmgI Me3A0oRB3quWqADkOgMs0S7rXtNye1FIUstHsrhrvZtFzDuJlJw1NNRMVhAtnlFQ7VUW T7xzco2XmA6iwsl+RDNHVeTl8uImRTFK6Z39776i9MljgQxZk1X5yonX+ZDwVr7A2Ms/ lgG5ESZpK0XMLboPYsk+vTysy5aTMjTOJM3rAC8RX4upw/Yt6r7/PM854+gr+AjJ18Ol 3o5Q== X-Gm-Message-State: AOUpUlEPa8BM69Ez2rWQMCeYOoyTDG+BG+FcJ3c+1eqfzAFanm+yxL8/ C7g9GqnkuiSiovilFlkLWFfBb1YjtKE= X-Google-Smtp-Source: AAOMgpejIBCURvLBB+1DSBSV2VPB4iEUvuvHINGGmjn6+JIOHQYVJD2U9/kmGxPNe1u6YoYaw345QQ== X-Received: by 2002:adf:e642:: with SMTP id b2-v6mr8945617wrn.254.1532027602308; Thu, 19 Jul 2018 12:13:22 -0700 (PDT) Received: from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id 14-v6sm572030wmg.0.2018.07.19.12.13.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 12:13:21 -0700 (PDT) From: Nikolay Nikolaev To: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org Date: Thu, 19 Jul 2018 22:13:20 +0300 Message-ID: <153202755842.21481.1772155561595981441.stgit@T460> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH v2 0/5] vhost_user.c code cleanup 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: , X-List-Received-Date: Thu, 19 Jul 2018 19:13:23 -0000 vhost: vhost_user.c code cleanup This patchesries introduce a set of code redesigns in vhost_user.c. The goal is to unify and simplify vhost-user message handling. The patches do not intend to introduce any functional changes. v2 changes: - Fix the comments by Tiwei Bie - Keep the old behavior - Fall through when the callback returns VH_RESULT_ERR - Fall through if the request is out of range --- Nikolay Nikolaev (5): vhost: unify VhostUserMsg usage vhost: make message handling functions prepare the reply vhost: handle unsupported message types in functions vhost: unify message handling function signature vhost: message handling implemented as a callback array lib/librte_vhost/vhost_user.c | 392 ++++++++++++++++++++++------------------- 1 file changed, 208 insertions(+), 184 deletions(-) -- Signature