Page MenuHomeFreeBSD

D54809.id.diff
No OneTemporary

D54809.id.diff

diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c
--- a/sys/dev/dpaa2/dpaa2_ni.c
+++ b/sys/dev/dpaa2/dpaa2_ni.c
@@ -220,6 +220,9 @@
#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
#define RXH_DISCARD (1 << 31)
+/* Transmit checksum offload */
+#define DPAA2_CSUM_TX_OFFLOAD (CSUM_IP | CSUM_DELAY_DATA | CSUM_DELAY_DATA_IPV6)
+
/* Default Rx hash options, set during attaching. */
#define DPAA2_RXH_DEFAULT (RXH_IP_SRC | RXH_IP_DST | RXH_L4_B_0_1 | RXH_L4_B_2_3)
@@ -559,6 +562,7 @@
if_settransmitfn(ifp, dpaa2_ni_transmit);
if_setqflushfn(ifp, dpaa2_ni_qflush);
+ if_sethwassist(sc->ifp, DPAA2_CSUM_TX_OFFLOAD);
if_setcapabilities(ifp, IFCAP_VLAN_MTU | IFCAP_HWCSUM |
IFCAP_HWCSUM_IPV6 | IFCAP_JUMBO_MTU);
if_setcapenable(ifp, if_getcapabilities(ifp));
@@ -2600,8 +2604,10 @@
changed = if_getcapenable(ifp) ^ ifr->ifr_reqcap;
if ((changed & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0)
if_togglecapenable(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
- if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0)
- if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6);
+ if ((changed & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != 0) {
+ if_togglecapenable(ifp, IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6);
+ if_togglehwassist(ifp, DPAA2_CSUM_TX_OFFLOAD);
+ }
rc = dpaa2_ni_setup_if_caps(sc);
if (rc) {

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 22, 3:56 PM (13 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27835516
Default Alt Text
D54809.id.diff (1 KB)

Event Timeline