mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 07:31:11 +00:00
e1000: Fix/enable IPv6 transmit checksum offload
Fixes and enables txcsum6 offload for lem(4) and em(4). MFC after: 2 weeks
This commit is contained in:
parent
918c25677d
commit
4f9a44a215
|
@ -285,13 +285,13 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi,
|
|||
cmd |= E1000_TXD_CMD_IP;
|
||||
}
|
||||
|
||||
if (csum_flags & (CSUM_TCP|CSUM_UDP)) {
|
||||
if (csum_flags & (CSUM_TCP | CSUM_UDP | CSUM_IP6_TCP | CSUM_IP6_UDP)) {
|
||||
uint8_t tucso;
|
||||
|
||||
*txd_upper |= E1000_TXD_POPTS_TXSM << 8;
|
||||
*txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D;
|
||||
|
||||
if (csum_flags & CSUM_TCP) {
|
||||
if (csum_flags & CSUM_TCP | CSUM_IP6_TCP) {
|
||||
tucso = hdr_len + offsetof(struct tcphdr, th_sum);
|
||||
cmd |= E1000_TXD_CMD_TCP;
|
||||
} else
|
||||
|
|
|
@ -333,10 +333,13 @@
|
|||
#define EM_TSO_SIZE 65535
|
||||
#define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */
|
||||
#define ETH_ZLEN 60
|
||||
#define EM_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP) /* Offload bits in mbuf flag */
|
||||
|
||||
/* Offload bits in mbuf flag */
|
||||
#define EM_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | \
|
||||
CSUM_IP6_UDP | CSUM_IP6_TCP)
|
||||
#define IGB_CSUM_OFFLOAD (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP | \
|
||||
CSUM_IP_SCTP | CSUM_IP6_UDP | CSUM_IP6_TCP | \
|
||||
CSUM_IP6_SCTP) /* Offload bits in mbuf flag */
|
||||
CSUM_IP6_SCTP)
|
||||
|
||||
#define IGB_PKTTYPE_MASK 0x0000FFF0
|
||||
#define IGB_DMCTLX_DCFLUSH_DIS 0x80000000 /* Disable DMA Coalesce Flush */
|
||||
|
|
Loading…
Reference in a new issue