Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp185497ybh; Tue, 17 Mar 2020 20:58:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt3ofo5iFQiJdCJkWw5K7nIdazjTB0nOAnZPXSmWaE7ud6R2cIlaEwmZal24Aw0oTQ1V3w+ X-Received: by 2002:a9d:5381:: with SMTP id w1mr2268629otg.220.1584503929568; Tue, 17 Mar 2020 20:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584503929; cv=none; d=google.com; s=arc-20160816; b=A2yZmb2Lwrdm70ATjsm2CIDkZGkn28ZfsabICFpJEUq3KNomKzRnI/6blx0ZUFtOqI 7OC+8NiFxY5VYpyJMPmKSNgTuMBA6V77w34x37YQctz+xVICX7iBDsGfwpbO9YNiUtQO TpQ5JpeyHh/DBEsnjp+IstH2ckwII1+qG86lfaZ3h1zYKKjaM9RMRRWteBQIBzwd5nRq JMQi8uDPA2CtmKaLdD1zewNk1IVf+7shFkj2g8uCFf6a4G1KzhXjBZ7S7a0ODk/6ceaf hDlR5ZqWqhR7uPN+9/vRsLKlUEqxJUmzBNtjvyo0x90fGUkFf1pD38y5GQM8OQ5NA8Ly lnvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=gVitQ/MU/0l/8nWlHDvUvkUthJFlx5BJH/TsGHdAVUQ=; b=fsrgZUp3ivpDnlCfHxl3vEQxd4/6Wdgz8ytQBtxXZWTaW9Z1mn3XiSKIPUC6o4L9wA E55egT6x6lYOxQhwAyaWCPxv3hX/RzgJw5tOrdCOFQccT/pSuRZSXnMaFL37aV402cAL PsMff7ti5aoTXCDSM1PhY8PeWGK6o3/3WWaSNPzG86X62JJnddXM/kGLvlomYiJdQm3m C0D3Aj5ERzVygDVkUa44ETJDrhR7LMfCHG+0Qy2UtMd5u4PqxhTQuKqI9JnhWqJUSZKx pShNLcTOxHjoou0xGd3U6FWWHssy7vMUjqKH6jS49TcIF7fWPgxEWdPbOwRz1NJyrudg hFkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si3616020ots.188.2020.03.17.20.58.37; Tue, 17 Mar 2020 20:58:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727303AbgCRD6C (ORCPT + 99 others); Tue, 17 Mar 2020 23:58:02 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58044 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726553AbgCRD57 (ORCPT ); Tue, 17 Mar 2020 23:57:59 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 570E46E38FFF20C2D751; Wed, 18 Mar 2020 11:57:52 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 18 Mar 2020 11:57:41 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net-next 0/3] net: hns3: add three optimizations for mailbox handling Date: Wed, 18 Mar 2020 11:57:04 +0800 Message-ID: <1584503827-12025-1-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset includes three code optimizations for mailbox handling. [patch 1] adds a response code conversion. [patch 2] refactors some structure definitions about PF and VF mailbox. [patch 3] refactors the condition whether PF responds VF's mailbox. Huazhong Tan (1): net: hns3: refactor mailbox response scheme between PF and VF Jian Shen (1): net: hns3: add a conversion for mailbox's response code Yufeng Mo (1): net: hns3: refactor the mailbox message between PF and VF drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 54 ++- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 387 ++++++++++----------- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 311 +++++++++-------- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 4 +- .../ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 50 +-- 5 files changed, 420 insertions(+), 386 deletions(-) -- 2.7.4