git: f485d733e87e - main - enetc: Disable HW IP packet alignment

From: Wojciech Macek <wma_at_FreeBSD.org>
Date: Mon, 31 Jan 2022 08:00:02 UTC
The branch main has been updated by wma:

URL: https://cgit.FreeBSD.org/src/commit/?id=f485d733e87ec555fc97c3db020f13d61665d9ca

commit f485d733e87ec555fc97c3db020f13d61665d9ca
Author:     Kornel Duleba <mindal@semihalf.com>
AuthorDate: 2022-01-27 08:26:07 +0000
Commit:     Wojciech Macek <wma@FreeBSD.org>
CommitDate: 2022-01-31 07:57:48 +0000

    enetc: Disable HW IP packet alignment
    
    The NIC can IP align received packets.
    It was observed that it caused some rare stalls, that required full board reset.
    Disable this feature for now. It doesn't provide any significant performance
    improvement anyway.
    
    Obtained from: Semihalf
    Sponsored by: Alstom Group
---
 sys/dev/enetc/if_enetc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c
index e5337319fbbb..6f15db3ffe6c 100644
--- a/sys/dev/enetc/if_enetc.c
+++ b/sys/dev/enetc/if_enetc.c
@@ -933,7 +933,7 @@ enetc_init(if_ctx_t ctx)
 		ENETC_PORT_WR4(sc, ENETC_PSIPVMR,
 		    ENETC_PSIPVMR_SET_VUTA(1));
 
-	sc->rbmr = ENETC_RBMR_EN | ENETC_RBMR_AL;
+	sc->rbmr = ENETC_RBMR_EN;
 
 	if (if_getcapenable(ifp) & IFCAP_VLAN_HWTAGGING)
 		sc->rbmr |= ENETC_RBMR_VTE;
@@ -1255,8 +1255,7 @@ enetc_isc_rxd_pkt_get(void *data, if_rxd_info_t ri)
 		desc = &queue->ring[cidx];
 	}
 	ri->iri_nfrags = i + 1;
-	ri->iri_len = pkt_size + ENETC_RX_IP_ALIGN;
-	ri->iri_pad = ENETC_RX_IP_ALIGN;
+	ri->iri_len = pkt_size;
 
 	MPASS(desc->r.lstatus & ENETC_RXBD_LSTATUS_F);
 	if (status & ENETC_RXBD_LSTATUS(ENETC_RXBD_ERR_MASK))