Deleted Added
full compact
if_em.c (214441) if_em.c (214646)
1/******************************************************************************
2
3 Copyright (c) 2001-2010, Intel Corporation
4 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 are met:
8

--- 16 unchanged lines hidden (view full) ---

25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32******************************************************************************/
1/******************************************************************************
2
3 Copyright (c) 2001-2010, Intel Corporation
4 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 are met:
8

--- 16 unchanged lines hidden (view full) ---

25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32******************************************************************************/
33/*$FreeBSD: head/sys/dev/e1000/if_em.c 214441 2010-10-28 00:16:54Z jfv $*/
33/*$FreeBSD: head/sys/dev/e1000/if_em.c 214646 2010-11-01 20:19:25Z jfv $*/
34
35#ifdef HAVE_KERNEL_OPTION_HEADERS
36#include "opt_device_polling.h"
37#include "opt_inet.h"
38#endif
39
40#include <sys/param.h>
41#include <sys/systm.h>

--- 1719 unchanged lines hidden (view full) ---

1761 int error, do_tso, tso_desc = 0;
1762
1763 m_head = *m_headp;
1764 txd_upper = txd_lower = txd_used = txd_saved = 0;
1765 do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0);
1766 ip_off = poff = 0;
1767
1768 /*
34
35#ifdef HAVE_KERNEL_OPTION_HEADERS
36#include "opt_device_polling.h"
37#include "opt_inet.h"
38#endif
39
40#include <sys/param.h>
41#include <sys/systm.h>

--- 1719 unchanged lines hidden (view full) ---

1761 int error, do_tso, tso_desc = 0;
1762
1763 m_head = *m_headp;
1764 txd_upper = txd_lower = txd_used = txd_saved = 0;
1765 do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0);
1766 ip_off = poff = 0;
1767
1768 /*
1769 ** When doing checksum offload, it is critical to
1770 ** make sure the first mbuf has more than header,
1771 ** because that routine expects data to be present.
1772 */
1773 if ((m_head->m_pkthdr.csum_flags & CSUM_OFFLOAD) &&
1774 (m_head->m_len < ETHER_HDR_LEN + sizeof(struct ip))) {
1775 m_head = m_pullup(m_head, ETHER_HDR_LEN + sizeof(struct ip));
1776 *m_headp = m_head;
1777 if (m_head == NULL)
1778 return (ENOBUFS);
1779 }
1780
1781 /*
1782 * Intel recommends entire IP/TCP header length reside in a single
1783 * buffer. If multiple descriptors are used to describe the IP and
1784 * TCP header, each descriptor should describe one or more
1785 * complete headers; descriptors referencing only parts of headers
1786 * are not supported. If all layer headers are not coalesced into
1787 * a single buffer, each buffer should not cross a 4KB boundary,
1788 * or be larger than the maximum read request size.
1789 * Controller also requires modifing IP/TCP header to make TSO work

--- 3704 unchanged lines hidden ---
1769 * Intel recommends entire IP/TCP header length reside in a single
1770 * buffer. If multiple descriptors are used to describe the IP and
1771 * TCP header, each descriptor should describe one or more
1772 * complete headers; descriptors referencing only parts of headers
1773 * are not supported. If all layer headers are not coalesced into
1774 * a single buffer, each buffer should not cross a 4KB boundary,
1775 * or be larger than the maximum read request size.
1776 * Controller also requires modifing IP/TCP header to make TSO work

--- 3704 unchanged lines hidden ---