get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/16150/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16150,
    "url": "http://patchwork.dpdk.org/api/patches/16150/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20160926161945.GA28272@C02PT1RBG8WP.aus.broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20160926161945.GA28272@C02PT1RBG8WP.aus.broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20160926161945.GA28272@C02PT1RBG8WP.aus.broadcom.com",
    "date": "2016-09-26T16:19:45",
    "name": "[dpdk-dev,v2,12/15] bnxt: Update the VNIC related structures to the 1.5.1 HWRM version",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0f97333253fba249bdeb2f32ec30a4b876bec10f",
    "submitter": {
        "id": 501,
        "url": "http://patchwork.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 10,
        "url": "http://patchwork.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20160926161945.GA28272@C02PT1RBG8WP.aus.broadcom.com/mbox/",
    "series": [],
    "comments": "http://patchwork.dpdk.org/api/patches/16150/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/16150/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C25737F00;\n\tMon, 26 Sep 2016 18:19:52 +0200 (CEST)",
            "from mail-gw2-out.broadcom.com (mail-gw2-out.broadcom.com\n\t[216.31.210.63]) by dpdk.org (Postfix) with ESMTP id B1A1D7F00\n\tfor <dev@dpdk.org>; Mon, 26 Sep 2016 18:19:50 +0200 (CEST)",
            "from mail-irv-18.broadcom.com ([10.15.198.37])\n\tby mail-gw2-out.broadcom.com with ESMTP; 26 Sep 2016 09:55:02 -0700",
            "from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com\n\t[10.11.16.101])\n\tby mail-irv-18.broadcom.com (Postfix) with ESMTP id C940A850C4\n\tfor <dev@dpdk.org>; Mon, 26 Sep 2016 09:19:55 -0700 (PDT)",
            "from C02PT1RBG8WP.aus.broadcom.com\n\t(dhcp-10-46-50-80.aus.broadcom.com [10.46.50.80])\n\tby mail-irva-12.broadcom.com (Postfix) with ESMTP id 6FAAEA6290\n\tfor <dev@dpdk.org>; Mon, 26 Sep 2016 09:19:46 -0700 (PDT)"
        ],
        "X-IronPort-AV": "E=Sophos;i=\"5.30,400,1470726000\"; d=\"scan'208\";a=\"106090053\"",
        "Date": "Mon, 26 Sep 2016 11:19:45 -0500",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Message-ID": "<20160926161945.GA28272@C02PT1RBG8WP.aus.broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "User-Agent": "Mutt/1.5.23 (2014-03-12)",
        "Subject": "[dpdk-dev] [v2 12/15] bnxt: Update the VNIC related structures to\n\tthe 1.5.1 HWRM version",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Update the PMD to use VNIC related structures as per the 1.5.1 HWRM API.\nMost of the changes in the patch are white spaces and rearrangement of the\nlines - a onetime change owing to the usage of a different\nautogenerated file.\n\nStructures being updated:\nhwrm_vnic_alloc_input, hwrm_vnic_alloc_output, hwrm_vnic_free_input,\nhwrm_vnic_free_output, hwrm_vnic_cfg_input, hwrm_vnic_cfg_output,\nhwrm_vnic_rss_cfg_input, hwrm_vnic_rss_cfg_output,\nhwrm_vnic_rss_cos_lb_ctx_alloc_input,\nhwrm_vnic_rss_cos_lb_ctx_alloc_output,\nhwrm_vnic_rss_cos_lb_ctx_free_input,\nhwrm_vnic_rss_cos_lb_ctx_free_output\n\nv1->v2: split into smaller patches for easier review.\n\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/hsi_struct_def_dpdk.h | 2048 ++++++++++++++++----------------\n 1 file changed, 999 insertions(+), 1049 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h\nindex b059e0d..a003b09 100644\n--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h\n+++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h\n@@ -4051,914 +4051,572 @@ struct hwrm_queue_qportcfg_output {\n \t */\n } __attribute__((packed));\n \n-/* hwrm_cfa_l2_filter_alloc */\n+/* hwrm_vnic_alloc */\n /*\n- * A filter is used to identify traffic that contains a matching set of\n- * parameters like unicast or broadcast MAC address or a VLAN tag amongst\n- * other things which then allows the ASIC to direct the  incoming traffic\n- * to an appropriate VNIC or Rx ring.\n+ * Description: This VNIC is a resource in the RX side of the chip that is used\n+ * to represent a virtual host \"interface\". # At the time of VNIC allocation or\n+ * configuration, the function can specify whether it wants the requested VNIC\n+ * to be the default VNIC for the function or not. # If a function requests\n+ * allocation of a VNIC for the first time and a VNIC is successfully allocated\n+ * by the HWRM, then the HWRM shall make the allocated VNIC as the default VNIC\n+ * for that function. # The default VNIC shall be used for the default action\n+ * for a partition or function. # For each VNIC allocated on a function, a\n+ * mapping on the RX side to map the allocated VNIC to source virtual interface\n+ * shall be performed by the HWRM. This should be hidden to the function driver\n+ * requesting the VNIC allocation. This enables broadcast/multicast replication\n+ * with source knockout. # If multicast replication with source knockout is\n+ * enabled, then the internal VNIC to SVIF mapping data structures shall be\n+ * programmed at the time of VNIC allocation.\n  */\n-\n-/* Input (96 bytes) */\n-struct hwrm_cfa_l2_filter_alloc_input {\n-\t/*\n-\t * This value indicates what type of request this is. The format for the\n-\t * rest of the command is determined by this field.\n-\t */\n+/* Input (24 bytes) */\n+struct hwrm_vnic_alloc_input {\n \tuint16_t req_type;\n-\n \t/*\n-\t * This value indicates the what completion ring the request will be\n-\t * optionally completed on. If the value is -1, then no CR completion\n-\t * will be generated. Any other value must be a valid CR ring_id value\n-\t * for this function.\n+\t * This value indicates what type of request this is. The format\n+\t * for the rest of the command is determined by this field.\n \t */\n \tuint16_t cmpl_ring;\n-\n-\t/* This value indicates the command sequence number. */\n-\tuint16_t seq_id;\n-\n \t/*\n-\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids\n-\t * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * This value indicates the what completion ring the request\n+\t * will be optionally completed on. If the value is -1, then no\n+\t * CR completion will be generated. Any other value must be a\n+\t * valid CR ring_id value for this function.\n \t */\n+\tuint16_t seq_id;\n+\t/* This value indicates the command sequence number. */\n \tuint16_t target_id;\n-\n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function\n+\t * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF\n+\t * - HWRM\n \t */\n \tuint64_t resp_addr;\n-\n \t/*\n-\t * Enumeration denoting the RX, TX type of the resource. This\n-\t * enumeration is used for resources that are similar for both TX and RX\n-\t * paths of the chip.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH \\\n-\t\t\t\t\t\t\tUINT32_C(0x1)\n-\t\t/* tx path */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX \\\n-\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n-\t\t/* rx path */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX \\\n-\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST \\\n-\t\t\t\tHWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX\n-\t/*\n-\t * Setting of this flag indicates the applicability to the loopback\n-\t * path.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \\\n-\t\t\t\t\t\t\tUINT32_C(0x2)\n-\t/*\n-\t * Setting of this flag indicates drop action. If this flag is not set,\n-\t * then it should be considered accept action.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP \\\n-\t\t\t\t\t\t\tUINT32_C(0x4)\n-\t/*\n-\t * If this flag is set, all t_l2_* fields are invalid and they should\n-\t * not be specified. If this flag is set, then l2_* fields refer to\n-\t * fields of outermost L2 header.\n+\t * This is the host address where the response will be written\n+\t * when the request is complete. This area must be 16B aligned\n+\t * and must be cleared to zero before the request is made.\n \t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST \\\n-\t\t\t\t\t\t\tUINT32_C(0x8)\n \tuint32_t flags;\n-\n-\t/* This bit must be '1' for the l2_addr field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR \\\n-\t\t\t\t\t\t\tUINT32_C(0x1)\n-\t/* This bit must be '1' for the l2_addr_mask field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK \\\n-\t\t\t\t\t\t\tUINT32_C(0x2)\n-\t/* This bit must be '1' for the l2_ovlan field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN \\\n-\t\t\t\t\t\t\tUINT32_C(0x4)\n-\t/* This bit must be '1' for the l2_ovlan_mask field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK \\\n-\t\t\t\t\t\t\tUINT32_C(0x8)\n-\t/* This bit must be '1' for the l2_ivlan field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN \\\n-\t\t\t\t\t\t\tUINT32_C(0x10)\n-\t/* This bit must be '1' for the l2_ivlan_mask field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK \\\n-\t\t\t\t\t\t\tUINT32_C(0x20)\n-\t/* This bit must be '1' for the t_l2_addr field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR \\\n-\t\t\t\t\t\t\tUINT32_C(0x40)\n-\t/*\n-\t * This bit must be '1' for the t_l2_addr_mask field to be configured.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK \\\n-\t\t\t\t\t\t\tUINT32_C(0x80)\n-\t/* This bit must be '1' for the t_l2_ovlan field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN \\\n-\t\t\t\t\t\t\tUINT32_C(0x100)\n-\t/*\n-\t * This bit must be '1' for the t_l2_ovlan_mask field to be configured.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK \\\n-\t\t\t\t\t\t\tUINT32_C(0x200)\n-\t/* This bit must be '1' for the t_l2_ivlan field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN \\\n-\t\t\t\t\t\t\tUINT32_C(0x400)\n-\t/*\n-\t * This bit must be '1' for the t_l2_ivlan_mask field to be configured.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK \\\n-\t\t\t\t\t\t\tUINT32_C(0x800)\n-\t/* This bit must be '1' for the src_type field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE \\\n-\t\t\t\t\t\t\tUINT32_C(0x1000)\n-\t/* This bit must be '1' for the src_id field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID \\\n-\t\t\t\t\t\t\tUINT32_C(0x2000)\n-\t/* This bit must be '1' for the tunnel_type field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \\\n-\t\t\t\t\t\t\tUINT32_C(0x4000)\n-\t/* This bit must be '1' for the dst_id field to be configured. */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID \\\n-\t\t\t\t\t\t\tUINT32_C(0x8000)\n-\t/*\n-\t * This bit must be '1' for the mirror_vnic_id field to be configured.\n-\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \\\n-\t\t\t\t\t\t\tUINT32_C(0x10000)\n-\tuint32_t enables;\n-\n \t/*\n-\t * This value sets the match value for the L2 MAC address. Destination\n-\t * MAC address for RX path. Source MAC address for TX path.\n-\t */\n-\tuint8_t l2_addr[6];\n-\n-\tuint8_t unused_0;\n-\tuint8_t unused_1;\n-\n-\t/*\n-\t * This value sets the mask value for the L2 address. A value of 0 will\n-\t * mask the corresponding bit from compare.\n-\t */\n-\tuint8_t l2_addr_mask[6];\n-\n-\t/* This value sets VLAN ID value for outer VLAN. */\n-\tuint16_t l2_ovlan;\n-\n-\t/*\n-\t * This value sets the mask value for the ovlan id. A value of 0 will\n-\t * mask the corresponding bit from compare.\n+\t * When this bit is '1', this VNIC is requested to be the\n+\t * default VNIC for this function.\n \t */\n-\tuint16_t l2_ovlan_mask;\n-\n-\t/* This value sets VLAN ID value for inner VLAN. */\n-\tuint16_t l2_ivlan;\n-\n-\t/*\n-\t * This value sets the mask value for the ivlan id. A value of 0 will\n-\t * mask the corresponding bit from compare.\n-\t */\n-\tuint16_t l2_ivlan_mask;\n-\n-\tuint8_t unused_2;\n-\tuint8_t unused_3;\n-\n-\t/*\n-\t * This value sets the match value for the tunnel L2 MAC address.\n-\t * Destination MAC address for RX path. Source MAC address for TX path.\n-\t */\n-\tuint8_t t_l2_addr[6];\n-\n-\tuint8_t unused_4;\n-\tuint8_t unused_5;\n-\n-\t/*\n-\t * This value sets the mask value for the tunnel L2 address. A value of\n-\t * 0 will mask the corresponding bit from compare.\n-\t */\n-\tuint8_t t_l2_addr_mask[6];\n-\n-\t/* This value sets VLAN ID value for tunnel outer VLAN. */\n-\tuint16_t t_l2_ovlan;\n-\n-\t/*\n-\t * This value sets the mask value for the tunnel ovlan id. A value of 0\n-\t * will mask the corresponding bit from compare.\n-\t */\n-\tuint16_t t_l2_ovlan_mask;\n-\n-\t/* This value sets VLAN ID value for tunnel inner VLAN. */\n-\tuint16_t t_l2_ivlan;\n-\n-\t/*\n-\t * This value sets the mask value for the tunnel ivlan id. A value of 0\n-\t * will mask the corresponding bit from compare.\n-\t */\n-\tuint16_t t_l2_ivlan_mask;\n-\n-\t/* This value identifies the type of source of the packet. */\n-\t\t/* Network port */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT \\\n-\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n-\t\t/* Physical function */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF \\\n-\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n-\t\t/* Virtual function */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF \\\n-\t\t\t\t\t\t\t(UINT32_C(0x2) << 0)\n-\t\t/* Virtual NIC of a function */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC \\\n-\t\t\t\t\t\t\t(UINT32_C(0x3) << 0)\n-\t\t/* Embedded processor for CFA management */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG \\\n-\t\t\t\t\t\t\t(UINT32_C(0x4) << 0)\n-\t\t/* Embedded processor for OOB management */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE \\\n-\t\t\t\t\t\t\t(UINT32_C(0x5) << 0)\n-\t\t/* Embedded processor for RoCE */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO \\\n-\t\t\t\t\t\t\t(UINT32_C(0x6) << 0)\n-\t\t/* Embedded processor for network proxy functions */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG \\\n-\t\t\t\t\t\t\t(UINT32_C(0x7) << 0)\n-\tuint8_t src_type;\n-\n-\tuint8_t unused_6;\n-\t/*\n-\t * This value is the id of the source. For a network port, it represents\n-\t * port_id. For a physical function, it represents fid. For a virtual\n-\t * function, it represents vf_id. For a vnic, it represents vnic_id. For\n-\t * embedded processors, this id is not valid. Notes: 1. The function ID\n-\t * is implied if it src_id is not provided for a src_type that is either\n-\t */\n-\tuint32_t src_id;\n-\n-\t/* Tunnel Type. */\n-\t\t/* Non-tunnel */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \\\n-\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n-\t\t/* Virtual eXtensible Local Area Network (VXLAN) */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \\\n-\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n-\t\t/*\n-\t\t * Network Virtualization Generic Routing Encapsulation (NVGRE)\n-\t\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \\\n-\t\t\t\t\t\t\t(UINT32_C(0x2) << 0)\n-\t\t/*\n-\t\t * Generic Routing Encapsulation (GRE) inside Ethernet payload\n-\t\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \\\n-\t\t\t\t\t\t\t(UINT32_C(0x3) << 0)\n-\t\t/* IP in IP */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \\\n-\t\t\t\t\t\t\t(UINT32_C(0x4) << 0)\n-\t\t/* Generic Network Virtualization Encapsulation (Geneve) */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \\\n-\t\t\t\t\t\t\t(UINT32_C(0x5) << 0)\n-\t\t/* Multi-Protocol Lable Switching (MPLS) */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \\\n-\t\t\t\t\t\t\t(UINT32_C(0x6) << 0)\n-\t\t/* Stateless Transport Tunnel (STT) */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \\\n-\t\t\t\t\t\t\t(UINT32_C(0x7) << 0)\n-\t\t/*\n-\t\t * Generic Routing Encapsulation (GRE) inside IP datagram\n-\t\t * payload\n-\t\t */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \\\n-\t\t\t\t\t\t\t(UINT32_C(0x8) << 0)\n-\t\t/* Any tunneled traffic */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \\\n-\t\t\t\t\t\t\t(UINT32_C(0xff) << 0)\n-\tuint8_t tunnel_type;\n-\n-\tuint8_t unused_7;\n-\n-\t/*\n-\t * If set, this value shall represent the Logical VNIC ID of the\n-\t * destination VNIC for the RX path and network port id of the\n-\t * destination port for the TX path.\n-\t */\n-\tuint16_t dst_id;\n-\n-\t/* Logical VNIC ID of the VNIC where traffic is mirrored. */\n-\tuint16_t mirror_vnic_id;\n-\n-\t/*\n-\t * This hint is provided to help in placing the filter in the filter\n-\t * table.\n-\t */\n-\t\t/* No preference */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \\\n-\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n-\t\t/* Above the given filter */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER \\\n-\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n-\t\t/* Below the given filter */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER \\\n-\t\t\t\t\t\t\t(UINT32_C(0x2) << 0)\n-\t\t/* As high as possible */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX \\\n-\t\t\t\t\t\t\t(UINT32_C(0x3) << 0)\n-\t\t/* As low as possible */\n-\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN \\\n-\t\t\t\t\t\t\t(UINT32_C(0x4) << 0)\n-\tuint8_t pri_hint;\n-\n-\tuint8_t unused_8;\n-\tuint32_t unused_9;\n-\n-\t/*\n-\t * This is the ID of the filter that goes along with the pri_hint. This\n-\t * field is valid only for the following values. 1 - Above the given\n-\t * filter 2 - Below the given filter\n-\t */\n-\tuint64_t l2_filter_id_hint;\n+\t#define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT\tUINT32_C(0x1)\n+\tuint32_t unused_0;\n } __attribute__((packed));\n \n-/* Output (24 bytes) */\n-struct hwrm_cfa_l2_filter_alloc_output {\n+/* Output (16 bytes) */\n+struct hwrm_vnic_alloc_output {\n+\tuint16_t error_code;\n \t/*\n-\t * Pass/Fail or error type Note: receiver to verify the in parameters,\n-\t * and fail the call with an error when appropriate\n+\t * Pass/Fail or error type Note: receiver to verify the in\n+\t * parameters, and fail the call with an error when appropriate\n \t */\n-\tuint16_t error_code;\n-\n-\t/* This field returns the type of original request. */\n \tuint16_t req_type;\n-\n-\t/* This field provides original sequence number of the command. */\n+\t/* This field returns the type of original request. */\n \tuint16_t seq_id;\n-\n-\t/*\n-\t * This field is the length of the response in bytes. The last byte of\n-\t * the response is a valid flag that will read as '1' when the command\n-\t * has been completely written to memory.\n-\t */\n+\t/* This field provides original sequence number of the command. */\n \tuint16_t resp_len;\n-\n-\t/*\n-\t * This value identifies a set of CFA data structures used for an L2\n-\t * context.\n-\t */\n-\tuint64_t l2_filter_id;\n-\n \t/*\n-\t * This is the ID of the flow associated with this filter. This value\n-\t * shall be used to match and associate the flow identifier returned in\n-\t * completion records. A value of 0xFFFFFFFF shall indicate no flow id.\n+\t * This field is the length of the response in bytes. The last\n+\t * byte of the response is a valid flag that will read as '1'\n+\t * when the command has been completely written to memory.\n \t */\n-\tuint32_t flow_id;\n-\n+\tuint32_t vnic_id;\n+\t/* Logical vnic ID */\n \tuint8_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n-\n+\tuint8_t valid;\n \t/*\n-\t * This field is used in Output records to indicate that the output is\n-\t * completely written to RAM. This field should be read as '1' to\n-\t * indicate that the output has been completely written. When writing a\n-\t * command completion or response to an internal processor, the order of\n-\t * writes has to be such that this field is written last.\n+\t * This field is used in Output records to indicate that the\n+\t * output is completely written to RAM. This field should be\n+\t * read as '1' to indicate that the output has been completely\n+\t * written. When writing a command completion or response to an\n+\t * internal processor, the order of writes has to be such that\n+\t * this field is written last.\n \t */\n-\tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_cfa_l2_filter_free */\n+/* hwrm_vnic_free */\n /*\n- * Description: Free a L2 filter. The HWRM shall free all associated filter\n- * resources with the L2 filter.\n+ * Description: Free a VNIC resource. Idle any resources associated with the\n+ * VNIC as well as the VNIC. Reset and release all resources associated with the\n+ * VNIC.\n  */\n-\n /* Input (24 bytes) */\n-struct hwrm_cfa_l2_filter_free_input {\n-\t/*\n-\t * This value indicates what type of request this is. The format for the\n-\t * rest of the command is determined by this field.\n-\t */\n+struct hwrm_vnic_free_input {\n \tuint16_t req_type;\n-\n \t/*\n-\t * This value indicates the what completion ring the request will be\n-\t * optionally completed on. If the value is -1, then no CR completion\n-\t * will be generated. Any other value must be a valid CR ring_id value\n-\t * for this function.\n+\t * This value indicates what type of request this is. The format\n+\t * for the rest of the command is determined by this field.\n \t */\n \tuint16_t cmpl_ring;\n-\n-\t/* This value indicates the command sequence number. */\n-\tuint16_t seq_id;\n-\n \t/*\n-\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids\n-\t * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * This value indicates the what completion ring the request\n+\t * will be optionally completed on. If the value is -1, then no\n+\t * CR completion will be generated. Any other value must be a\n+\t * valid CR ring_id value for this function.\n \t */\n+\tuint16_t seq_id;\n+\t/* This value indicates the command sequence number. */\n \tuint16_t target_id;\n-\n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function\n+\t * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF\n+\t * - HWRM\n \t */\n \tuint64_t resp_addr;\n-\n \t/*\n-\t * This value identifies a set of CFA data structures used for an L2\n-\t * context.\n+\t * This is the host address where the response will be written\n+\t * when the request is complete. This area must be 16B aligned\n+\t * and must be cleared to zero before the request is made.\n \t */\n-\tuint64_t l2_filter_id;\n+\tuint32_t vnic_id;\n+\t/* Logical vnic ID */\n+\tuint32_t unused_0;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_cfa_l2_filter_free_output {\n+struct hwrm_vnic_free_output {\n+\tuint16_t error_code;\n \t/*\n-\t * Pass/Fail or error type Note: receiver to verify the in parameters,\n-\t * and fail the call with an error when appropriate\n+\t * Pass/Fail or error type Note: receiver to verify the in\n+\t * parameters, and fail the call with an error when appropriate\n \t */\n-\tuint16_t error_code;\n-\n-\t/* This field returns the type of original request. */\n \tuint16_t req_type;\n-\n-\t/* This field provides original sequence number of the command. */\n+\t/* This field returns the type of original request. */\n \tuint16_t seq_id;\n-\n+\t/* This field provides original sequence number of the command. */\n+\tuint16_t resp_len;\n \t/*\n-\t * This field is the length of the response in bytes. The last byte of\n-\t * the response is a valid flag that will read as '1' when the command\n-\t * has been completely written to memory.\n+\t * This field is the length of the response in bytes. The last\n+\t * byte of the response is a valid flag that will read as '1'\n+\t * when the command has been completely written to memory.\n \t */\n-\tuint16_t resp_len;\n-\n \tuint32_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n \tuint8_t unused_3;\n-\n+\tuint8_t valid;\n \t/*\n-\t * This field is used in Output records to indicate that the output is\n-\t * completely written to RAM. This field should be read as '1' to\n-\t * indicate that the output has been completely written. When writing a\n-\t * command completion or response to an internal processor, the order of\n-\t * writes has to be such that this field is written last.\n+\t * This field is used in Output records to indicate that the\n+\t * output is completely written to RAM. This field should be\n+\t * read as '1' to indicate that the output has been completely\n+\t * written. When writing a command completion or response to an\n+\t * internal processor, the order of writes has to be such that\n+\t * this field is written last.\n \t */\n-\tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_cfa_l2_set_rx_mask */\n-/* Description: This command will set rx mask of the function. */\n-\n+/* hwrm_vnic_cfg */\n+/* Description: Configure the RX VNIC structure. */\n /* Input (40 bytes) */\n-struct hwrm_cfa_l2_set_rx_mask_input {\n-\t/*\n-\t * This value indicates what type of request this is. The format for the\n-\t * rest of the command is determined by this field.\n-\t */\n+struct hwrm_vnic_cfg_input {\n \tuint16_t req_type;\n-\n \t/*\n-\t * This value indicates the what completion ring the request will be\n-\t * optionally completed on. If the value is -1, then no CR completion\n-\t * will be generated. Any other value must be a valid CR ring_id value\n-\t * for this function.\n+\t * This value indicates what type of request this is. The format\n+\t * for the rest of the command is determined by this field.\n \t */\n \tuint16_t cmpl_ring;\n-\n-\t/* This value indicates the command sequence number. */\n-\tuint16_t seq_id;\n-\n \t/*\n-\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids\n-\t * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * This value indicates the what completion ring the request\n+\t * will be optionally completed on. If the value is -1, then no\n+\t * CR completion will be generated. Any other value must be a\n+\t * valid CR ring_id value for this function.\n \t */\n+\tuint16_t seq_id;\n+\t/* This value indicates the command sequence number. */\n \tuint16_t target_id;\n-\n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function\n+\t * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF\n+\t * - HWRM\n \t */\n \tuint64_t resp_addr;\n-\n-\t/* VNIC ID */\n-\tuint32_t vnic_id;\n-\n-\t/* Reserved for future use. */\n-\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_RESERVED\tUINT32_C(0x1)\n \t/*\n-\t * When this bit is '1', the function is requested to accept multi-cast\n-\t * packets specified by the multicast addr table.\n+\t * This is the host address where the response will be written\n+\t * when the request is complete. This area must be 16B aligned\n+\t * and must be cleared to zero before the request is made.\n \t */\n-\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST\tUINT32_C(0x2)\n+\tuint32_t flags;\n \t/*\n-\t * When this bit is '1', the function is requested to accept all multi-\n-\t * cast packets.\n+\t * When this bit is '1', the VNIC is requested to be the default\n+\t * VNIC for the function.\n \t */\n-\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST\tUINT32_C(0x4)\n+\t#define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT\tUINT32_C(0x1)\n \t/*\n-\t * When this bit is '1', the function is requested to accept broadcast\n-\t * packets.\n+\t * When this bit is '1', the VNIC is being configured to strip\n+\t * VLAN in the RX path. If set to '0', then VLAN stripping is\n+\t * disabled on this VNIC.\n \t */\n-\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST\tUINT32_C(0x8)\n+\t#define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE\tUINT32_C(0x2)\n \t/*\n-\t * When this bit is '1', the function is requested to be put in the\n-\t * promiscuous mode. The HWRM should accept any function to set up\n-\t * promiscuous mode. The HWRM shall follow the semantics below for the\n-\t * promiscuous mode support. # When partitioning is not enabled on a\n-\t * port (i.e. single PF on the port), then the PF shall be allowed to be\n-\t * in the promiscuous mode. When the PF is in the promiscuous mode, then\n-\t * it shall receive all host bound traffic on that port. # When\n-\t * partitioning is enabled on a port (i.e. multiple PFs per port) and a\n-\t * PF on that port is in the promiscuous mode, then the PF receives all\n-\t * traffic within that partition as identified by a unique identifier\n-\t * for the PF (e.g. S-Tag). If a unique outer VLAN for the PF is\n-\t * specified, then the setting of promiscuous mode on that PF shall\n-\t * result in the PF receiving all host bound traffic with matching outer\n-\t * VLAN. # A VF shall can be set in the promiscuous mode. In the\n-\t * promiscuous mode, the VF does not receive any traffic unless a unique\n-\t * outer VLAN for the VF is specified. If a unique outer VLAN for the VF\n-\t * is specified, then the setting of promiscuous mode on that VF shall\n-\t * result in the VF receiving all host bound traffic with the matching\n-\t * outer VLAN. # The HWRM shall allow the setting of promiscuous mode on\n-\t * a function independently from the promiscuous mode settings on other\n-\t * functions.\n+\t * When this bit is '1', the VNIC is being configured to buffer\n+\t * receive packets in the hardware until the host posts new\n+\t * receive buffers. If set to '0', then bd_stall is being\n+\t * configured to be disabled on this VNIC.\n \t */\n-\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS\tUINT32_C(0x10)\n+\t#define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE\tUINT32_C(0x4)\n \t/*\n-\t * If this flag is set, the corresponding RX filters shall be set up to\n-\t * cover multicast/broadcast filters for the outermost Layer 2\n-\t * destination MAC address field.\n+\t * When this bit is '1', the VNIC is being configured to receive\n+\t * both RoCE and non-RoCE traffic. If set to '0', then this VNIC\n+\t * is not configured to be operating in dual VNIC mode.\n \t */\n-\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST\tUINT32_C(0x20)\n-\tuint32_t mask;\n-\n-\t/* This is the address for mcast address tbl. */\n-\tuint64_t mc_tbl_addr;\n-\n+\t#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE\tUINT32_C(0x8)\n \t/*\n-\t * This value indicates how many entries in mc_tbl are valid. Each entry\n-\t * is 6 bytes.\n+\t * When this flag is set to '1', the VNIC is requested to be\n+\t * configured to receive only RoCE traffic. If this flag is set\n+\t * to '0', then this flag shall be ignored by the HWRM. If\n+\t * roce_dual_vnic_mode flag is set to '1', then the HWRM client\n+\t * shall not set this flag to '1'.\n+\t */\n+\t#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE\tUINT32_C(0x10)\n+\t/*\n+\t * When a VNIC uses one destination ring group for certain\n+\t * application (e.g. Receive Flow Steering) where exact match is\n+\t * used to direct packets to a VNIC with one destination ring\n+\t * group only, there is no need to configure RSS indirection\n+\t * table for that VNIC as only one destination ring group is\n+\t * used. This flag is used to enable a mode where RSS is enabled\n+\t * in the VNIC using a RSS context for computing RSS hash but\n+\t * the RSS indirection table is not configured using\n+\t * hwrm_vnic_rss_cfg. If this mode is enabled, then the driver\n+\t * should not program RSS indirection table for the RSS context\n+\t * that is used for computing RSS hash only.\n+\t */\n+\t#define HWRM_VNIC_CFG_INPUT_FLAGS_RSS_DFLT_CR_MODE\tUINT32_C(0x20)\n+\tuint32_t enables;\n+\t/*\n+\t * This bit must be '1' for the dflt_ring_grp field to be\n+\t * configured.\n+\t */\n+\t#define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP\tUINT32_C(0x1)\n+\t/* This bit must be '1' for the rss_rule field to be configured. */\n+\t#define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE\tUINT32_C(0x2)\n+\t/* This bit must be '1' for the cos_rule field to be configured. */\n+\t#define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE\tUINT32_C(0x4)\n+\t/* This bit must be '1' for the lb_rule field to be configured. */\n+\t#define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE\tUINT32_C(0x8)\n+\t/* This bit must be '1' for the mru field to be configured. */\n+\t#define HWRM_VNIC_CFG_INPUT_ENABLES_MRU\tUINT32_C(0x10)\n+\tuint16_t vnic_id;\n+\t/* Logical vnic ID */\n+\tuint16_t dflt_ring_grp;\n+\t/*\n+\t * Default Completion ring for the VNIC. This ring will be\n+\t * chosen if packet does not match any RSS rules and if there is\n+\t * no COS rule.\n+\t */\n+\tuint16_t rss_rule;\n+\t/*\n+\t * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if\n+\t * there is no RSS rule.\n+\t */\n+\tuint16_t cos_rule;\n+\t/*\n+\t * RSS ID for COS rule/table structure. 0xFF... (All Fs) if\n+\t * there is no COS rule.\n+\t */\n+\tuint16_t lb_rule;\n+\t/*\n+\t * RSS ID for load balancing rule/table structure. 0xFF... (All\n+\t * Fs) if there is no LB rule.\n+\t */\n+\tuint16_t mru;\n+\t/*\n+\t * The maximum receive unit of the vnic. Each vnic is associated\n+\t * with a function. The vnic mru value overwrites the mru\n+\t * setting of the associated function. The HWRM shall make sure\n+\t * that vnic mru does not exceed the mru of the port the\n+\t * function is associated with.\n \t */\n-\tuint32_t num_mc_entries;\n-\n \tuint32_t unused_0;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_cfa_l2_set_rx_mask_output {\n+struct hwrm_vnic_cfg_output {\n+\tuint16_t error_code;\n \t/*\n-\t * Pass/Fail or error type Note: receiver to verify the in parameters,\n-\t * and fail the call with an error when appropriate\n+\t * Pass/Fail or error type Note: receiver to verify the in\n+\t * parameters, and fail the call with an error when appropriate\n+\t */\n+\tuint16_t req_type;\n+\t/* This field returns the type of original request. */\n+\tuint16_t seq_id;\n+\t/* This field provides original sequence number of the command. */\n+\tuint16_t resp_len;\n+\t/*\n+\t * This field is the length of the response in bytes. The last\n+\t * byte of the response is a valid flag that will read as '1'\n+\t * when the command has been completely written to memory.\n+\t */\n+\tuint32_t unused_0;\n+\tuint8_t unused_1;\n+\tuint8_t unused_2;\n+\tuint8_t unused_3;\n+\tuint8_t valid;\n+\t/*\n+\t * This field is used in Output records to indicate that the\n+\t * output is completely written to RAM. This field should be\n+\t * read as '1' to indicate that the output has been completely\n+\t * written. When writing a command completion or response to an\n+\t * internal processor, the order of writes has to be such that\n+\t * this field is written last.\n+\t */\n+} __attribute__((packed));\n+\n+/* hwrm_vnic_rss_cfg */\n+/* Description: This function is used to enable RSS configuration. */\n+/* Input (48 bytes) */\n+struct hwrm_vnic_rss_cfg_input {\n+\tuint16_t req_type;\n+\t/*\n+\t * This value indicates what type of request this is. The format\n+\t * for the rest of the command is determined by this field.\n+\t */\n+\tuint16_t cmpl_ring;\n+\t/*\n+\t * This value indicates the what completion ring the request\n+\t * will be optionally completed on. If the value is -1, then no\n+\t * CR completion will be generated. Any other value must be a\n+\t * valid CR ring_id value for this function.\n \t */\n-\tuint16_t error_code;\n-\n-\t/* This field returns the type of original request. */\n-\tuint16_t req_type;\n-\n-\t/* This field provides original sequence number of the command. */\n \tuint16_t seq_id;\n-\n+\t/* This value indicates the command sequence number. */\n+\tuint16_t target_id;\n \t/*\n-\t * This field is the length of the response in bytes. The last byte of\n-\t * the response is a valid flag that will read as '1' when the command\n-\t * has been completely written to memory.\n+\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function\n+\t * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF\n+\t * - HWRM\n \t */\n-\tuint16_t resp_len;\n-\n-\tuint32_t unused_0;\n-\tuint8_t unused_1;\n-\tuint8_t unused_2;\n-\tuint8_t unused_3;\n-\n+\tuint64_t resp_addr;\n \t/*\n-\t * This field is used in Output records to indicate that the output is\n-\t * completely written to RAM. This field should be read as '1' to\n-\t * indicate that the output has been completely written. When writing a\n-\t * command completion or response to an internal processor, the order of\n-\t * writes has to be such that this field is written last.\n+\t * This is the host address where the response will be written\n+\t * when the request is complete. This area must be 16B aligned\n+\t * and must be cleared to zero before the request is made.\n \t */\n-\tuint8_t valid;\n-} __attribute__((packed));\n-\n-/* hwrm_exec_fwd_resp */\n-/*\n- * Description: This command is used to send an encapsulated request to the\n- * HWRM. This command instructs the HWRM to execute the request and forward the\n- * response of the encapsulated request to the location specified in the\n- * original request that is encapsulated. The target id of this command shall be\n- * set to 0xFFFF (HWRM). The response location in this command shall be used to\n- * acknowledge the receipt of the encapsulated request and forwarding of the\n- * response.\n- */\n-\n-/* Input (128 bytes) */\n-struct hwrm_exec_fwd_resp_input {\n+\tuint32_t hash_type;\n \t/*\n-\t * This value indicates what type of request this is. The format for the\n-\t * rest of the command is determined by this field.\n+\t * When this bit is '1', the RSS hash shall be computed over\n+\t * source and destination IPv4 addresses of IPv4 packets.\n \t */\n-\tuint16_t req_type;\n-\n+\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4\tUINT32_C(0x1)\n \t/*\n-\t * This value indicates the what completion ring the request will be\n-\t * optionally completed on. If the value is -1, then no CR completion\n-\t * will be generated. Any other value must be a valid CR ring_id value\n-\t * for this function.\n+\t * When this bit is '1', the RSS hash shall be computed over\n+\t * source/destination IPv4 addresses and source/destination\n+\t * ports of TCP/IPv4 packets.\n \t */\n-\tuint16_t cmpl_ring;\n-\n-\t/* This value indicates the command sequence number. */\n-\tuint16_t seq_id;\n-\n+\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4\tUINT32_C(0x2)\n \t/*\n-\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids\n-\t * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * When this bit is '1', the RSS hash shall be computed over\n+\t * source/destination IPv4 addresses and source/destination\n+\t * ports of UDP/IPv4 packets.\n \t */\n-\tuint16_t target_id;\n-\n+\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4\tUINT32_C(0x4)\n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * When this bit is '1', the RSS hash shall be computed over\n+\t * source and destination IPv4 addresses of IPv6 packets.\n \t */\n-\tuint64_t resp_addr;\n-\n+\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6\tUINT32_C(0x8)\n \t/*\n-\t * This is an encapsulated request. This request should be executed by\n-\t * the HWRM and the response should be provided in the response buffer\n-\t * inside the encapsulated request.\n+\t * When this bit is '1', the RSS hash shall be computed over\n+\t * source/destination IPv6 addresses and source/destination\n+\t * ports of TCP/IPv6 packets.\n \t */\n-\tuint32_t encap_request[26];\n-\n+\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6\tUINT32_C(0x10)\n \t/*\n-\t * This value indicates the target id of the response to the\n-\t * encapsulated request. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 -\n-\t * 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * When this bit is '1', the RSS hash shall be computed over\n+\t * source/destination IPv6 addresses and source/destination\n+\t * ports of UDP/IPv6 packets.\n \t */\n-\tuint16_t encap_resp_target_id;\n-\n-\tuint16_t unused_0[3];\n+\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6\tUINT32_C(0x20)\n+\tuint32_t unused_0;\n+\tuint64_t ring_grp_tbl_addr;\n+\t/* This is the address for rss ring group table */\n+\tuint64_t hash_key_tbl_addr;\n+\t/* This is the address for rss hash key table */\n+\tuint16_t rss_ctx_idx;\n+\t/* Index to the rss indirection table. */\n+\tuint16_t unused_1[3];\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_exec_fwd_resp_output {\n+struct hwrm_vnic_rss_cfg_output {\n+\tuint16_t error_code;\n \t/*\n-\t * Pass/Fail or error type Note: receiver to verify the in parameters,\n-\t * and fail the call with an error when appropriate\n+\t * Pass/Fail or error type Note: receiver to verify the in\n+\t * parameters, and fail the call with an error when appropriate\n \t */\n-\tuint16_t error_code;\n-\n-\t/* This field returns the type of original request. */\n \tuint16_t req_type;\n-\n-\t/* This field provides original sequence number of the command. */\n+\t/* This field returns the type of original request. */\n \tuint16_t seq_id;\n-\n+\t/* This field provides original sequence number of the command. */\n+\tuint16_t resp_len;\n \t/*\n-\t * This field is the length of the response in bytes. The last byte of\n-\t * the response is a valid flag that will read as '1' when the command\n-\t * has been completely written to memory.\n+\t * This field is the length of the response in bytes. The last\n+\t * byte of the response is a valid flag that will read as '1'\n+\t * when the command has been completely written to memory.\n \t */\n-\tuint16_t resp_len;\n-\n \tuint32_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n \tuint8_t unused_3;\n-\n+\tuint8_t valid;\n \t/*\n-\t * This field is used in Output records to indicate that the output is\n-\t * completely written to RAM. This field should be read as '1' to\n-\t * indicate that the output has been completely written. When writing a\n-\t * command completion or response to an internal processor, the order of\n-\t * writes has to be such that this field is written last.\n+\t * This field is used in Output records to indicate that the\n+\t * output is completely written to RAM. This field should be\n+\t * read as '1' to indicate that the output has been completely\n+\t * written. When writing a command completion or response to an\n+\t * internal processor, the order of writes has to be such that\n+\t * this field is written last.\n \t */\n-\tuint8_t valid;\n } __attribute__((packed));\n \n-\n-/* hwrm_ring_alloc */\n-/*\n- * Description: This command allocates and does basic preparation for a ring.\n- */\n-\n-/* Input (80 bytes) */\n-struct hwrm_ring_alloc_input {\n-\t/*\n-\t * This value indicates what type of request this is. The format for the\n-\t * rest of the command is determined by this field.\n-\t */\n+/* hwrm_vnic_rss_cos_lb_ctx_alloc */\n+/* Description: This function is used to allocate COS/Load Balance context. */\n+/* Input (16 bytes) */\n+struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {\n \tuint16_t req_type;\n-\n \t/*\n-\t * This value indicates the what completion ring the request will be\n-\t * optionally completed on. If the value is -1, then no CR completion\n-\t * will be generated. Any other value must be a valid CR ring_id value\n-\t * for this function.\n+\t * This value indicates what type of request this is. The format\n+\t * for the rest of the command is determined by this field.\n \t */\n \tuint16_t cmpl_ring;\n-\n-\t/* This value indicates the command sequence number. */\n-\tuint16_t seq_id;\n-\n \t/*\n-\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids\n-\t * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * This value indicates the what completion ring the request\n+\t * will be optionally completed on. If the value is -1, then no\n+\t * CR completion will be generated. Any other value must be a\n+\t * valid CR ring_id value for this function.\n \t */\n+\tuint16_t seq_id;\n+\t/* This value indicates the command sequence number. */\n \tuint16_t target_id;\n-\n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function\n+\t * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF\n+\t * - HWRM\n \t */\n \tuint64_t resp_addr;\n-\n-\t/* This bit must be '1' for the Reserved1 field to be configured. */\n-\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED1\t\tUINT32_C(0x1)\n-\t/* This bit must be '1' for the Reserved2 field to be configured. */\n-\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED2\t\tUINT32_C(0x2)\n-\t/* This bit must be '1' for the Reserved3 field to be configured. */\n-\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED3\t\tUINT32_C(0x4)\n-\t/*\n-\t * This bit must be '1' for the stat_ctx_id_valid field to be\n-\t * configured.\n-\t */\n-\t#define HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID\tUINT32_C(0x8)\n-\t/* This bit must be '1' for the Reserved4 field to be configured. */\n-\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED4\t\tUINT32_C(0x10)\n-\t/* This bit must be '1' for the max_bw_valid field to be configured. */\n-\t#define HWRM_RING_ALLOC_INPUT_ENABLES_MAX_BW_VALID\tUINT32_C(0x20)\n-\tuint32_t enables;\n-\n-\t/* Ring Type. */\n-\t\t/* Completion Ring (CR) */\n-\t#define HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL\t(UINT32_C(0x0) << 0)\n-\t\t/* TX Ring (TR) */\n-\t#define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX\t(UINT32_C(0x1) << 0)\n-\t\t/* RX Ring (RR) */\n-\t#define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX\t(UINT32_C(0x2) << 0)\n-\tuint8_t ring_type;\n-\n-\tuint8_t unused_0;\n-\tuint16_t unused_1;\n-\n-\t/* This value is a pointer to the page table for the Ring. */\n-\tuint64_t page_tbl_addr;\n-\n-\t/* First Byte Offset of the first entry in the first page. */\n-\tuint32_t fbo;\n-\n-\t/*\n-\t * Actual page size in 2^page_size. The supported range is increments in\n-\t * powers of 2 from 16 bytes to 1GB. - 4 = 16 B Page size is 16 B. - 12\n-\t * = 4 KB Page size is 4 KB. - 13 = 8 KB Page size is 8 KB. - 16 = 64 KB\n-\t * Page size is 64 KB. - 22 = 2 MB Page size is 2 MB. - 23 = 4 MB Page\n-\t * size is 4 MB. - 31 = 1 GB Page size is 1 GB.\n-\t */\n-\tuint8_t page_size;\n-\n \t/*\n-\t * This value indicates the depth of page table. For this version of the\n-\t * specification, value other than 0 or 1 shall be considered as an\n-\t * invalid value. When the page_tbl_depth = 0, then it is treated as a\n-\t * special case with the following. 1. FBO and page size fields are not\n-\t * valid. 2. page_tbl_addr is the physical address of the first element\n-\t * of the ring.\n+\t * This is the host address where the response will be written\n+\t * when the request is complete. This area must be 16B aligned\n+\t * and must be cleared to zero before the request is made.\n \t */\n-\tuint8_t page_tbl_depth;\n-\n-\tuint8_t unused_2;\n-\tuint8_t unused_3;\n+} __attribute__((packed));\n \n+/* Output (16 bytes) */\n+struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {\n+\tuint16_t error_code;\n \t/*\n-\t * Number of 16B units in the ring. Minimum size for a ring is 16 16B\n-\t * entries.\n+\t * Pass/Fail or error type Note: receiver to verify the in\n+\t * parameters, and fail the call with an error when appropriate\n \t */\n-\tuint32_t length;\n-\n-\t/*\n-\t * Logical ring number for the ring to be allocated. This value\n-\t * determines the position in the doorbell area where the update to the\n-\t * ring will be made. For completion rings, this value is also the MSI-X\n-\t * vector number for the function the completion ring is associated\n-\t * with.\n+\tuint16_t req_type;\n+\t/* This field returns the type of original request. */\n+\tuint16_t seq_id;\n+\t/* This field provides original sequence number of the command. */\n+\tuint16_t resp_len;\n+\t/*\n+\t * This field is the length of the response in bytes. The last\n+\t * byte of the response is a valid flag that will read as '1'\n+\t * when the command has been completely written to memory.\n \t */\n-\tuint16_t logical_id;\n-\n+\tuint16_t rss_cos_lb_ctx_id;\n+\t/* rss_cos_lb_ctx_id is 16 b */\n+\tuint8_t unused_0;\n+\tuint8_t unused_1;\n+\tuint8_t unused_2;\n+\tuint8_t unused_3;\n+\tuint8_t unused_4;\n+\tuint8_t valid;\n \t/*\n-\t * This field is used only when ring_type is a TX ring. This value\n-\t * indicates what completion ring the TX ring is associated with.\n+\t * This field is used in Output records to indicate that the\n+\t * output is completely written to RAM. This field should be\n+\t * read as '1' to indicate that the output has been completely\n+\t * written. When writing a command completion or response to an\n+\t * internal processor, the order of writes has to be such that\n+\t * this field is written last.\n \t */\n-\tuint16_t cmpl_ring_id;\n+} __attribute__((packed));\n \n+/* hwrm_vnic_rss_cos_lb_ctx_free */\n+/* Description: This function can be used to free COS/Load Balance context. */\n+/* Input (24 bytes) */\n+struct hwrm_vnic_rss_cos_lb_ctx_free_input {\n+\tuint16_t req_type;\n \t/*\n-\t * This field is used only when ring_type is a TX ring. This value\n-\t * indicates what CoS queue the TX ring is associated with.\n+\t * This value indicates what type of request this is. The format\n+\t * for the rest of the command is determined by this field.\n \t */\n-\tuint16_t queue_id;\n-\n-\tuint8_t unused_4;\n-\tuint8_t unused_5;\n-\n-\t/* This field is reserved for the future use. It shall be set to 0. */\n-\tuint32_t reserved1;\n-\t/* This field is reserved for the future use. It shall be set to 0. */\n-\tuint16_t reserved2;\n-\n-\tuint8_t unused_6;\n-\tuint8_t unused_7;\n-\t/* This field is reserved for the future use. It shall be set to 0. */\n-\tuint32_t reserved3;\n-\n+\tuint16_t cmpl_ring;\n \t/*\n-\t * This field is used only when ring_type is a TX ring. This input\n-\t * indicates what statistics context this ring should be associated\n-\t * with.\n+\t * This value indicates the what completion ring the request\n+\t * will be optionally completed on. If the value is -1, then no\n+\t * CR completion will be generated. Any other value must be a\n+\t * valid CR ring_id value for this function.\n \t */\n-\tuint32_t stat_ctx_id;\n-\n-\t/* This field is reserved for the future use. It shall be set to 0. */\n-\tuint32_t reserved4;\n-\n+\tuint16_t seq_id;\n+\t/* This value indicates the command sequence number. */\n+\tuint16_t target_id;\n \t/*\n-\t * This field is used only when ring_type is a TX ring. Maximum BW\n-\t * allocated to this TX ring in Mbps. The HWRM will translate this value\n-\t * into byte counter and time interval used for this ring inside the\n-\t * device.\n+\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function\n+\t * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF\n+\t * - HWRM\n \t */\n-\tuint32_t max_bw;\n-\n+\tuint64_t resp_addr;\n \t/*\n-\t * This field is used only when ring_type is a Completion ring. This\n-\t * value indicates what interrupt mode should be used on this completion\n-\t * ring. Note: In the legacy interrupt mode, no more than 16 completion\n-\t * rings are allowed.\n+\t * This is the host address where the response will be written\n+\t * when the request is complete. This area must be 16B aligned\n+\t * and must be cleared to zero before the request is made.\n \t */\n-\t\t/* Legacy INTA */\n-\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY\t(UINT32_C(0x0) << 0)\n-\t\t/* Reserved */\n-\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD\t(UINT32_C(0x1) << 0)\n-\t\t/* MSI-X */\n-\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX\t(UINT32_C(0x2) << 0)\n-\t\t/* No Interrupt - Polled mode */\n-\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL\t(UINT32_C(0x3) << 0)\n-\tuint8_t int_mode;\n-\n-\tuint8_t unused_8[3];\n+\tuint16_t rss_cos_lb_ctx_id;\n+\t/* rss_cos_lb_ctx_id is 16 b */\n+\tuint16_t unused_0[3];\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-\n-struct hwrm_ring_alloc_output {\n+struct hwrm_vnic_rss_cos_lb_ctx_free_output {\n+\tuint16_t error_code;\n \t/*\n-\t * Pass/Fail or error type Note: receiver to verify the in parameters,\n-\t * and fail the call with an error when appropriate\n+\t * Pass/Fail or error type Note: receiver to verify the in\n+\t * parameters, and fail the call with an error when appropriate\n \t */\n-\tuint16_t error_code;\n-\n-\t/* This field returns the type of original request. */\n \tuint16_t req_type;\n-\n-\t/* This field provides original sequence number of the command. */\n+\t/* This field returns the type of original request. */\n \tuint16_t seq_id;\n-\n+\t/* This field provides original sequence number of the command. */\n+\tuint16_t resp_len;\n \t/*\n-\t * This field is the length of the response in bytes. The last byte of\n-\t * the response is a valid flag that will read as '1' when the command\n-\t * has been completely written to memory.\n+\t * This field is the length of the response in bytes. The last\n+\t * byte of the response is a valid flag that will read as '1'\n+\t * when the command has been completely written to memory.\n \t */\n-\tuint16_t resp_len;\n-\n-\t/* Physical number of ring allocated. */\n-\tuint16_t ring_id;\n-\n-\t/* Logical number of ring allocated. */\n-\tuint16_t logical_ring_id;\n-\n-\tuint8_t unused_0;\n+\tuint32_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n-\n+\tuint8_t unused_3;\n+\tuint8_t valid;\n \t/*\n-\t * This field is used in Output records to indicate that the output is\n-\t * completely written to RAM. This field should be read as '1' to\n-\t * indicate that the output has been completely written. When writing a\n-\t * command completion or response to an internal processor, the order of\n-\t * writes has to be such that this field is written last.\n+\t * This field is used in Output records to indicate that the\n+\t * output is completely written to RAM. This field should be\n+\t * read as '1' to indicate that the output has been completely\n+\t * written. When writing a command completion or response to an\n+\t * internal processor, the order of writes has to be such that\n+\t * this field is written last.\n \t */\n-\tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_ring_free */\n+/* hwrm_cfa_l2_filter_alloc */\n /*\n- * Description: This command is used to free a ring and associated resources.\n+ * A filter is used to identify traffic that contains a matching set of\n+ * parameters like unicast or broadcast MAC address or a VLAN tag amongst\n+ * other things which then allows the ASIC to direct the  incoming traffic\n+ * to an appropriate VNIC or Rx ring.\n  */\n-/* Input (24 bytes) */\n \n-struct hwrm_ring_free_input {\n+/* Input (96 bytes) */\n+struct hwrm_cfa_l2_filter_alloc_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -4983,124 +4641,301 @@ struct hwrm_ring_free_input {\n \tuint16_t target_id;\n \n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * This is the host address where the response will be written when the\n+\t * request is complete. This area must be 16B aligned and must be\n+\t * cleared to zero before the request is made.\n+\t */\n+\tuint64_t resp_addr;\n+\n+\t/*\n+\t * Enumeration denoting the RX, TX type of the resource. This\n+\t * enumeration is used for resources that are similar for both TX and RX\n+\t * paths of the chip.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH \\\n+\t\t\t\t\t\t\tUINT32_C(0x1)\n+\t\t/* tx path */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX \\\n+\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n+\t\t/* rx path */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX \\\n+\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST \\\n+\t\t\t\tHWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX\n+\t/*\n+\t * Setting of this flag indicates the applicability to the loopback\n+\t * path.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \\\n+\t\t\t\t\t\t\tUINT32_C(0x2)\n+\t/*\n+\t * Setting of this flag indicates drop action. If this flag is not set,\n+\t * then it should be considered accept action.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP \\\n+\t\t\t\t\t\t\tUINT32_C(0x4)\n+\t/*\n+\t * If this flag is set, all t_l2_* fields are invalid and they should\n+\t * not be specified. If this flag is set, then l2_* fields refer to\n+\t * fields of outermost L2 header.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST \\\n+\t\t\t\t\t\t\tUINT32_C(0x8)\n+\tuint32_t flags;\n+\n+\t/* This bit must be '1' for the l2_addr field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR \\\n+\t\t\t\t\t\t\tUINT32_C(0x1)\n+\t/* This bit must be '1' for the l2_addr_mask field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK \\\n+\t\t\t\t\t\t\tUINT32_C(0x2)\n+\t/* This bit must be '1' for the l2_ovlan field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN \\\n+\t\t\t\t\t\t\tUINT32_C(0x4)\n+\t/* This bit must be '1' for the l2_ovlan_mask field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK \\\n+\t\t\t\t\t\t\tUINT32_C(0x8)\n+\t/* This bit must be '1' for the l2_ivlan field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN \\\n+\t\t\t\t\t\t\tUINT32_C(0x10)\n+\t/* This bit must be '1' for the l2_ivlan_mask field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK \\\n+\t\t\t\t\t\t\tUINT32_C(0x20)\n+\t/* This bit must be '1' for the t_l2_addr field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR \\\n+\t\t\t\t\t\t\tUINT32_C(0x40)\n+\t/*\n+\t * This bit must be '1' for the t_l2_addr_mask field to be configured.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK \\\n+\t\t\t\t\t\t\tUINT32_C(0x80)\n+\t/* This bit must be '1' for the t_l2_ovlan field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN \\\n+\t\t\t\t\t\t\tUINT32_C(0x100)\n+\t/*\n+\t * This bit must be '1' for the t_l2_ovlan_mask field to be configured.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK \\\n+\t\t\t\t\t\t\tUINT32_C(0x200)\n+\t/* This bit must be '1' for the t_l2_ivlan field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN \\\n+\t\t\t\t\t\t\tUINT32_C(0x400)\n+\t/*\n+\t * This bit must be '1' for the t_l2_ivlan_mask field to be configured.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK \\\n+\t\t\t\t\t\t\tUINT32_C(0x800)\n+\t/* This bit must be '1' for the src_type field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE \\\n+\t\t\t\t\t\t\tUINT32_C(0x1000)\n+\t/* This bit must be '1' for the src_id field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID \\\n+\t\t\t\t\t\t\tUINT32_C(0x2000)\n+\t/* This bit must be '1' for the tunnel_type field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \\\n+\t\t\t\t\t\t\tUINT32_C(0x4000)\n+\t/* This bit must be '1' for the dst_id field to be configured. */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID \\\n+\t\t\t\t\t\t\tUINT32_C(0x8000)\n+\t/*\n+\t * This bit must be '1' for the mirror_vnic_id field to be configured.\n+\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \\\n+\t\t\t\t\t\t\tUINT32_C(0x10000)\n+\tuint32_t enables;\n+\n+\t/*\n+\t * This value sets the match value for the L2 MAC address. Destination\n+\t * MAC address for RX path. Source MAC address for TX path.\n \t */\n-\tuint64_t resp_addr;\n-\n-\t/* Ring Type. */\n-\t\t/* Completion Ring (CR) */\n-\t#define HWRM_RING_FREE_INPUT_RING_TYPE_CMPL\t(UINT32_C(0x0) << 0)\n-\t\t/* TX Ring (TR) */\n-\t#define HWRM_RING_FREE_INPUT_RING_TYPE_TX\t(UINT32_C(0x1) << 0)\n-\t\t/* RX Ring (RR) */\n-\t#define HWRM_RING_FREE_INPUT_RING_TYPE_RX\t(UINT32_C(0x2) << 0)\n-\tuint8_t ring_type;\n+\tuint8_t l2_addr[6];\n \n \tuint8_t unused_0;\n+\tuint8_t unused_1;\n \n-\t/* Physical number of ring allocated. */\n-\tuint16_t ring_id;\n+\t/*\n+\t * This value sets the mask value for the L2 address. A value of 0 will\n+\t * mask the corresponding bit from compare.\n+\t */\n+\tuint8_t l2_addr_mask[6];\n \n-\tuint32_t unused_1;\n-} __attribute__((packed));\n+\t/* This value sets VLAN ID value for outer VLAN. */\n+\tuint16_t l2_ovlan;\n \n-/* Output (16 bytes) */\n-struct hwrm_ring_free_output {\n \t/*\n-\t * Pass/Fail or error type Note: receiver to verify the in parameters,\n-\t * and fail the call with an error when appropriate\n+\t * This value sets the mask value for the ovlan id. A value of 0 will\n+\t * mask the corresponding bit from compare.\n \t */\n-\tuint16_t error_code;\n-\n-\t/* This field returns the type of original request. */\n-\tuint16_t req_type;\n+\tuint16_t l2_ovlan_mask;\n \n-\t/* This field provides original sequence number of the command. */\n-\tuint16_t seq_id;\n+\t/* This value sets VLAN ID value for inner VLAN. */\n+\tuint16_t l2_ivlan;\n \n \t/*\n-\t * This field is the length of the response in bytes. The last byte of\n-\t * the response is a valid flag that will read as '1' when the command\n-\t * has been completely written to memory.\n+\t * This value sets the mask value for the ivlan id. A value of 0 will\n+\t * mask the corresponding bit from compare.\n \t */\n-\tuint16_t resp_len;\n+\tuint16_t l2_ivlan_mask;\n \n-\tuint32_t unused_0;\n-\tuint8_t unused_1;\n \tuint8_t unused_2;\n \tuint8_t unused_3;\n \n \t/*\n-\t * This field is used in Output records to indicate that the output is\n-\t * completely written to RAM. This field should be read as '1' to\n-\t * indicate that the output has been completely written. When writing a\n-\t * command completion or response to an internal processor, the order of\n-\t * writes has to be such that this field is written last.\n+\t * This value sets the match value for the tunnel L2 MAC address.\n+\t * Destination MAC address for RX path. Source MAC address for TX path.\n \t */\n-\tuint8_t valid;\n-} __attribute__((packed));\n+\tuint8_t t_l2_addr[6];\n \n-/* hwrm_ring_grp_alloc */\n-/*\n- * Description: This API allocates and does basic preparation for a ring group.\n- */\n+\tuint8_t unused_4;\n+\tuint8_t unused_5;\n \n-/* Input (24 bytes) */\n-struct hwrm_ring_grp_alloc_input {\n \t/*\n-\t * This value indicates what type of request this is. The format for the\n-\t * rest of the command is determined by this field.\n+\t * This value sets the mask value for the tunnel L2 address. A value of\n+\t * 0 will mask the corresponding bit from compare.\n \t */\n-\tuint16_t req_type;\n+\tuint8_t t_l2_addr_mask[6];\n+\n+\t/* This value sets VLAN ID value for tunnel outer VLAN. */\n+\tuint16_t t_l2_ovlan;\n \n \t/*\n-\t * This value indicates the what completion ring the request will be\n-\t * optionally completed on. If the value is -1, then no CR completion\n-\t * will be generated. Any other value must be a valid CR ring_id value\n-\t * for this function.\n+\t * This value sets the mask value for the tunnel ovlan id. A value of 0\n+\t * will mask the corresponding bit from compare.\n \t */\n-\tuint16_t cmpl_ring;\n+\tuint16_t t_l2_ovlan_mask;\n \n-\t/* This value indicates the command sequence number. */\n-\tuint16_t seq_id;\n+\t/* This value sets VLAN ID value for tunnel inner VLAN. */\n+\tuint16_t t_l2_ivlan;\n \n \t/*\n-\t * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids\n-\t * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t * This value sets the mask value for the tunnel ivlan id. A value of 0\n+\t * will mask the corresponding bit from compare.\n \t */\n-\tuint16_t target_id;\n+\tuint16_t t_l2_ivlan_mask;\n+\n+\t/* This value identifies the type of source of the packet. */\n+\t\t/* Network port */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT \\\n+\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n+\t\t/* Physical function */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF \\\n+\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n+\t\t/* Virtual function */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF \\\n+\t\t\t\t\t\t\t(UINT32_C(0x2) << 0)\n+\t\t/* Virtual NIC of a function */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC \\\n+\t\t\t\t\t\t\t(UINT32_C(0x3) << 0)\n+\t\t/* Embedded processor for CFA management */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG \\\n+\t\t\t\t\t\t\t(UINT32_C(0x4) << 0)\n+\t\t/* Embedded processor for OOB management */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE \\\n+\t\t\t\t\t\t\t(UINT32_C(0x5) << 0)\n+\t\t/* Embedded processor for RoCE */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO \\\n+\t\t\t\t\t\t\t(UINT32_C(0x6) << 0)\n+\t\t/* Embedded processor for network proxy functions */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG \\\n+\t\t\t\t\t\t\t(UINT32_C(0x7) << 0)\n+\tuint8_t src_type;\n \n+\tuint8_t unused_6;\n \t/*\n-\t * This is the host address where the response will be written when the\n-\t * request is complete. This area must be 16B aligned and must be\n-\t * cleared to zero before the request is made.\n+\t * This value is the id of the source. For a network port, it represents\n+\t * port_id. For a physical function, it represents fid. For a virtual\n+\t * function, it represents vf_id. For a vnic, it represents vnic_id. For\n+\t * embedded processors, this id is not valid. Notes: 1. The function ID\n+\t * is implied if it src_id is not provided for a src_type that is either\n \t */\n-\tuint64_t resp_addr;\n+\tuint32_t src_id;\n \n-\t/* This value identifies the CR associated with the ring group. */\n-\tuint16_t cr;\n+\t/* Tunnel Type. */\n+\t\t/* Non-tunnel */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \\\n+\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n+\t\t/* Virtual eXtensible Local Area Network (VXLAN) */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \\\n+\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n+\t\t/*\n+\t\t * Network Virtualization Generic Routing Encapsulation (NVGRE)\n+\t\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \\\n+\t\t\t\t\t\t\t(UINT32_C(0x2) << 0)\n+\t\t/*\n+\t\t * Generic Routing Encapsulation (GRE) inside Ethernet payload\n+\t\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \\\n+\t\t\t\t\t\t\t(UINT32_C(0x3) << 0)\n+\t\t/* IP in IP */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \\\n+\t\t\t\t\t\t\t(UINT32_C(0x4) << 0)\n+\t\t/* Generic Network Virtualization Encapsulation (Geneve) */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \\\n+\t\t\t\t\t\t\t(UINT32_C(0x5) << 0)\n+\t\t/* Multi-Protocol Lable Switching (MPLS) */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \\\n+\t\t\t\t\t\t\t(UINT32_C(0x6) << 0)\n+\t\t/* Stateless Transport Tunnel (STT) */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \\\n+\t\t\t\t\t\t\t(UINT32_C(0x7) << 0)\n+\t\t/*\n+\t\t * Generic Routing Encapsulation (GRE) inside IP datagram\n+\t\t * payload\n+\t\t */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \\\n+\t\t\t\t\t\t\t(UINT32_C(0x8) << 0)\n+\t\t/* Any tunneled traffic */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \\\n+\t\t\t\t\t\t\t(UINT32_C(0xff) << 0)\n+\tuint8_t tunnel_type;\n \n-\t/* This value identifies the main RR associated with the ring group. */\n-\tuint16_t rr;\n+\tuint8_t unused_7;\n \n \t/*\n-\t * This value identifies the aggregation RR associated with the ring\n-\t * group. If this value is 0xFF... (All Fs), then no Aggregation ring\n-\t * will be set.\n+\t * If set, this value shall represent the Logical VNIC ID of the\n+\t * destination VNIC for the RX path and network port id of the\n+\t * destination port for the TX path.\n \t */\n-\tuint16_t ar;\n+\tuint16_t dst_id;\n+\n+\t/* Logical VNIC ID of the VNIC where traffic is mirrored. */\n+\tuint16_t mirror_vnic_id;\n \n \t/*\n-\t * This value identifies the statistics context associated with the ring\n-\t * group.\n+\t * This hint is provided to help in placing the filter in the filter\n+\t * table.\n \t */\n-\tuint16_t sc;\n+\t\t/* No preference */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \\\n+\t\t\t\t\t\t\t(UINT32_C(0x0) << 0)\n+\t\t/* Above the given filter */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER \\\n+\t\t\t\t\t\t\t(UINT32_C(0x1) << 0)\n+\t\t/* Below the given filter */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER \\\n+\t\t\t\t\t\t\t(UINT32_C(0x2) << 0)\n+\t\t/* As high as possible */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX \\\n+\t\t\t\t\t\t\t(UINT32_C(0x3) << 0)\n+\t\t/* As low as possible */\n+\t#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN \\\n+\t\t\t\t\t\t\t(UINT32_C(0x4) << 0)\n+\tuint8_t pri_hint;\n+\n+\tuint8_t unused_8;\n+\tuint32_t unused_9;\n+\n+\t/*\n+\t * This is the ID of the filter that goes along with the pri_hint. This\n+\t * field is valid only for the following values. 1 - Above the given\n+\t * filter 2 - Below the given filter\n+\t */\n+\tuint64_t l2_filter_id_hint;\n } __attribute__((packed));\n \n-/* Output (16 bytes) */\n-struct hwrm_ring_grp_alloc_output {\n+/* Output (24 bytes) */\n+struct hwrm_cfa_l2_filter_alloc_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5121,11 +4956,17 @@ struct hwrm_ring_grp_alloc_output {\n \tuint16_t resp_len;\n \n \t/*\n-\t * This is the ring group ID value. Use this value to program the\n-\t * default ring group for the VNIC or as table entries in an RSS/COS\n+\t * This value identifies a set of CFA data structures used for an L2\n \t * context.\n \t */\n-\tuint32_t ring_group_id;\n+\tuint64_t l2_filter_id;\n+\n+\t/*\n+\t * This is the ID of the flow associated with this filter. This value\n+\t * shall be used to match and associate the flow identifier returned in\n+\t * completion records. A value of 0xFFFFFFFF shall indicate no flow id.\n+\t */\n+\tuint32_t flow_id;\n \n \tuint8_t unused_0;\n \tuint8_t unused_1;\n@@ -5141,18 +4982,14 @@ struct hwrm_ring_grp_alloc_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_ring_grp_free */\n+/* hwrm_cfa_l2_filter_free */\n /*\n- * Description: This API frees a ring group and associated resources. # If a\n- * ring in the ring group is reset or free, then the associated rings in the\n- * ring group shall also be reset/free using hwrm_ring_free. # A function driver\n- * shall always use hwrm_ring_grp_free after freeing all rings in a group. # As\n- * a part of executing this command, the HWRM shall reset all associated ring\n- * group resources.\n+ * Description: Free a L2 filter. The HWRM shall free all associated filter\n+ * resources with the L2 filter.\n  */\n \n /* Input (24 bytes) */\n-struct hwrm_ring_grp_free_input {\n+struct hwrm_cfa_l2_filter_free_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5183,14 +5020,15 @@ struct hwrm_ring_grp_free_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/* This is the ring group ID value. */\n-\tuint32_t ring_group_id;\n-\n-\tuint32_t unused_0;\n+\t/*\n+\t * This value identifies a set of CFA data structures used for an L2\n+\t * context.\n+\t */\n+\tuint64_t l2_filter_id;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_ring_grp_free_output {\n+struct hwrm_cfa_l2_filter_free_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5225,14 +5063,11 @@ struct hwrm_ring_grp_free_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_stat_ctx_alloc */\n-/*\n- * Description: This command allocates and does basic preparation for a stat\n- * context.\n- */\n+/* hwrm_cfa_l2_set_rx_mask */\n+/* Description: This command will set rx mask of the function. */\n \n-/* Input (32 bytes) */\n-struct hwrm_stat_ctx_alloc_input {\n+/* Input (40 bytes) */\n+struct hwrm_cfa_l2_set_rx_mask_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5263,20 +5098,72 @@ struct hwrm_stat_ctx_alloc_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/* This is the address for statistic block. */\n-\tuint64_t stats_dma_addr;\n+\t/* VNIC ID */\n+\tuint32_t vnic_id;\n \n+\t/* Reserved for future use. */\n+\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_RESERVED\tUINT32_C(0x1)\n \t/*\n-\t * The statistic block update period in ms. e.g. 250ms, 500ms, 750ms,\n-\t * 1000ms.\n+\t * When this bit is '1', the function is requested to accept multi-cast\n+\t * packets specified by the multicast addr table.\n \t */\n-\tuint32_t update_period_ms;\n+\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST\tUINT32_C(0x2)\n+\t/*\n+\t * When this bit is '1', the function is requested to accept all multi-\n+\t * cast packets.\n+\t */\n+\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST\tUINT32_C(0x4)\n+\t/*\n+\t * When this bit is '1', the function is requested to accept broadcast\n+\t * packets.\n+\t */\n+\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST\tUINT32_C(0x8)\n+\t/*\n+\t * When this bit is '1', the function is requested to be put in the\n+\t * promiscuous mode. The HWRM should accept any function to set up\n+\t * promiscuous mode. The HWRM shall follow the semantics below for the\n+\t * promiscuous mode support. # When partitioning is not enabled on a\n+\t * port (i.e. single PF on the port), then the PF shall be allowed to be\n+\t * in the promiscuous mode. When the PF is in the promiscuous mode, then\n+\t * it shall receive all host bound traffic on that port. # When\n+\t * partitioning is enabled on a port (i.e. multiple PFs per port) and a\n+\t * PF on that port is in the promiscuous mode, then the PF receives all\n+\t * traffic within that partition as identified by a unique identifier\n+\t * for the PF (e.g. S-Tag). If a unique outer VLAN for the PF is\n+\t * specified, then the setting of promiscuous mode on that PF shall\n+\t * result in the PF receiving all host bound traffic with matching outer\n+\t * VLAN. # A VF shall can be set in the promiscuous mode. In the\n+\t * promiscuous mode, the VF does not receive any traffic unless a unique\n+\t * outer VLAN for the VF is specified. If a unique outer VLAN for the VF\n+\t * is specified, then the setting of promiscuous mode on that VF shall\n+\t * result in the VF receiving all host bound traffic with the matching\n+\t * outer VLAN. # The HWRM shall allow the setting of promiscuous mode on\n+\t * a function independently from the promiscuous mode settings on other\n+\t * functions.\n+\t */\n+\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS\tUINT32_C(0x10)\n+\t/*\n+\t * If this flag is set, the corresponding RX filters shall be set up to\n+\t * cover multicast/broadcast filters for the outermost Layer 2\n+\t * destination MAC address field.\n+\t */\n+\t#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST\tUINT32_C(0x20)\n+\tuint32_t mask;\n+\n+\t/* This is the address for mcast address tbl. */\n+\tuint64_t mc_tbl_addr;\n+\n+\t/*\n+\t * This value indicates how many entries in mc_tbl are valid. Each entry\n+\t * is 6 bytes.\n+\t */\n+\tuint32_t num_mc_entries;\n \n \tuint32_t unused_0;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_stat_ctx_alloc_output {\n+struct hwrm_cfa_l2_set_rx_mask_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5296,12 +5183,10 @@ struct hwrm_stat_ctx_alloc_output {\n \t */\n \tuint16_t resp_len;\n \n-\t/* This is the statistics context ID value. */\n-\tuint32_t stat_ctx_id;\n-\n-\tuint8_t unused_0;\n+\tuint32_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n+\tuint8_t unused_3;\n \n \t/*\n \t * This field is used in Output records to indicate that the output is\n@@ -5313,11 +5198,19 @@ struct hwrm_stat_ctx_alloc_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_stat_ctx_clr_stats */\n-/* Description: This command clears statistics of a context. */\n+/* hwrm_exec_fwd_resp */\n+/*\n+ * Description: This command is used to send an encapsulated request to the\n+ * HWRM. This command instructs the HWRM to execute the request and forward the\n+ * response of the encapsulated request to the location specified in the\n+ * original request that is encapsulated. The target id of this command shall be\n+ * set to 0xFFFF (HWRM). The response location in this command shall be used to\n+ * acknowledge the receipt of the encapsulated request and forwarding of the\n+ * response.\n+ */\n \n-/* Input (24 bytes) */\n-struct hwrm_stat_ctx_clr_stats_input {\n+/* Input (128 bytes) */\n+struct hwrm_exec_fwd_resp_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5348,14 +5241,25 @@ struct hwrm_stat_ctx_clr_stats_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/* ID of the statistics context that is being queried. */\n-\tuint32_t stat_ctx_id;\n+\t/*\n+\t * This is an encapsulated request. This request should be executed by\n+\t * the HWRM and the response should be provided in the response buffer\n+\t * inside the encapsulated request.\n+\t */\n+\tuint32_t encap_request[26];\n \n-\tuint32_t unused_0;\n+\t/*\n+\t * This value indicates the target id of the response to the\n+\t * encapsulated request. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 -\n+\t * 0xFFFE - Reserved for internal processors 0xFFFF - HWRM\n+\t */\n+\tuint16_t encap_resp_target_id;\n+\n+\tuint16_t unused_0[3];\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_stat_ctx_clr_stats_output {\n+struct hwrm_exec_fwd_resp_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5390,11 +5294,14 @@ struct hwrm_stat_ctx_clr_stats_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_stat_ctx_free */\n-/* Description: This command is used to free a stat context. */\n-/* Input (24 bytes) */\n \n-struct hwrm_stat_ctx_free_input {\n+/* hwrm_ring_alloc */\n+/*\n+ * Description: This command allocates and does basic preparation for a ring.\n+ */\n+\n+/* Input (80 bytes) */\n+struct hwrm_ring_alloc_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5425,15 +5332,143 @@ struct hwrm_stat_ctx_free_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/* ID of the statistics context that is being queried. */\n+\t/* This bit must be '1' for the Reserved1 field to be configured. */\n+\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED1\t\tUINT32_C(0x1)\n+\t/* This bit must be '1' for the Reserved2 field to be configured. */\n+\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED2\t\tUINT32_C(0x2)\n+\t/* This bit must be '1' for the Reserved3 field to be configured. */\n+\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED3\t\tUINT32_C(0x4)\n+\t/*\n+\t * This bit must be '1' for the stat_ctx_id_valid field to be\n+\t * configured.\n+\t */\n+\t#define HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID\tUINT32_C(0x8)\n+\t/* This bit must be '1' for the Reserved4 field to be configured. */\n+\t#define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED4\t\tUINT32_C(0x10)\n+\t/* This bit must be '1' for the max_bw_valid field to be configured. */\n+\t#define HWRM_RING_ALLOC_INPUT_ENABLES_MAX_BW_VALID\tUINT32_C(0x20)\n+\tuint32_t enables;\n+\n+\t/* Ring Type. */\n+\t\t/* Completion Ring (CR) */\n+\t#define HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL\t(UINT32_C(0x0) << 0)\n+\t\t/* TX Ring (TR) */\n+\t#define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX\t(UINT32_C(0x1) << 0)\n+\t\t/* RX Ring (RR) */\n+\t#define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX\t(UINT32_C(0x2) << 0)\n+\tuint8_t ring_type;\n+\n+\tuint8_t unused_0;\n+\tuint16_t unused_1;\n+\n+\t/* This value is a pointer to the page table for the Ring. */\n+\tuint64_t page_tbl_addr;\n+\n+\t/* First Byte Offset of the first entry in the first page. */\n+\tuint32_t fbo;\n+\n+\t/*\n+\t * Actual page size in 2^page_size. The supported range is increments in\n+\t * powers of 2 from 16 bytes to 1GB. - 4 = 16 B Page size is 16 B. - 12\n+\t * = 4 KB Page size is 4 KB. - 13 = 8 KB Page size is 8 KB. - 16 = 64 KB\n+\t * Page size is 64 KB. - 22 = 2 MB Page size is 2 MB. - 23 = 4 MB Page\n+\t * size is 4 MB. - 31 = 1 GB Page size is 1 GB.\n+\t */\n+\tuint8_t page_size;\n+\n+\t/*\n+\t * This value indicates the depth of page table. For this version of the\n+\t * specification, value other than 0 or 1 shall be considered as an\n+\t * invalid value. When the page_tbl_depth = 0, then it is treated as a\n+\t * special case with the following. 1. FBO and page size fields are not\n+\t * valid. 2. page_tbl_addr is the physical address of the first element\n+\t * of the ring.\n+\t */\n+\tuint8_t page_tbl_depth;\n+\n+\tuint8_t unused_2;\n+\tuint8_t unused_3;\n+\n+\t/*\n+\t * Number of 16B units in the ring. Minimum size for a ring is 16 16B\n+\t * entries.\n+\t */\n+\tuint32_t length;\n+\n+\t/*\n+\t * Logical ring number for the ring to be allocated. This value\n+\t * determines the position in the doorbell area where the update to the\n+\t * ring will be made. For completion rings, this value is also the MSI-X\n+\t * vector number for the function the completion ring is associated\n+\t * with.\n+\t */\n+\tuint16_t logical_id;\n+\n+\t/*\n+\t * This field is used only when ring_type is a TX ring. This value\n+\t * indicates what completion ring the TX ring is associated with.\n+\t */\n+\tuint16_t cmpl_ring_id;\n+\n+\t/*\n+\t * This field is used only when ring_type is a TX ring. This value\n+\t * indicates what CoS queue the TX ring is associated with.\n+\t */\n+\tuint16_t queue_id;\n+\n+\tuint8_t unused_4;\n+\tuint8_t unused_5;\n+\n+\t/* This field is reserved for the future use. It shall be set to 0. */\n+\tuint32_t reserved1;\n+\t/* This field is reserved for the future use. It shall be set to 0. */\n+\tuint16_t reserved2;\n+\n+\tuint8_t unused_6;\n+\tuint8_t unused_7;\n+\t/* This field is reserved for the future use. It shall be set to 0. */\n+\tuint32_t reserved3;\n+\n+\t/*\n+\t * This field is used only when ring_type is a TX ring. This input\n+\t * indicates what statistics context this ring should be associated\n+\t * with.\n+\t */\n \tuint32_t stat_ctx_id;\n \n-\tuint32_t unused_0;\n+\t/* This field is reserved for the future use. It shall be set to 0. */\n+\tuint32_t reserved4;\n+\n+\t/*\n+\t * This field is used only when ring_type is a TX ring. Maximum BW\n+\t * allocated to this TX ring in Mbps. The HWRM will translate this value\n+\t * into byte counter and time interval used for this ring inside the\n+\t * device.\n+\t */\n+\tuint32_t max_bw;\n+\n+\t/*\n+\t * This field is used only when ring_type is a Completion ring. This\n+\t * value indicates what interrupt mode should be used on this completion\n+\t * ring. Note: In the legacy interrupt mode, no more than 16 completion\n+\t * rings are allowed.\n+\t */\n+\t\t/* Legacy INTA */\n+\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY\t(UINT32_C(0x0) << 0)\n+\t\t/* Reserved */\n+\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD\t(UINT32_C(0x1) << 0)\n+\t\t/* MSI-X */\n+\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX\t(UINT32_C(0x2) << 0)\n+\t\t/* No Interrupt - Polled mode */\n+\t#define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL\t(UINT32_C(0x3) << 0)\n+\tuint8_t int_mode;\n+\n+\tuint8_t unused_8[3];\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n \n-struct hwrm_stat_ctx_free_output {\n+struct hwrm_ring_alloc_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5453,8 +5488,11 @@ struct hwrm_stat_ctx_free_output {\n \t */\n \tuint16_t resp_len;\n \n-\t/* This is the statistics context ID value. */\n-\tuint32_t stat_ctx_id;\n+\t/* Physical number of ring allocated. */\n+\tuint16_t ring_id;\n+\n+\t/* Logical number of ring allocated. */\n+\tuint16_t logical_ring_id;\n \n \tuint8_t unused_0;\n \tuint8_t unused_1;\n@@ -5470,26 +5508,13 @@ struct hwrm_stat_ctx_free_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_vnic_alloc */\n+/* hwrm_ring_free */\n /*\n- * Description: This VNIC is a resource in the RX side of the chip that is used\n- * to represent a virtual host \"interface\". # At the time of VNIC allocation or\n- * configuration, the function can specify whether it wants the requested VNIC\n- * to be the default VNIC for the function or not. # If a function requests\n- * allocation of a VNIC for the first time and a VNIC is successfully allocated\n- * by the HWRM, then the HWRM shall make the allocated VNIC as the default VNIC\n- * for that function. # The default VNIC shall be used for the default action\n- * for a partition or function. # For each VNIC allocated on a function, a\n- * mapping on the RX side to map the allocated VNIC to source virtual interface\n- * shall be performed by the HWRM. This should be hidden to the function driver\n- * requesting the VNIC allocation. This enables broadcast/multicast replication\n- * with source knockout. # If multicast replication with source knockout is\n- * enabled, then the internal VNIC to SVIF mapping data structures shall be\n- * programmed at the time of VNIC allocation.\n+ * Description: This command is used to free a ring and associated resources.\n  */\n-\n /* Input (24 bytes) */\n-struct hwrm_vnic_alloc_input {\n+\n+struct hwrm_ring_free_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5520,18 +5545,25 @@ struct hwrm_vnic_alloc_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/*\n-\t * When this bit is '1', this VNIC is requested to be the default VNIC\n-\t * for this function.\n-\t */\n-\t#define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT                UINT32_C(0x1)\n-\tuint32_t flags;\n+\t/* Ring Type. */\n+\t\t/* Completion Ring (CR) */\n+\t#define HWRM_RING_FREE_INPUT_RING_TYPE_CMPL\t(UINT32_C(0x0) << 0)\n+\t\t/* TX Ring (TR) */\n+\t#define HWRM_RING_FREE_INPUT_RING_TYPE_TX\t(UINT32_C(0x1) << 0)\n+\t\t/* RX Ring (RR) */\n+\t#define HWRM_RING_FREE_INPUT_RING_TYPE_RX\t(UINT32_C(0x2) << 0)\n+\tuint8_t ring_type;\n \n-\tuint32_t unused_0;\n+\tuint8_t unused_0;\n+\n+\t/* Physical number of ring allocated. */\n+\tuint16_t ring_id;\n+\n+\tuint32_t unused_1;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_vnic_alloc_output {\n+struct hwrm_ring_free_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5551,12 +5583,10 @@ struct hwrm_vnic_alloc_output {\n \t */\n \tuint16_t resp_len;\n \n-\t/* Logical vnic ID */\n-\tuint32_t vnic_id;\n-\n-\tuint8_t unused_0;\n+\tuint32_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n+\tuint8_t unused_3;\n \n \t/*\n \t * This field is used in Output records to indicate that the output is\n@@ -5568,11 +5598,13 @@ struct hwrm_vnic_alloc_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_vnic_cfg */\n-/* Description: Configure the RX VNIC structure. */\n+/* hwrm_ring_grp_alloc */\n+/*\n+ * Description: This API allocates and does basic preparation for a ring group.\n+ */\n \n-/* Input (40 bytes) */\n-struct hwrm_vnic_cfg_input {\n+/* Input (24 bytes) */\n+struct hwrm_ring_grp_alloc_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5603,91 +5635,28 @@ struct hwrm_vnic_cfg_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/*\n-\t * When this bit is '1', the VNIC is requested to be the default VNIC\n-\t * for the function.\n-\t */\n-\t#define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT\t\tUINT32_C(0x1)\n-\t/*\n-\t * When this bit is '1', the VNIC is being configured to strip VLAN in\n-\t * the RX path. If set to '0', then VLAN stripping is disabled on this\n-\t * VNIC.\n-\t */\n-\t#define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE\tUINT32_C(0x2)\n-\t/*\n-\t * When this bit is '1', the VNIC is being configured to buffer receive\n-\t * packets in the hardware until the host posts new receive buffers. If\n-\t * set to '0', then bd_stall is being configured to be disabled on this\n-\t * VNIC.\n-\t */\n-\t#define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE\t\tUINT32_C(0x4)\n-\t/*\n-\t * When this bit is '1', the VNIC is being configured to receive both\n-\t * RoCE and non-RoCE traffic. If set to '0', then this VNIC is not\n-\t * configured to be operating in dual VNIC mode.\n-\t */\n-\t#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE\tUINT32_C(0x8)\n-\t/*\n-\t * When this flag is set to '1', the VNIC is requested to be configured\n-\t * to receive only RoCE traffic. If this flag is set to '0', then this\n-\t * flag shall be ignored by the HWRM. If roce_dual_vnic_mode flag is set\n-\t * to '1', then the HWRM client shall not set this flag to '1'.\n-\t */\n-\t#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE\tUINT32_C(0x10)\n-\tuint32_t flags;\n-\n-\t/* This bit must be '1' for the dflt_ring_grp field to be configured. */\n-\t#define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP\tUINT32_C(0x1)\n-\t/* This bit must be '1' for the rss_rule field to be configured. */\n-\t#define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE\t\tUINT32_C(0x2)\n-\t/* This bit must be '1' for the cos_rule field to be configured. */\n-\t#define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE\t\tUINT32_C(0x4)\n-\t/* This bit must be '1' for the lb_rule field to be configured. */\n-\t#define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE\t\tUINT32_C(0x8)\n-\t/* This bit must be '1' for the mru field to be configured. */\n-\t#define HWRM_VNIC_CFG_INPUT_ENABLES_MRU\t\t\tUINT32_C(0x10)\n-\tuint32_t enables;\n-\n-\t/* Logical vnic ID */\n-\tuint16_t vnic_id;\n-\n-\t/*\n-\t * Default Completion ring for the VNIC. This ring will be chosen if\n-\t * packet does not match any RSS rules and if there is no COS rule.\n-\t */\n-\tuint16_t dflt_ring_grp;\n-\n-\t/*\n-\t * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if there is no\n-\t * RSS rule.\n-\t */\n-\tuint16_t rss_rule;\n+\t/* This value identifies the CR associated with the ring group. */\n+\tuint16_t cr;\n \n-\t/*\n-\t * RSS ID for COS rule/table structure. 0xFF... (All Fs) if there is no\n-\t * COS rule.\n-\t */\n-\tuint16_t cos_rule;\n+\t/* This value identifies the main RR associated with the ring group. */\n+\tuint16_t rr;\n \n \t/*\n-\t * RSS ID for load balancing rule/table structure. 0xFF... (All Fs) if\n-\t * there is no LB rule.\n+\t * This value identifies the aggregation RR associated with the ring\n+\t * group. If this value is 0xFF... (All Fs), then no Aggregation ring\n+\t * will be set.\n \t */\n-\tuint16_t lb_rule;\n+\tuint16_t ar;\n \n \t/*\n-\t * The maximum receive unit of the vnic. Each vnic is associated with a\n-\t * function. The vnic mru value overwrites the mru setting of the\n-\t * associated function. The HWRM shall make sure that vnic mru does not\n-\t * exceed the mru of the port the function is associated with.\n+\t * This value identifies the statistics context associated with the ring\n+\t * group.\n \t */\n-\tuint16_t mru;\n-\n-\tuint32_t unused_0;\n+\tuint16_t sc;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_vnic_cfg_output {\n+struct hwrm_ring_grp_alloc_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5707,10 +5676,16 @@ struct hwrm_vnic_cfg_output {\n \t */\n \tuint16_t resp_len;\n \n-\tuint32_t unused_0;\n+\t/*\n+\t * This is the ring group ID value. Use this value to program the\n+\t * default ring group for the VNIC or as table entries in an RSS/COS\n+\t * context.\n+\t */\n+\tuint32_t ring_group_id;\n+\n+\tuint8_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n-\tuint8_t unused_3;\n \n \t/*\n \t * This field is used in Output records to indicate that the output is\n@@ -5722,15 +5697,18 @@ struct hwrm_vnic_cfg_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_vnic_free */\n+/* hwrm_ring_grp_free */\n /*\n- * Description: Free a VNIC resource. Idle any resources associated with the\n- * VNIC as well as the VNIC. Reset and release all resources associated with the\n- * VNIC.\n+ * Description: This API frees a ring group and associated resources. # If a\n+ * ring in the ring group is reset or free, then the associated rings in the\n+ * ring group shall also be reset/free using hwrm_ring_free. # A function driver\n+ * shall always use hwrm_ring_grp_free after freeing all rings in a group. # As\n+ * a part of executing this command, the HWRM shall reset all associated ring\n+ * group resources.\n  */\n \n /* Input (24 bytes) */\n-struct hwrm_vnic_free_input {\n+struct hwrm_ring_grp_free_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5761,14 +5739,14 @@ struct hwrm_vnic_free_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/* Logical vnic ID */\n-\tuint32_t vnic_id;\n+\t/* This is the ring group ID value. */\n+\tuint32_t ring_group_id;\n \n \tuint32_t unused_0;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_vnic_free_output {\n+struct hwrm_ring_grp_free_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5803,11 +5781,14 @@ struct hwrm_vnic_free_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_vnic_rss_cfg */\n-/* Description: This function is used to enable RSS configuration. */\n+/* hwrm_stat_ctx_alloc */\n+/*\n+ * Description: This command allocates and does basic preparation for a stat\n+ * context.\n+ */\n \n-/* Input (48 bytes) */\n-struct hwrm_vnic_rss_cfg_input {\n+/* Input (32 bytes) */\n+struct hwrm_stat_ctx_alloc_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5838,58 +5819,20 @@ struct hwrm_vnic_rss_cfg_input {\n \t */\n \tuint64_t resp_addr;\n \n+\t/* This is the address for statistic block. */\n+\tuint64_t stats_dma_addr;\n+\n \t/*\n-\t * When this bit is '1', the RSS hash shall be computed over source and\n-\t * destination IPv4 addresses of IPv4 packets.\n-\t */\n-\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4\t\tUINT32_C(0x1)\n-\t/*\n-\t * When this bit is '1', the RSS hash shall be computed over\n-\t * source/destination IPv4 addresses and source/destination ports of\n-\t * TCP/IPv4 packets.\n-\t */\n-\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4\tUINT32_C(0x2)\n-\t/*\n-\t * When this bit is '1', the RSS hash shall be computed over\n-\t * source/destination IPv4 addresses and source/destination ports of\n-\t * UDP/IPv4 packets.\n-\t */\n-\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4\tUINT32_C(0x4)\n-\t/*\n-\t * When this bit is '1', the RSS hash shall be computed over source and\n-\t * destination IPv4 addresses of IPv6 packets.\n-\t */\n-\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6\t\tUINT32_C(0x8)\n-\t/*\n-\t * When this bit is '1', the RSS hash shall be computed over\n-\t * source/destination IPv6 addresses and source/destination ports of\n-\t * TCP/IPv6 packets.\n-\t */\n-\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6\tUINT32_C(0x10)\n-\t/*\n-\t * When this bit is '1', the RSS hash shall be computed over\n-\t * source/destination IPv6 addresses and source/destination ports of\n-\t * UDP/IPv6 packets.\n+\t * The statistic block update period in ms. e.g. 250ms, 500ms, 750ms,\n+\t * 1000ms.\n \t */\n-\t#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6\tUINT32_C(0x20)\n-\tuint32_t hash_type;\n+\tuint32_t update_period_ms;\n \n \tuint32_t unused_0;\n-\n-\t/* This is the address for rss ring group table */\n-\tuint64_t ring_grp_tbl_addr;\n-\n-\t/* This is the address for rss hash key table */\n-\tuint64_t hash_key_tbl_addr;\n-\n-\t/* Index to the rss indirection table. */\n-\tuint16_t rss_ctx_idx;\n-\n-\tuint16_t unused_1[3];\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_vnic_rss_cfg_output {\n+struct hwrm_stat_ctx_alloc_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5909,10 +5852,12 @@ struct hwrm_vnic_rss_cfg_output {\n \t */\n \tuint16_t resp_len;\n \n-\tuint32_t unused_0;\n+\t/* This is the statistics context ID value. */\n+\tuint32_t stat_ctx_id;\n+\n+\tuint8_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n-\tuint8_t unused_3;\n \n \t/*\n \t * This field is used in Output records to indicate that the output is\n@@ -5924,8 +5869,11 @@ struct hwrm_vnic_rss_cfg_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* Input (16 bytes) */\n-struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {\n+/* hwrm_stat_ctx_clr_stats */\n+/* Description: This command clears statistics of a context. */\n+\n+/* Input (24 bytes) */\n+struct hwrm_stat_ctx_clr_stats_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -5955,11 +5903,15 @@ struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {\n \t * cleared to zero before the request is made.\n \t */\n \tuint64_t resp_addr;\n+\n+\t/* ID of the statistics context that is being queried. */\n+\tuint32_t stat_ctx_id;\n+\n+\tuint32_t unused_0;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-\n-struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {\n+struct hwrm_stat_ctx_clr_stats_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -5979,14 +5931,10 @@ struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {\n \t */\n \tuint16_t resp_len;\n \n-\t/* rss_cos_lb_ctx_id is 16 b */\n-\tuint16_t rss_cos_lb_ctx_id;\n-\n-\tuint8_t unused_0;\n+\tuint32_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n \tuint8_t unused_3;\n-\tuint8_t unused_4;\n \n \t/*\n \t * This field is used in Output records to indicate that the output is\n@@ -5998,11 +5946,11 @@ struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-/* hwrm_vnic_rss_cos_lb_ctx_free */\n-/* Description: This function can be used to free COS/Load Balance context. */\n+/* hwrm_stat_ctx_free */\n+/* Description: This command is used to free a stat context. */\n /* Input (24 bytes) */\n \n-struct hwrm_vnic_rss_cos_lb_ctx_free_input {\n+struct hwrm_stat_ctx_free_input {\n \t/*\n \t * This value indicates what type of request this is. The format for the\n \t * rest of the command is determined by this field.\n@@ -6033,14 +5981,15 @@ struct hwrm_vnic_rss_cos_lb_ctx_free_input {\n \t */\n \tuint64_t resp_addr;\n \n-\t/* rss_cos_lb_ctx_id is 16 b */\n-\tuint16_t rss_cos_lb_ctx_id;\n+\t/* ID of the statistics context that is being queried. */\n+\tuint32_t stat_ctx_id;\n \n-\tuint16_t unused_0[3];\n+\tuint32_t unused_0;\n } __attribute__((packed));\n \n /* Output (16 bytes) */\n-struct hwrm_vnic_rss_cos_lb_ctx_free_output {\n+\n+struct hwrm_stat_ctx_free_output {\n \t/*\n \t * Pass/Fail or error type Note: receiver to verify the in parameters,\n \t * and fail the call with an error when appropriate\n@@ -6060,10 +6009,12 @@ struct hwrm_vnic_rss_cos_lb_ctx_free_output {\n \t */\n \tuint16_t resp_len;\n \n-\tuint32_t unused_0;\n+\t/* This is the statistics context ID value. */\n+\tuint32_t stat_ctx_id;\n+\n+\tuint8_t unused_0;\n \tuint8_t unused_1;\n \tuint8_t unused_2;\n-\tuint8_t unused_3;\n \n \t/*\n \t * This field is used in Output records to indicate that the output is\n@@ -6075,5 +6026,4 @@ struct hwrm_vnic_rss_cos_lb_ctx_free_output {\n \tuint8_t valid;\n } __attribute__((packed));\n \n-\n #endif\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "12/15"
    ]
}