summaryrefslogtreecommitdiffstats
path: root/sys/dev/oce
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2014-11-03 12:38:29 +0000
committerhselasky <hselasky@FreeBSD.org>2014-11-03 12:38:29 +0000
commitfa183f01741aa54ff3ba0fcf31b7b1404b7a7e53 (patch)
tree1bba595c897541325069c2ad2bb01c04241c25c0 /sys/dev/oce
parent8dd879bfaf9ef726ec0754bd1c4368f02df4f798 (diff)
downloadFreeBSD-src-fa183f01741aa54ff3ba0fcf31b7b1404b7a7e53.zip
FreeBSD-src-fa183f01741aa54ff3ba0fcf31b7b1404b7a7e53.tar.gz
MFC r271946 and r272595:
Improve transmit sending offload, TSO, algorithm in general. This change allows all HCAs from Mellanox Technologies to function properly when TSO is enabled. See r271946 and r272595 for more details about this commit. Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/dev/oce')
-rw-r--r--sys/dev/oce/oce_if.c4
-rw-r--r--sys/dev/oce/oce_if.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c
index 48f85e6..273089f 100644
--- a/sys/dev/oce/oce_if.c
+++ b/sys/dev/oce/oce_if.c
@@ -1735,7 +1735,9 @@ oce_attach_ifp(POCE_SOFTC sc)
if_initbaudrate(sc->ifp, IF_Gbps(10));
#if __FreeBSD_version >= 1000000
- sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE;
+ sc->ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN);
+ sc->ifp->if_hw_tsomaxsegcount = OCE_MAX_TX_ELEMENTS;
+ sc->ifp->if_hw_tsomaxsegsize = 4096;
#endif
ether_ifattach(sc->ifp, sc->macaddr.mac_addr);
diff --git a/sys/dev/oce/oce_if.h b/sys/dev/oce/oce_if.h
index 259a9ed..dc96170 100644
--- a/sys/dev/oce/oce_if.h
+++ b/sys/dev/oce/oce_if.h
@@ -150,7 +150,6 @@ extern int mp_ncpus; /* system's total active cpu cores */
#define OCE_MAX_TX_ELEMENTS 29
#define OCE_MAX_TX_DESC 1024
#define OCE_MAX_TX_SIZE 65535
-#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN)
#define OCE_MAX_RX_SIZE 4096
#define OCE_MAX_RQ_POSTS 255
#define OCE_DEFAULT_PROMISCUOUS 0
OpenPOWER on IntegriCloud