From cd9d66a72c789c759f24caa065f7818cd81a9a26 Mon Sep 17 00:00:00 2001 From: arybchik Date: Thu, 14 Jan 2016 14:30:25 +0000 Subject: MFC r291678 sfxge: sync TLV layout headers with firmwaresrc for event merging config Submitted by: Tom Millington Sponsored by: Solarflare Communications, Inc. --- sys/dev/sfxge/common/ef10_tlv_layout.h | 40 +++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'sys/dev/sfxge/common/ef10_tlv_layout.h') diff --git a/sys/dev/sfxge/common/ef10_tlv_layout.h b/sys/dev/sfxge/common/ef10_tlv_layout.h index e413a5d..f778b23 100644 --- a/sys/dev/sfxge/common/ef10_tlv_layout.h +++ b/sys/dev/sfxge/common/ef10_tlv_layout.h @@ -330,7 +330,7 @@ struct tlv_tmp_gubbins { uint64_t tx1_tags; /* Bitmap */ uint64_t dl_tags; /* Bitmap */ uint32_t flags; -#define TLV_DPCPU_TX_STRIPE (1) /* TX striping is on */ +#define TLV_DPCPU_TX_STRIPE (1) /* No longer used, has no effect */ #define TLV_DPCPU_BIU_TAGS (2) /* Use BIU tag manager */ #define TLV_DPCPU_TX0_TAGS (4) /* tx0_tags is valid */ #define TLV_DPCPU_TX1_TAGS (8) /* tx1_tags is valid */ @@ -688,4 +688,42 @@ struct tlv_ocsd { #define TLV_OCSD_ENABLED 1 /* Default */ }; +/* Descriptor cache config. + * + * Sets the sizes of the TX and RX descriptor caches as a power of 2. It also + * sets the total number of VIs. When the number of VIs is reduced VIs are taken + * away from the highest numbered port first, so a vi_count of 1024 means 1024 + * VIs on the first port and 0 on the second (on a Torino). + */ + +#define TLV_TAG_DESCRIPTOR_CACHE_CONFIG (0x101d0000) + +struct tlv_descriptor_cache_config { + uint32_t tag; + uint32_t length; + uint8_t rx_desc_cache_size; + uint8_t tx_desc_cache_size; + uint16_t vi_count; +}; +#define TLV_DESC_CACHE_DEFAULT (0xff) +#define TLV_VI_COUNT_DEFAULT (0xffff) + +/* RX event merging config (read batching). + * + * Sets the global maximum number of events for the merging bins, and the + * global timeout configuration for the bins. + */ + +#define TLV_TAG_RX_EVENT_MERGING_CONFIG (0x101e0000) + +struct tlv_rx_event_merging_config { + uint32_t tag; + uint32_t length; + uint32_t max_events; +#define TLV_RX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1) + uint32_t timeout_ns; +}; +#define TLV_RX_EVENT_MERGING_MAX_EVENTS_DEFAULT 7 +#define TLV_RX_EVENT_MERGING_TIMEOUT_NS_DEFAULT 8740 + #endif /* CI_MGMT_TLV_LAYOUT_H */ -- cgit v1.1