Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144730319
D4871.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D4871.diff
View Options
Index: head/sys/dev/sfxge/common/efx_rx.c
===================================================================
--- head/sys/dev/sfxge/common/efx_rx.c
+++ head/sys/dev/sfxge/common/efx_rx.c
@@ -175,29 +175,29 @@
};
#endif /* EFSYS_OPT_SIENA */
-#if EFSYS_OPT_HUNTINGTON
-static efx_rx_ops_t __efx_rx_hunt_ops = {
- hunt_rx_init, /* erxo_init */
- hunt_rx_fini, /* erxo_fini */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_rx_ops_t __efx_rx_ef10_ops = {
+ ef10_rx_init, /* erxo_init */
+ ef10_rx_fini, /* erxo_fini */
#if EFSYS_OPT_RX_HDR_SPLIT
- hunt_rx_hdr_split_enable, /* erxo_hdr_split_enable */
+ ef10_rx_hdr_split_enable, /* erxo_hdr_split_enable */
#endif
#if EFSYS_OPT_RX_SCATTER
- hunt_rx_scatter_enable, /* erxo_scatter_enable */
+ ef10_rx_scatter_enable, /* erxo_scatter_enable */
#endif
#if EFSYS_OPT_RX_SCALE
- hunt_rx_scale_mode_set, /* erxo_scale_mode_set */
- hunt_rx_scale_key_set, /* erxo_scale_key_set */
- hunt_rx_scale_tbl_set, /* erxo_scale_tbl_set */
+ ef10_rx_scale_mode_set, /* erxo_scale_mode_set */
+ ef10_rx_scale_key_set, /* erxo_scale_key_set */
+ ef10_rx_scale_tbl_set, /* erxo_scale_tbl_set */
#endif
- hunt_rx_qpost, /* erxo_qpost */
- hunt_rx_qpush, /* erxo_qpush */
- hunt_rx_qflush, /* erxo_qflush */
- hunt_rx_qenable, /* erxo_qenable */
- hunt_rx_qcreate, /* erxo_qcreate */
- hunt_rx_qdestroy, /* erxo_qdestroy */
+ ef10_rx_qpost, /* erxo_qpost */
+ ef10_rx_qpush, /* erxo_qpush */
+ ef10_rx_qflush, /* erxo_qflush */
+ ef10_rx_qenable, /* erxo_qenable */
+ ef10_rx_qcreate, /* erxo_qcreate */
+ ef10_rx_qdestroy, /* erxo_qdestroy */
};
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
__checkReturn efx_rc_t
@@ -235,10 +235,16 @@
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
- erxop = (efx_rx_ops_t *)&__efx_rx_hunt_ops;
+ erxop = (efx_rx_ops_t *)&__efx_rx_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
+#if EFSYS_OPT_MEDFORD
+ case EFX_FAMILY_MEDFORD:
+ erxop = (efx_rx_ops_t *)&__efx_rx_ef10_ops;
+ break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;
@@ -607,7 +613,7 @@
* Hash values are in network (big-endian) byte order.
*
*
- * On Huntington the pseudo-header is laid out as:
+ * On EF10 the pseudo-header is laid out as:
* (See also SF-109306-TC section 9)
*
* Toeplitz hash (32 bits, little-endian)
@@ -629,7 +635,8 @@
__in uint8_t *buffer,
__out uint16_t *pkt_lengthp)
{
- if (enp->en_family != EFX_FAMILY_HUNTINGTON) {
+ if (enp->en_family != EFX_FAMILY_HUNTINGTON &&
+ enp->en_family != EFX_FAMILY_MEDFORD) {
EFSYS_ASSERT(0);
return (ENOTSUP);
}
@@ -656,6 +663,7 @@
(buffer[14] << 8) |
buffer[15]);
case EFX_FAMILY_HUNTINGTON:
+ case EFX_FAMILY_MEDFORD:
return (buffer[0] |
(buffer[1] << 8) |
(buffer[2] << 16) |
Index: head/sys/dev/sfxge/common/hunt_filter.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_filter.c
+++ head/sys/dev/sfxge/common/hunt_filter.c
@@ -1351,7 +1351,7 @@
#if EFSYS_OPT_RX_SCALE
EFSYS_ASSERT((using_rss == B_FALSE) ||
- (enp->en_rss_context != HUNTINGTON_RSS_CONTEXT_INVALID));
+ (enp->en_rss_context != EF10_RSS_CONTEXT_INVALID));
table->hft_using_rss = using_rss;
#else
EFSYS_ASSERT(using_rss == B_FALSE);
Index: head/sys/dev/sfxge/common/hunt_impl.h
===================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h
+++ head/sys/dev/sfxge/common/hunt_impl.h
@@ -50,7 +50,7 @@
#define HUNTINGTON_RX_WPTR_ALIGN 8
/* Invalid RSS context handle */
-#define HUNTINGTON_RSS_CONTEXT_INVALID (0xffffffff)
+#define EF10_RSS_CONTEXT_INVALID (0xffffffff)
/* EV */
@@ -822,12 +822,12 @@
/* RX */
extern __checkReturn efx_rc_t
-hunt_rx_init(
+ef10_rx_init(
__in efx_nic_t *enp);
#if EFSYS_OPT_RX_HDR_SPLIT
extern __checkReturn efx_rc_t
-hunt_rx_hdr_split_enable(
+ef10_rx_hdr_split_enable(
__in efx_nic_t *enp,
__in unsigned int hdr_buf_size,
__in unsigned int pld_buf_size);
@@ -835,7 +835,7 @@
#if EFSYS_OPT_RX_SCATTER
extern __checkReturn efx_rc_t
-hunt_rx_scatter_enable(
+ef10_rx_scatter_enable(
__in efx_nic_t *enp,
__in unsigned int buf_size);
#endif /* EFSYS_OPT_RX_SCATTER */
@@ -844,20 +844,20 @@
#if EFSYS_OPT_RX_SCALE
extern __checkReturn efx_rc_t
-hunt_rx_scale_mode_set(
+ef10_rx_scale_mode_set(
__in efx_nic_t *enp,
__in efx_rx_hash_alg_t alg,
__in efx_rx_hash_type_t type,
__in boolean_t insert);
extern __checkReturn efx_rc_t
-hunt_rx_scale_key_set(
+ef10_rx_scale_key_set(
__in efx_nic_t *enp,
__in_ecount(n) uint8_t *key,
__in size_t n);
extern __checkReturn efx_rc_t
-hunt_rx_scale_tbl_set(
+ef10_rx_scale_tbl_set(
__in efx_nic_t *enp,
__in_ecount(n) unsigned int *table,
__in size_t n);
@@ -865,7 +865,7 @@
#endif /* EFSYS_OPT_RX_SCALE */
extern void
-hunt_rx_qpost(
+ef10_rx_qpost(
__in efx_rxq_t *erp,
__in_ecount(n) efsys_dma_addr_t *addrp,
__in size_t size,
@@ -874,21 +874,21 @@
__in unsigned int added);
extern void
-hunt_rx_qpush(
+ef10_rx_qpush(
__in efx_rxq_t *erp,
__in unsigned int added,
__inout unsigned int *pushedp);
extern __checkReturn efx_rc_t
-hunt_rx_qflush(
+ef10_rx_qflush(
__in efx_rxq_t *erp);
extern void
-hunt_rx_qenable(
+ef10_rx_qenable(
__in efx_rxq_t *erp);
extern __checkReturn efx_rc_t
-hunt_rx_qcreate(
+ef10_rx_qcreate(
__in efx_nic_t *enp,
__in unsigned int index,
__in unsigned int label,
@@ -900,11 +900,11 @@
__in efx_rxq_t *erp);
extern void
-hunt_rx_qdestroy(
+ef10_rx_qdestroy(
__in efx_rxq_t *erp);
extern void
-hunt_rx_fini(
+ef10_rx_fini(
__in efx_nic_t *enp);
#if EFSYS_OPT_FILTER
Index: head/sys/dev/sfxge/common/hunt_rx.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_rx.c
+++ head/sys/dev/sfxge/common/hunt_rx.c
@@ -182,7 +182,7 @@
}
rss_context = MCDI_OUT_DWORD(req, RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID);
- if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) {
+ if (rss_context == EF10_RSS_CONTEXT_INVALID) {
rc = ENOENT;
goto fail3;
}
@@ -213,7 +213,7 @@
MC_CMD_RSS_CONTEXT_FREE_OUT_LEN)];
efx_rc_t rc;
- if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) {
+ if (rss_context == EF10_RSS_CONTEXT_INVALID) {
rc = EINVAL;
goto fail1;
}
@@ -257,7 +257,7 @@
MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN)];
efx_rc_t rc;
- if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) {
+ if (rss_context == EF10_RSS_CONTEXT_INVALID) {
rc = EINVAL;
goto fail1;
}
@@ -313,7 +313,7 @@
MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN)];
efx_rc_t rc;
- if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) {
+ if (rss_context == EF10_RSS_CONTEXT_INVALID) {
rc = EINVAL;
goto fail1;
}
@@ -371,7 +371,7 @@
uint8_t *req_table;
int i, rc;
- if (rss_context == HUNTINGTON_RSS_CONTEXT_INVALID) {
+ if (rss_context == EF10_RSS_CONTEXT_INVALID) {
rc = EINVAL;
goto fail1;
}
@@ -415,7 +415,7 @@
__checkReturn efx_rc_t
-hunt_rx_init(
+ef10_rx_init(
__in efx_nic_t *enp)
{
#if EFSYS_OPT_RX_SCALE
@@ -444,7 +444,7 @@
#if EFSYS_OPT_RX_HDR_SPLIT
__checkReturn efx_rc_t
-hunt_rx_hdr_split_enable(
+ef10_rx_hdr_split_enable(
__in efx_nic_t *enp,
__in unsigned int hdr_buf_size,
__in unsigned int pld_buf_size)
@@ -470,7 +470,7 @@
#if EFSYS_OPT_RX_SCATTER
__checkReturn efx_rc_t
-hunt_rx_scatter_enable(
+ef10_rx_scatter_enable(
__in efx_nic_t *enp,
__in unsigned int buf_size)
{
@@ -481,7 +481,7 @@
#if EFSYS_OPT_RX_SCALE
__checkReturn efx_rc_t
-hunt_rx_scale_mode_set(
+ef10_rx_scale_mode_set(
__in efx_nic_t *enp,
__in efx_rx_hash_alg_t alg,
__in efx_rx_hash_type_t type,
@@ -521,7 +521,7 @@
#if EFSYS_OPT_RX_SCALE
__checkReturn efx_rc_t
-hunt_rx_scale_key_set(
+ef10_rx_scale_key_set(
__in efx_nic_t *enp,
__in_ecount(n) uint8_t *key,
__in size_t n)
@@ -550,7 +550,7 @@
#if EFSYS_OPT_RX_SCALE
__checkReturn efx_rc_t
-hunt_rx_scale_tbl_set(
+ef10_rx_scale_tbl_set(
__in efx_nic_t *enp,
__in_ecount(n) unsigned int *table,
__in size_t n)
@@ -578,7 +578,7 @@
#endif /* EFSYS_OPT_RX_SCALE */
void
-hunt_rx_qpost(
+ef10_rx_qpost(
__in efx_rxq_t *erp,
__in_ecount(n) efsys_dma_addr_t *addrp,
__in size_t size,
@@ -616,7 +616,7 @@
}
void
-hunt_rx_qpush(
+ef10_rx_qpush(
__in efx_rxq_t *erp,
__in unsigned int added,
__inout unsigned int *pushedp)
@@ -647,7 +647,7 @@
}
__checkReturn efx_rc_t
-hunt_rx_qflush(
+ef10_rx_qflush(
__in efx_rxq_t *erp)
{
efx_nic_t *enp = erp->er_enp;
@@ -665,7 +665,7 @@
}
void
-hunt_rx_qenable(
+ef10_rx_qenable(
__in efx_rxq_t *erp)
{
/* FIXME */
@@ -674,7 +674,7 @@
}
__checkReturn efx_rc_t
-hunt_rx_qcreate(
+ef10_rx_qcreate(
__in efx_nic_t *enp,
__in unsigned int index,
__in unsigned int label,
@@ -742,7 +742,7 @@
}
void
-hunt_rx_qdestroy(
+ef10_rx_qdestroy(
__in efx_rxq_t *erp)
{
efx_nic_t *enp = erp->er_enp;
@@ -758,7 +758,7 @@
}
void
-hunt_rx_fini(
+ef10_rx_fini(
__in efx_nic_t *enp)
{
#if EFSYS_OPT_RX_SCALE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 12, 7:39 PM (10 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28669645
Default Alt Text
D4871.diff (9 KB)
Attached To
Mode
D4871: sfxge: rename hunt RX methods to ef10 and use for Medford
Attached
Detach File
Event Timeline
Log In to Comment