Mykyta Iziumtsev(MykytaI) replied on github web page:

platform/linux-generic/pktio/mdev/cxgb4.c
line 11
@@ -36,6 +36,25 @@
 /* RX queue definitions */
 #define CXGB4_RX_QUEUE_NUM_MAX 32
 
+/* RX buffer size indices for firmware */
+#define CXGB4_RX_BUF_SIZE_INDEX_4K     0x0UL
+#define CXGB4_RX_BUF_SIZE_INDEX_64K    0x1UL
+#define CXGB4_RX_BUF_SIZE_INDEX_1500   0x2UL
+#define CXGB4_RX_BUF_SIZE_INDEX_9000   0x3UL
+
+/* Default RX buffer size index to use */
+#ifndef CXGB4_RX_BUF_SIZE_INDEX


Comment:
The question is if we need to reverse CXGB4_RX_BUF_SIZE_INDEX <-> 
CXGB4_RX_BUF_SIZE dependency and have CXGB4_RX_BUF_SIZE as configuration option 
(possible values at the moment are 2048 and 4096). Probably then it will be 
more intuitively understandable and we'll hide HW specific index stuff.

That is:

#ifndef CXGB4_RX_BUF_SIZE
#define CXGB4_RX_BUF_SIZE 4096
#endif

CXGB4_RX_BUF_SIZE == 2048 => define CXGB4_RX_BUF_SIZE_INDEX 
CXGB4_RX_BUF_SIZE_INDEX_1500
CXGB4_RX_BUF_SIZE == 4096 => define CXGB4_RX_BUF_SIZE_INDEX 
CXGB4_RX_BUF_SIZE_INDEX_4K

https://github.com/Linaro/odp/pull/442#discussion_r165307201
updated_at 2018-02-01 10:26:56

Reply via email to