if_bge.c (213812) | if_bge.c (213844) |
---|---|
1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Wind River Systems 3 * Copyright (c) 1997, 1998, 1999, 2001 4 * Bill Paul <wpaul@windriver.com>. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 213812 2010-10-13 22:29:48Z yongari $"); | 35__FBSDID("$FreeBSD: head/sys/dev/bge/if_bge.c 213844 2010-10-14 18:31:40Z yongari $"); |
36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes refered to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 4048 unchanged lines hidden (view full) --- 4092 m = m_pullup(m, poff + (tcp->th_off << 2)); 4093 if (m == NULL) 4094 return (NULL); 4095 /* 4096 * It seems controller doesn't modify IP length and TCP pseudo 4097 * checksum. These checksum computed by upper stack should be 0. 4098 */ 4099 *mss = m->m_pkthdr.tso_segsz; | 36 37/* 38 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD. 39 * 40 * The Broadcom BCM5700 is based on technology originally developed by 41 * Alteon Networks as part of the Tigon I and Tigon II gigabit ethernet 42 * MAC chips. The BCM5700, sometimes refered to as the Tigon III, has 43 * two on-board MIPS R4000 CPUs and can have as much as 16MB of external --- 4048 unchanged lines hidden (view full) --- 4092 m = m_pullup(m, poff + (tcp->th_off << 2)); 4093 if (m == NULL) 4094 return (NULL); 4095 /* 4096 * It seems controller doesn't modify IP length and TCP pseudo 4097 * checksum. These checksum computed by upper stack should be 0. 4098 */ 4099 *mss = m->m_pkthdr.tso_segsz; |
4100 ip = (struct ip *)(mtod(m, char *) + sizeof(struct ether_header)); |
|
4100 ip->ip_sum = 0; 4101 ip->ip_len = htons(*mss + (ip->ip_hl << 2) + (tcp->th_off << 2)); 4102 /* Clear pseudo checksum computed by TCP stack. */ | 4101 ip->ip_sum = 0; 4102 ip->ip_len = htons(*mss + (ip->ip_hl << 2) + (tcp->th_off << 2)); 4103 /* Clear pseudo checksum computed by TCP stack. */ |
4104 tcp = (struct tcphdr *)(mtod(m, char *) + poff); |
|
4103 tcp->th_sum = 0; 4104 /* 4105 * Broadcom controllers uses different descriptor format for 4106 * TSO depending on ASIC revision. Due to TSO-capable firmware 4107 * license issue and lower performance of firmware based TSO 4108 * we only support hardware based TSO which is applicable for 4109 * BCM5755 or newer controllers. Hardware based TSO uses 11 4110 * bits to store MSS and upper 5 bits are used to store IP/TCP --- 1495 unchanged lines hidden --- | 4105 tcp->th_sum = 0; 4106 /* 4107 * Broadcom controllers uses different descriptor format for 4108 * TSO depending on ASIC revision. Due to TSO-capable firmware 4109 * license issue and lower performance of firmware based TSO 4110 * we only support hardware based TSO which is applicable for 4111 * BCM5755 or newer controllers. Hardware based TSO uses 11 4112 * bits to store MSS and upper 5 bits are used to store IP/TCP --- 1495 unchanged lines hidden --- |