X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_dp.h;h=7fd8f34b0f281d7b6d8c814aa289268f42c795e9;hb=90bbd7d9545f88ac11f8b89449ad7fd799adbfba;hp=df76f3f2bb6633bef87a9afa7aeabd5bed08ff63;hpb=24715bb93ab385ab4a2b7d7114150b2f9fe767e9;p=dpdk.git diff --git a/drivers/net/sfc/sfc_dp.h b/drivers/net/sfc/sfc_dp.h index df76f3f2bb..7fd8f34b0f 100644 --- a/drivers/net/sfc/sfc_dp.h +++ b/drivers/net/sfc/sfc_dp.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * - * Copyright(c) 2019-2020 Xilinx, Inc. + * Copyright(c) 2019-2021 Xilinx, Inc. * Copyright(c) 2017-2019 Solarflare Communications Inc. * * This software was jointly developed between OKTET Labs (under contract @@ -42,6 +42,16 @@ enum sfc_dp_type { /** Datapath queue run-time information */ struct sfc_dp_queue { + /* + * Typically the structure is located at the end of Rx/Tx queue + * data structure and not used on datapath. So, it is not a + * problem to have extra fields even if not used. However, + * put stats at top of the structure to be closer to fields + * used on datapath or reap to have more chances to be cache-hot. + */ + uint32_t rx_dbells; + uint32_t tx_dbells; + uint16_t port_id; uint16_t queue_id; struct rte_pci_addr pci_addr; @@ -96,6 +106,12 @@ struct sfc_dp { /** List of datapath variants */ TAILQ_HEAD(sfc_dp_list, sfc_dp); +typedef unsigned int sfc_sw_index_t; +#define SFC_SW_INDEX_INVALID ((sfc_sw_index_t)(UINT_MAX)) + +typedef int32_t sfc_ethdev_qid_t; +#define SFC_ETHDEV_QID_INVALID ((sfc_ethdev_qid_t)(-1)) + /* Check if available HW/FW capabilities are sufficient for the datapath */ static inline bool sfc_dp_match_hw_fw_caps(const struct sfc_dp *dp, unsigned int avail_caps)