From patchwork Wed Oct 26 12:59:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cai Huoqing X-Patchwork-Id: 11251 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp257404wru; Wed, 26 Oct 2022 06:09:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7B5oTPj7eCCbfYfWRgoDoQyFL6zJXCpOOKNL3Wb3peij8XJYlG/JHKG/NY3Hw/f5ZEoVby X-Received: by 2002:a17:903:248:b0:172:7520:db04 with SMTP id j8-20020a170903024800b001727520db04mr44384102plh.99.1666789771644; Wed, 26 Oct 2022 06:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666789771; cv=none; d=google.com; s=arc-20160816; b=xUZ74TSb8r56GIPmT/eIH4qshzCEe1Kwq2tE7Kjsns0gvX5BWUqvtVFj09qJQbxGg2 jeUfPpzpbJf0i7nTMcOlCm26CLnw+RV9dtgacipPjDHyH3bp4tCWAyh1FRjtuinW2wHy 8uNZbE/hhn48di+BW8xLl1c+eEN2zl54Lo08JM9IawRfwbzhBAFOF4yhImO4DJ4Bq1mk giJFny1rGRJYN0nZOY6WnkKoIvRltGVRz9UUIfjNlTbd6GRJ+W18NIYQjJGpcUPPEzOD D8GPkOmD5sN3Vyd6IvOPHWalRtUrhzaQVYyUQg761GwH5MikMGEITKlAo3Q8cm4Irx/3 CD2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lABM8qBfODA4VDQRynLERW7dnvib2XZRLEYg+K9ItVk=; b=JHjkTK+uqqzJ/oo83aUScL2kVimD5vFmkutyMEJoWOOvintD9Z4JIKCK4dBkPdZ5hY hf5gOk4lWhwTf2pFj11DE/8zJ5VGZNIeT4AXcOIdc4c1Ou7f87bd5eqKiXXXTA7hwJfg WaOErulzIQf/0dwUo+LVIn1LQFD8jggCyX4ZgKs0C6oE2UCyrobdmvEHY4bDqYshwJoK 69KVJflHIfQ8eUiJKZ5NfMxFGwzUkGgw7+6z68iwAcffWNMfBQv/fn9CUVr/uCsu3Ewt IGuUVEkg605+nAh+4Zh9YoIIPnc1XBj1BYujUxfaFagbbNxJuK9pvalLyrOjLirNczvp A6JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=nf4NC2E8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l17-20020a170902f69100b001786d7bc2dfsi7325948plg.400.2022.10.26.06.09.17; Wed, 26 Oct 2022 06:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=nf4NC2E8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233822AbiJZM7l (ORCPT + 99 others); Wed, 26 Oct 2022 08:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233397AbiJZM7j (ORCPT ); Wed, 26 Oct 2022 08:59:39 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD46EDE8C; Wed, 26 Oct 2022 05:59:35 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666789174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lABM8qBfODA4VDQRynLERW7dnvib2XZRLEYg+K9ItVk=; b=nf4NC2E8eDLWLFZTYZZgxboG57SC8iJ6KGvsoWcn1RPvDKIQetD8HlLADzS9y1nbrWQFQ4 /d9HXIf5nlqyHSOqHnAYTPK+wXRlOiCD9hA5redaLRWaJEgS/BMLYiv0fBpIHVrnC7ObBy LuIza/OAwGMKqJvGntC0Gu2JPMlF0DA= From: Cai Huoqing To: cai.huoqing@linux.dev Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Zhengchao Shao , Bin Chen , Alexei Starovoitov , Greg Kroah-Hartman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] net: hinic: Convert the cmd code from decimal to hex to be more readable Date: Wed, 26 Oct 2022 20:59:10 +0800 Message-Id: <20221026125922.34080-1-cai.huoqing@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,TO_EQ_FM_DIRECT_MX,UPPERCASE_75_100,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747755751723522502?= X-GMAIL-MSGID: =?utf-8?q?1747755751723522502?= The print cmd code is in hex, so using hex cmd code intead of decimal is easy to check the value with print info. Signed-off-by: Cai Huoqing --- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 108 +++++++++--------- 1 file changed, 52 insertions(+), 56 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h index d2d89b0a5ef0..abffd967a791 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h @@ -46,104 +46,100 @@ enum hinic_port_cmd { HINIC_PORT_CMD_VF_REGISTER = 0x0, HINIC_PORT_CMD_VF_UNREGISTER = 0x1, - HINIC_PORT_CMD_CHANGE_MTU = 2, + HINIC_PORT_CMD_CHANGE_MTU = 0x2, - HINIC_PORT_CMD_ADD_VLAN = 3, - HINIC_PORT_CMD_DEL_VLAN = 4, + HINIC_PORT_CMD_ADD_VLAN = 0x3, + HINIC_PORT_CMD_DEL_VLAN = 0x4, - HINIC_PORT_CMD_SET_PFC = 5, + HINIC_PORT_CMD_SET_PFC = 0x5, - HINIC_PORT_CMD_SET_MAC = 9, - HINIC_PORT_CMD_GET_MAC = 10, - HINIC_PORT_CMD_DEL_MAC = 11, + HINIC_PORT_CMD_SET_MAC = 0x9, + HINIC_PORT_CMD_GET_MAC = 0xA, + HINIC_PORT_CMD_DEL_MAC = 0xB, - HINIC_PORT_CMD_SET_RX_MODE = 12, + HINIC_PORT_CMD_SET_RX_MODE = 0xC, - HINIC_PORT_CMD_GET_PAUSE_INFO = 20, - HINIC_PORT_CMD_SET_PAUSE_INFO = 21, + HINIC_PORT_CMD_GET_PAUSE_INFO = 0x14, + HINIC_PORT_CMD_SET_PAUSE_INFO = 0x15, - HINIC_PORT_CMD_GET_LINK_STATE = 24, + HINIC_PORT_CMD_GET_LINK_STATE = 0x18, - HINIC_PORT_CMD_SET_LRO = 25, + HINIC_PORT_CMD_SET_LRO = 0x19, - HINIC_PORT_CMD_SET_RX_CSUM = 26, + HINIC_PORT_CMD_SET_RX_CSUM = 0x1A, - HINIC_PORT_CMD_SET_RX_VLAN_OFFLOAD = 27, + HINIC_PORT_CMD_SET_RX_VLAN_OFFLOAD = 0x1B, - HINIC_PORT_CMD_GET_PORT_STATISTICS = 28, + HINIC_PORT_CMD_GET_PORT_STATISTICS = 0x1C, - HINIC_PORT_CMD_CLEAR_PORT_STATISTICS = 29, + HINIC_PORT_CMD_CLEAR_PORT_STATISTICS = 0x1D, - HINIC_PORT_CMD_GET_VPORT_STAT = 30, + HINIC_PORT_CMD_GET_VPORT_STAT = 0x1E, - HINIC_PORT_CMD_CLEAN_VPORT_STAT = 31, + HINIC_PORT_CMD_CLEAN_VPORT_STAT = 0x1F, - HINIC_PORT_CMD_GET_RSS_TEMPLATE_INDIR_TBL = 37, + HINIC_PORT_CMD_GET_RSS_TEMPLATE_INDIR_TBL = 0x25, - HINIC_PORT_CMD_SET_PORT_STATE = 41, + HINIC_PORT_CMD_SET_PORT_STATE = 0x29, - HINIC_PORT_CMD_SET_RSS_TEMPLATE_TBL = 43, + HINIC_PORT_CMD_SET_RSS_TEMPLATE_TBL = 0x2B, + HINIC_PORT_CMD_GET_RSS_TEMPLATE_TBL = 0x2C, - HINIC_PORT_CMD_GET_RSS_TEMPLATE_TBL = 44, + HINIC_PORT_CMD_SET_RSS_HASH_ENGINE = 0x2D, + HINIC_PORT_CMD_GET_RSS_HASH_ENGINE = 0x2E, - HINIC_PORT_CMD_SET_RSS_HASH_ENGINE = 45, + HINIC_PORT_CMD_GET_RSS_CTX_TBL = 0x2F, + HINIC_PORT_CMD_SET_RSS_CTX_TBL = 0x30, - HINIC_PORT_CMD_GET_RSS_HASH_ENGINE = 46, + HINIC_PORT_CMD_RSS_TEMP_MGR = 0x31, - HINIC_PORT_CMD_GET_RSS_CTX_TBL = 47, + HINIC_PORT_CMD_RD_LINE_TBL = 0x39, - HINIC_PORT_CMD_SET_RSS_CTX_TBL = 48, + HINIC_PORT_CMD_RSS_CFG = 0x42, - HINIC_PORT_CMD_RSS_TEMP_MGR = 49, + HINIC_PORT_CMD_FWCTXT_INIT = 0x45, - HINIC_PORT_CMD_RD_LINE_TBL = 57, + HINIC_PORT_CMD_GET_LOOPBACK_MODE = 0x48, + HINIC_PORT_CMD_SET_LOOPBACK_MODE = 0x49, - HINIC_PORT_CMD_RSS_CFG = 66, + HINIC_PORT_CMD_ENABLE_SPOOFCHK = 0x4E, - HINIC_PORT_CMD_FWCTXT_INIT = 69, + HINIC_PORT_CMD_GET_MGMT_VERSION = 0x58, - HINIC_PORT_CMD_GET_LOOPBACK_MODE = 72, - HINIC_PORT_CMD_SET_LOOPBACK_MODE, + HINIC_PORT_CMD_SET_FUNC_STATE = 0x5D, - HINIC_PORT_CMD_ENABLE_SPOOFCHK = 78, + HINIC_PORT_CMD_GET_GLOBAL_QPN = 0x66, - HINIC_PORT_CMD_GET_MGMT_VERSION = 88, + HINIC_PORT_CMD_SET_VF_RATE = 0x69, - HINIC_PORT_CMD_SET_FUNC_STATE = 93, + HINIC_PORT_CMD_SET_VF_VLAN = 0x6A, + HINIC_PORT_CMD_CLR_VF_VLAN = 0x6B, - HINIC_PORT_CMD_GET_GLOBAL_QPN = 102, + HINIC_PORT_CMD_SET_TSO = 0x70, - HINIC_PORT_CMD_SET_VF_RATE = 105, + HINIC_PORT_CMD_UPDATE_FW = 0x72, - HINIC_PORT_CMD_SET_VF_VLAN = 106, + HINIC_PORT_CMD_SET_RQ_IQ_MAP = 0x73, - HINIC_PORT_CMD_CLR_VF_VLAN, + HINIC_PORT_CMD_LINK_STATUS_REPORT = 0xA0, - HINIC_PORT_CMD_SET_TSO = 112, + HINIC_PORT_CMD_UPDATE_MAC = 0xA4, - HINIC_PORT_CMD_UPDATE_FW = 114, + HINIC_PORT_CMD_GET_CAP = 0xAA, - HINIC_PORT_CMD_SET_RQ_IQ_MAP = 115, + HINIC_PORT_CMD_GET_LINK_MODE = 0xD9, - HINIC_PORT_CMD_LINK_STATUS_REPORT = 160, + HINIC_PORT_CMD_SET_SPEED = 0xDA, - HINIC_PORT_CMD_UPDATE_MAC = 164, + HINIC_PORT_CMD_SET_AUTONEG = 0xDB, - HINIC_PORT_CMD_GET_CAP = 170, + HINIC_PORT_CMD_GET_STD_SFP_INFO = 0xF0, - HINIC_PORT_CMD_GET_LINK_MODE = 217, + HINIC_PORT_CMD_SET_LRO_TIMER = 0xF4, - HINIC_PORT_CMD_SET_SPEED = 218, + HINIC_PORT_CMD_SET_VF_MAX_MIN_RATE = 0xF9, - HINIC_PORT_CMD_SET_AUTONEG = 219, - - HINIC_PORT_CMD_GET_STD_SFP_INFO = 240, - - HINIC_PORT_CMD_SET_LRO_TIMER = 244, - - HINIC_PORT_CMD_SET_VF_MAX_MIN_RATE = 249, - - HINIC_PORT_CMD_GET_SFP_ABS = 251, + HINIC_PORT_CMD_GET_SFP_ABS = 0xFB, }; /* cmd of mgmt CPU message for HILINK module */ From patchwork Wed Oct 26 12:59:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cai Huoqing X-Patchwork-Id: 11243 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp256391wru; Wed, 26 Oct 2022 06:08:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6o+dUBUGN+2tH666qZ/c+fcewL5vOkbZl0FzXBWJqMMaGRcnggjTXaqy3cMFf+lNIC00X2 X-Received: by 2002:a17:90b:4a42:b0:213:383f:cd21 with SMTP id lb2-20020a17090b4a4200b00213383fcd21mr4121511pjb.23.1666789696619; Wed, 26 Oct 2022 06:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666789696; cv=none; d=google.com; s=arc-20160816; b=HUtdtLEEq1R1JpfojGTXmLnqCB8D4oZ0rUFp3w6ayI3OFSVwlPWj6I7hoW/tEQRCXK DCbSBhTojKM6B7nF9T3DmIemivS4xfdKvy7znbPGFT535zuJ7rI5AtXBy+zLhfUqY8YQ KVxuvooOffsLvaKFBCX6iYgrC96rMMt72r7BPepMPDDUrBjv8VzjBBByI9BkgkpVI+OA FafW468EVUWf2ZIzIOJnALrA06UU9K9ZilppmDYqUUvSOj5DtIi35a+hlHPB0G/Mxe/9 Wh6J3xi+KJP5NFWQZHyM2BedakmFWWkBke+1E0bH4F4DPXAv7crUBqPF/pWHZXajLS54 x8oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JEXCwcL4yA1K3Y47Iqqcz8pSDkWfBCZZDPiFGEg6k2I=; b=IyocjTqfCcKNBQXvtBp+h2cHE8duGAUICQrEQiJCScb6Lei64VNmcBLQiWlQRw952T 6x6R47/Lpk0GF6CPUSr3fsyCsoTVuiTvL6mgyeW7T9EdpJrmm40p5g+VrbZYhGdgcbN+ RRADDV7+e6BSDypv5hmd67FCsJGoqGMxewouzK2RkCHDYg9aFhVEJS5iWDZFp1GeWbng V2sCEAJM0YDIEYtz4aVh0KqiEe/akw8g4upqcSEAHQPGBJjzc5BDh3ubQukoAk0BfSO6 93/6L5lyaZVowq9PkeLBDebHriluTqfJqb88G3pUAQcl3OQypBCpsrR0OLc9SoWRyyO8 WxsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lGvB7wHD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw7-20020a17090b4d0700b0021111f5231bsi3153123pjb.22.2022.10.26.06.07.51; Wed, 26 Oct 2022 06:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lGvB7wHD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233985AbiJZM74 (ORCPT + 99 others); Wed, 26 Oct 2022 08:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233536AbiJZM7s (ORCPT ); Wed, 26 Oct 2022 08:59:48 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7349E43E47; Wed, 26 Oct 2022 05:59:45 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666789184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JEXCwcL4yA1K3Y47Iqqcz8pSDkWfBCZZDPiFGEg6k2I=; b=lGvB7wHDqO+EvDwWoGbWe2nCqnCGq9KLljcFU9kxm0IChXbRGa6Y8nerjIFbCWQ5M0LVe2 i102yqnNhPM/mgF5fcvrxegR0qZzQcC86wtrWSngcL3aawNZpvNm6bHOTGhzmMlGzPlDhF TcuTOWcsEET2sAeUesUbLzN7m6y1Dr4= From: Cai Huoqing To: cai.huoqing@linux.dev Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Zhengchao Shao , Bin Chen , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Peter Chen , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] net: hinic: Add control command support for VF PMD driver in DPDK Date: Wed, 26 Oct 2022 20:59:11 +0800 Message-Id: <20221026125922.34080-2-cai.huoqing@linux.dev> In-Reply-To: <20221026125922.34080-1-cai.huoqing@linux.dev> References: <20221026125922.34080-1-cai.huoqing@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, TO_EQ_FM_DIRECT_MX,UPPERCASE_50_75,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747755673216484815?= X-GMAIL-MSGID: =?utf-8?q?1747755673216484815?= HINIC has a mailbox for PF-VF communication and the VF driver could send port control command to PF driver via mailbox. The control command only can be set to register in PF, so add support in PF driver for VF PMD driver control command when VF PMD driver work with linux PF driver. Signed-off-by: Cai Huoqing --- .../net/ethernet/huawei/hinic/hinic_hw_dev.h | 64 +++++++++++++++++++ .../net/ethernet/huawei/hinic/hinic_sriov.c | 18 ++++++ 2 files changed, 82 insertions(+) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h index abffd967a791..4f561e4e849a 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h +++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h @@ -53,11 +53,15 @@ enum hinic_port_cmd { HINIC_PORT_CMD_SET_PFC = 0x5, + HINIC_PORT_CMD_SET_ETS = 0x7, + HINIC_PORT_CMD_GET_ETS = 0x8, + HINIC_PORT_CMD_SET_MAC = 0x9, HINIC_PORT_CMD_GET_MAC = 0xA, HINIC_PORT_CMD_DEL_MAC = 0xB, HINIC_PORT_CMD_SET_RX_MODE = 0xC, + HINIC_PORT_CMD_SET_ANTI_ATTACK_RATE = 0xD, HINIC_PORT_CMD_GET_PAUSE_INFO = 0x14, HINIC_PORT_CMD_SET_PAUSE_INFO = 0x15, @@ -81,6 +85,7 @@ enum hinic_port_cmd { HINIC_PORT_CMD_GET_RSS_TEMPLATE_INDIR_TBL = 0x25, HINIC_PORT_CMD_SET_PORT_STATE = 0x29, + HINIC_PORT_CMD_GET_PORT_STATE = 0x30, HINIC_PORT_CMD_SET_RSS_TEMPLATE_TBL = 0x2B, HINIC_PORT_CMD_GET_RSS_TEMPLATE_TBL = 0x2C, @@ -97,17 +102,29 @@ enum hinic_port_cmd { HINIC_PORT_CMD_RSS_CFG = 0x42, + HINIC_PORT_CMD_GET_PHY_TYPE = 0x44, + HINIC_PORT_CMD_FWCTXT_INIT = 0x45, HINIC_PORT_CMD_GET_LOOPBACK_MODE = 0x48, HINIC_PORT_CMD_SET_LOOPBACK_MODE = 0x49, + HINIC_PORT_CMD_GET_JUMBO_FRAME_SIZE = 0x4A, + HINIC_PORT_CMD_SET_JUMBO_FRAME_SIZE = 0x4B, + HINIC_PORT_CMD_ENABLE_SPOOFCHK = 0x4E, HINIC_PORT_CMD_GET_MGMT_VERSION = 0x58, + HINIC_PORT_CMD_GET_PORT_TYPE = 0x5B, + HINIC_PORT_CMD_SET_FUNC_STATE = 0x5D, + HINIC_PORT_CMD_GET_PORT_ID_BY_FUNC_ID = 0x5E, + + HINIC_PORT_CMD_GET_DMA_CS = 0x64, + HINIC_PORT_CMD_SET_DMA_CS = 0x65, + HINIC_PORT_CMD_GET_GLOBAL_QPN = 0x66, HINIC_PORT_CMD_SET_VF_RATE = 0x69, @@ -121,25 +138,72 @@ enum hinic_port_cmd { HINIC_PORT_CMD_SET_RQ_IQ_MAP = 0x73, + HINIC_PORT_CMD_SET_PFC_THD = 0x75, + HINIC_PORT_CMD_LINK_STATUS_REPORT = 0xA0, + HINIC_PORT_CMD_SET_LOSSLESS_ETH = 0xA3, + HINIC_PORT_CMD_UPDATE_MAC = 0xA4, HINIC_PORT_CMD_GET_CAP = 0xAA, + HINIC_PORT_CMD_UP_TC_ADD_FLOW = 0xAF, + HINIC_PORT_CMD_UP_TC_DEL_FLOW = 0xB0, + HINIC_PORT_CMD_UP_TC_GET_FLOW = 0xB1, + + HINIC_PORT_CMD_UP_TC_FLUSH_TCAM = 0xB2, + + HINIC_PORT_CMD_UP_TC_CTRL_TCAM_BLOCK = 0xB3, + + HINIC_PORT_CMD_UP_TC_ENABLE = 0xB4, + + HINIC_PORT_CMD_UP_TC_GET_TCAM_BLOCK = 0xB5, + + HINIC_PORT_CMD_SET_IPSU_MAC = 0xCB, + HINIC_PORT_CMD_GET_IPSU_MAC = 0xCC, + + HINIC_PORT_CMD_SET_XSFP_STATUS = 0xD4, HINIC_PORT_CMD_GET_LINK_MODE = 0xD9, HINIC_PORT_CMD_SET_SPEED = 0xDA, HINIC_PORT_CMD_SET_AUTONEG = 0xDB, + HINIC_PORT_CMD_CLEAR_QP_RES = 0xDD, + + HINIC_PORT_CMD_SET_SUPER_CQE = 0xDE, + + HINIC_PORT_CMD_SET_VF_COS = 0xDF, + HINIC_PORT_CMD_GET_VF_COS = 0xE1, + + HINIC_PORT_CMD_CABLE_PLUG_EVENT = 0xE5, + + HINIC_PORT_CMD_LINK_ERR_EVENT = 0xE6, + + HINIC_PORT_CMD_SET_COS_UP_MAP = 0xE8, + + HINIC_PORT_CMD_RESET_LINK_CFG = 0xEB, + HINIC_PORT_CMD_GET_STD_SFP_INFO = 0xF0, + HINIC_PORT_CMD_FORCE_PKT_DROP = 0xF3, + HINIC_PORT_CMD_SET_LRO_TIMER = 0xF4, + HINIC_PORT_CMD_SET_VHD_CFG = 0xF7, + + HINIC_PORT_CMD_SET_LINK_FOLLOW = 0xF8, + HINIC_PORT_CMD_SET_VF_MAX_MIN_RATE = 0xF9, HINIC_PORT_CMD_GET_SFP_ABS = 0xFB, + + HINIC_PORT_CMD_Q_FILTER = 0xFC, + + HINIC_PORT_CMD_TCAM_FILTER = 0xFE, + + HINIC_PORT_CMD_SET_VLAN_FILTER = 0xFF }; /* cmd of mgmt CPU message for HILINK module */ diff --git a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c index a5f08b969e3f..bba41994dee6 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c @@ -489,6 +489,24 @@ static struct vf_cmd_check_handle nic_cmd_support_vf[] = { {HINIC_PORT_CMD_UPDATE_MAC, hinic_mbox_check_func_id_8B}, {HINIC_PORT_CMD_GET_CAP, hinic_mbox_check_func_id_8B}, {HINIC_PORT_CMD_GET_LINK_MODE, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_GET_VF_COS, NULL}, + {HINIC_PORT_CMD_SET_VHD_CFG, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_SET_VLAN_FILTER, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_Q_FILTER, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_TCAM_FILTER, NULL}, + {HINIC_PORT_CMD_UP_TC_ADD_FLOW, NULL}, + {HINIC_PORT_CMD_UP_TC_DEL_FLOW, NULL}, + {HINIC_PORT_CMD_UP_TC_FLUSH_TCAM, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_UP_TC_CTRL_TCAM_BLOCK, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_UP_TC_ENABLE, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_CABLE_PLUG_EVENT, NULL}, + {HINIC_PORT_CMD_LINK_ERR_EVENT, NULL}, + {HINIC_PORT_CMD_SET_PORT_STATE, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_SET_ETS, NULL}, + {HINIC_PORT_CMD_SET_ANTI_ATTACK_RATE, NULL}, + {HINIC_PORT_CMD_RESET_LINK_CFG, hinic_mbox_check_func_id_8B}, + {HINIC_PORT_CMD_SET_LINK_FOLLOW, NULL}, + {HINIC_PORT_CMD_CLEAR_QP_RES, NULL}, }; #define CHECK_IPSU_15BIT 0X8000