From patchwork Tue Jun 26 16:19:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Nikolaev X-Patchwork-Id: 140004 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5441007lji; Tue, 26 Jun 2018 09:19:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdD6oQbRGtw4eFtgLFP9vC74H/yYYaRWJxmW6GqcU6NBcJZztH8Y2/9cmLnbIbwnjbFzXy/ X-Received: by 2002:adf:ae8b:: with SMTP id y11-v6mr2206741wrc.234.1530029948258; Tue, 26 Jun 2018 09:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530029948; cv=none; d=google.com; s=arc-20160816; b=0Wk5H1dh6bUHUS0dMye9EWYppwORO8lcYWSwUoaU0l6N8cWWD2mDGH2bNaOn+7yAXC 2cDzOE4zu7hDhKG38N1jPFD97UeyezOGd1IwDYAhHVCieXilh46tGx0Eip6f5cDfFLx+ CAY8gYKFjPVw4fy1HwfVPkrxbqC8ZlEQuaB1BYxqOSkNY5eG+57dA/73C/0KiHoN+Gcg qHpBFtZZC/LIymovEqh58mXZ3FHnNLOYv+KYiLHRDR3DwfhvAJCyWmjQwBbHFZq/9W8m XTmxsHbb+BKOt2B9PNPDHWgpB86bi+/8RUrx4Ib24YV9pPtkCqqCPQkPhCERJ9v+5qwX qpUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:user-agent:message-id:date :cc:to:from:dkim-signature:arc-authentication-results; bh=GJSOGcobuvg47lIa4mnG6/0dlIbnB/9OmFBojc8eC1s=; b=dp0DFcMKeoZTsv+62HqL7uhbqcMc6h4weLRpFJ/pdVhZkWYYincSf9kfD0vhyVdeJ2 Q7F3RC8clPrWq9D9V00svOYVfEpz4mjbiN+jgbISPSwapgiQYHhB6KRHeL2SlWKR/hcb uoMYJP06YPy+YeesG4xcQyFTkBik67WQZsRsWyrTC4ZIwu9g5JyDhfg0442sgKw2t7So lMpNBNjb+XCZ4renly7ceo38uowCPj3MZFyt8PAEb11eyFcq1ekVIFvvxgFCfyxR2iCC MlUU18TFwcapPxF/AVCjySzOBXlB7+f1KyT9iMrXzZk3lc0BdJUSPQFXkXxee8niQTMg c4tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=CHFhcJE0; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id l79-v6si2105806wmg.0.2018.06.26.09.19.07; Tue, 26 Jun 2018 09:19:08 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=CHFhcJE0; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B1651B8FD; Tue, 26 Jun 2018 18:19:06 +0200 (CEST) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 993B01B60B for ; Tue, 26 Jun 2018 18:19:05 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id l14-v6so12792023wrq.13 for ; Tue, 26 Jun 2018 09:19:05 -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=GJSOGcobuvg47lIa4mnG6/0dlIbnB/9OmFBojc8eC1s=; b=CHFhcJE0oTF+q+dRTFPiDFzBSpUEP10Eo4I1/mVjkD9Ehcud1QCsOjwbiKzlgzR6Hm m2pNd+H3mP+OW80rVPUzBcjiz+GwKJ0UUdja71a+GBSoKnNWrmHx3CN7FlJHIM1/f/CW CmDJnKgaTZD4Ji+mEtWIUkbjkSHh7JKOV1iQhJNHBd65JNDL+P4xKw0LvDPUEcenL0Lu ynD5aThmDaGEM4BBFJkRZFpviQXlTIJAwLHaLLaUvIiOCwrkYqlNneM9YWybZkWcmkxY pE4iofNGfbS6axc3K7uXTPfv8MRQLthDzDBvupcW/kF2/XWJ9aFsK8slT/p0PkfDtWeu qHvA== 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=GJSOGcobuvg47lIa4mnG6/0dlIbnB/9OmFBojc8eC1s=; b=lCiNinlqv0irptA+XEux8YvFe0rMlLwzvj8mMIxC3BLQSFL3M2LLEay6HL7DpLxvTy G1nmZ18Otr8+oscOUStMMFLdIj308WWNSO2NgbyG8l9Z2anv1tHNJ5ALSlEg/eOym2UY 2Y4j8qnMZ4UGPwm+/376mkc47WJABWex+gGPiy/Ww7N3OJBjPodfC7bvO7JTNSoUg0kq bTD3HAEp0pRRVw1jyz71Jpw18ZHA8Q6QlS/fvvQTcqIZv+l8DQl4tgKrAecPz4GzsIED TSPHYHcNuxBNK4Fy90nYCU/de+msulvibYVh8MPDlEeW7Xnf34khvGN6F4D3FEPnoM5C eNjg== X-Gm-Message-State: APt69E23/qzQ4p0A/O9CUM0pFw5QiWSTpx4TADX5cfJDESkidnBbYo8A h5tz1/oEObiUv4X1bCzcy5TY08I4 X-Received: by 2002:adf:f246:: with SMTP id b6-v6mr2050247wrp.235.1530029944743; Tue, 26 Jun 2018 09:19:04 -0700 (PDT) Received: from [127.0.1.1] ([82.146.27.14]) by smtp.gmail.com with ESMTPSA id n7-v6sm2262216wrr.39.2018.06.26.09.19.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 09:19:03 -0700 (PDT) From: Nikolay Nikolaev To: maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org Date: Tue, 26 Jun 2018 19:19:02 +0300 Message-ID: <153002988259.22089.8523468795459281187.stgit@T460> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v1 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. --- 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 | 391 ++++++++++++++++++++++------------------- 1 file changed, 208 insertions(+), 183 deletions(-) -- Signature