Return the default TX and RX hardware checksum for the Cadence driver to off.

The hardware support does not seem to work with qemu. The support can be
enabled with ifconfig or via ioctl on real hardware to get the
performance boost.
This commit is contained in:
Chris Johns 2015-06-19 17:35:06 +10:00
parent 59bc7c1f5f
commit 54fb9f01f8
2 changed files with 20 additions and 13 deletions

View File

@ -1778,15 +1778,10 @@ cgem_attach(device_t dev)
ifp->if_init = cgem_init;
ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 |
IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM;
#ifndef __rtems__
/* Disable hardware checksumming by default. */
ifp->if_hwassist = 0;
ifp->if_capenable = ifp->if_capabilities &
~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM);
#else /* __rtems__ */
ifp->if_hwassist = CGEM_CKSUM_ASSIST;
ifp->if_capenable = ifp->if_capabilities;
#endif /* __rtems__ */
ifp->if_snd.ifq_drv_maxlen = CGEM_NUM_TX_DESCS;
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
IFQ_SET_READY(&ifp->if_snd);

View File

@ -1075,12 +1075,24 @@ Broadcom BCM4401 _bsd_bfe_pcimodule_sys_init Links
Broadcom BCM570x _bsd_bge_pcimodule_sys_init Needs Symbols (A)
E1000 IGB _bsd_igb_pcimodule_sys_init Links
E1000 EM _bsd_em_pcimodule_sys_init Links
Cadence ? Links, works.
----
Symbols (A)
pci_get_vpd_ident
=== Cadence ===
The cadence driver works on the Xilinx Zynq platform. The hardware checksum
support works on real hardware but does not seem to be supported on qemu
therefore the default state is disabled and it can be enabled from the shell
with:
# ifconfig cgem0 rxcsum txcsum
or with an ioctl call to the network interface driver with SIOCSIFCAP and the
mask IFCAP_TXCSUM and IFCAP_RXCSUM set.
== Problems to report to FreeBSD ==
The MMAP_NOT_AVAILABLE define is inverted on its usage. When it is