Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131580971
D30072.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
D30072.diff
View Options
diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c
--- a/sys/dev/e1000/em_txrx.c
+++ b/sys/dev/e1000/em_txrx.c
@@ -141,8 +141,10 @@
if_softc_ctx_t scctx = sc->shared;
struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx];
struct tx_ring *txr = &que->txr;
+ struct e1000_hw *hw = &sc->hw;
struct e1000_context_desc *TXD;
int cur, hdr_len;
+ uint32_t cmd_type_len;
hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen;
*txd_lower = (E1000_TXD_CMD_DEXT | /* Extended descr type */
@@ -183,12 +185,23 @@
TXD->tcp_seg_setup.fields.mss = htole16(pi->ipi_tso_segsz);
TXD->tcp_seg_setup.fields.hdr_len = hdr_len;
- TXD->cmd_and_length = htole32(sc->txd_cmd |
- E1000_TXD_CMD_DEXT | /* Extended descr */
- E1000_TXD_CMD_TSE | /* TSE context */
- E1000_TXD_CMD_IP | /* Do IP csum */
- E1000_TXD_CMD_TCP | /* Do TCP checksum */
- (pi->ipi_len - hdr_len)); /* Total len */
+ /*
+ * 8254x SDM4.0 page 45, and PCIe GbE SDM2.5 page 63
+ * - Set up basic TUCMDs
+ * - Enable IP bit on 82544
+ * - For others IP bit on indicates IPv4, while off indicates IPv6
+ */
+ cmd_type_len = sc->txd_cmd |
+ E1000_TXD_CMD_DEXT | /* Extended descr */
+ E1000_TXD_CMD_TSE | /* TSE context */
+ E1000_TXD_CMD_TCP; /* Do TCP checksum */
+ if (hw->mac.type == e1000_82544)
+ cmd_type_len |= E1000_TXD_CMD_IP;
+ else if (pi->ipi_etype == ETHERTYPE_IP)
+ cmd_type_len |= E1000_TXD_CMD_IP;
+ TXD->cmd_and_length = htole32(cmd_type_len |
+ (pi->ipi_len - hdr_len)); /* Total len */
+
txr->tx_tso = true;
if (++cur == scctx->isc_ntxd[0]) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 10, 11:33 AM (20 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23529523
Default Alt Text
D30072.diff (1 KB)
Attached To
Mode
D30072: e1000: Clean up and bug fix em_txrx
Attached
Detach File
Event Timeline
Log In to Comment