Deleted Added
full compact
t4_sge.c (256794) t4_sge.c (259142)
1/*-
2 * Copyright (c) 2011 Chelsio Communications, Inc.
3 * All rights reserved.
4 * Written by: Navdeep Parhar <np@FreeBSD.org>
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:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2011 Chelsio Communications, Inc.
3 * All rights reserved.
4 * Written by: Navdeep Parhar <np@FreeBSD.org>
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:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: stable/10/sys/dev/cxgbe/t4_sge.c 256794 2013-10-20 16:45:01Z np $");
29__FBSDID("$FreeBSD: stable/10/sys/dev/cxgbe/t4_sge.c 259142 2013-12-09 22:40:22Z np $");
30
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#include <sys/types.h>
35#include <sys/mbuf.h>
36#include <sys/socket.h>
37#include <sys/kernel.h>

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

1386 return ((struct mbuf *)(ptr & ~(MJUMPAGESIZE - 1)));
1387}
1388
1389static int
1390rxb_free(struct mbuf *m, void *arg1, void *arg2)
1391{
1392 uma_zone_t zone = arg1;
1393 caddr_t cl = arg2;
30
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#include <sys/types.h>
35#include <sys/mbuf.h>
36#include <sys/socket.h>
37#include <sys/kernel.h>

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

1386 return ((struct mbuf *)(ptr & ~(MJUMPAGESIZE - 1)));
1387}
1388
1389static int
1390rxb_free(struct mbuf *m, void *arg1, void *arg2)
1391{
1392 uma_zone_t zone = arg1;
1393 caddr_t cl = arg2;
1394#ifdef INVARIANTS
1394#ifdef notyet
1395 u_int refcount;
1396
1397 refcount = *find_buf_refcnt(cl);
1398 KASSERT(refcount == 0, ("%s: cl %p refcount is %u", __func__,
1399 cl - MSIZE, refcount));
1400#endif
1401 cl -= MSIZE;
1402 uma_zfree(zone, cl);

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

1672 rss->opcode));
1673
1674 m0->m_pkthdr.len -= fl_pktshift;
1675 m0->m_len -= fl_pktshift;
1676 m0->m_data += fl_pktshift;
1677
1678 m0->m_pkthdr.rcvif = ifp;
1679 m0->m_flags |= M_FLOWID;
1395 u_int refcount;
1396
1397 refcount = *find_buf_refcnt(cl);
1398 KASSERT(refcount == 0, ("%s: cl %p refcount is %u", __func__,
1399 cl - MSIZE, refcount));
1400#endif
1401 cl -= MSIZE;
1402 uma_zfree(zone, cl);

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

1672 rss->opcode));
1673
1674 m0->m_pkthdr.len -= fl_pktshift;
1675 m0->m_len -= fl_pktshift;
1676 m0->m_data += fl_pktshift;
1677
1678 m0->m_pkthdr.rcvif = ifp;
1679 m0->m_flags |= M_FLOWID;
1680 m0->m_pkthdr.flowid = rss->hash_val;
1680 m0->m_pkthdr.flowid = be32toh(rss->hash_val);
1681
1682 if (cpl->csum_calc && !cpl->err_vec) {
1683 if (ifp->if_capenable & IFCAP_RXCSUM &&
1684 cpl->l2info & htobe32(F_RXF_IP)) {
1685 m0->m_pkthdr.csum_flags = (CSUM_IP_CHECKED |
1686 CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
1687 rxq->rxcsum++;
1688 } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 &&

--- 2564 unchanged lines hidden ---
1681
1682 if (cpl->csum_calc && !cpl->err_vec) {
1683 if (ifp->if_capenable & IFCAP_RXCSUM &&
1684 cpl->l2info & htobe32(F_RXF_IP)) {
1685 m0->m_pkthdr.csum_flags = (CSUM_IP_CHECKED |
1686 CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
1687 rxq->rxcsum++;
1688 } else if (ifp->if_capenable & IFCAP_RXCSUM_IPV6 &&

--- 2564 unchanged lines hidden ---