Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147375507
D31493.id125806.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31493.id125806.diff
View Options
diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -1985,6 +1985,7 @@
* Enable receive unit.
*
**********************************************************************/
+#define BSIZEPKT_ROUNDUP ((1<<IGC_SRRCTL_BSIZEPKT_SHIFT)-1)
static void
igc_initialize_receive_unit(if_ctx_t ctx)
@@ -2050,24 +2051,19 @@
igc_initialize_rss_mapping(adapter);
if (if_getmtu(ifp) > ETHERMTU) {
- /* Set maximum packet len */
- if (adapter->rx_mbuf_sz <= 4096) {
- srrctl |= 4096 >> IGC_SRRCTL_BSIZEPKT_SHIFT;
- rctl |= IGC_RCTL_SZ_4096 | IGC_RCTL_BSEX;
- } else if (adapter->rx_mbuf_sz > 4096) {
- srrctl |= 8192 >> IGC_SRRCTL_BSIZEPKT_SHIFT;
- rctl |= IGC_RCTL_SZ_8192 | IGC_RCTL_BSEX;
- }
psize = scctx->isc_max_frame_size;
/* are we on a vlan? */
if (if_vlantrunkinuse(ifp))
psize += VLAN_TAG_SIZE;
IGC_WRITE_REG(&adapter->hw, IGC_RLPML, psize);
- } else {
- srrctl |= 2048 >> IGC_SRRCTL_BSIZEPKT_SHIFT;
- rctl |= IGC_RCTL_SZ_2048;
}
+ /* Set maximum packet buffer len */
+ srrctl |= (adapter->rx_mbuf_sz + BSIZEPKT_ROUNDUP) >>
+ IGC_SRRCTL_BSIZEPKT_SHIFT;
+ /* srrctl above overrides this but set the register to a sane value */
+ rctl |= IGC_RCTL_SZ_2048;
+
/*
* If TX flow control is disabled and there's >1 queue defined,
* enable DROP.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 11, 11:04 AM (30 m, 3 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29536876
Default Alt Text
D31493.id125806.diff (1 KB)
Attached To
Mode
D31493: igc: sync srrctl buffer sizing with e1000
Attached
Detach File
Event Timeline
Log In to Comment