Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142610900
D54809.id170177.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
D54809.id170177.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 22, 12:17 PM (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27835516
Default Alt Text
D54809.id170177.diff (1 KB)
Attached To
Mode
D54809: dpnaa2: announce transmit checksum support
Attached
Detach File
Event Timeline
Log In to Comment