Deleted Added
full compact
sfxge_tx.c (302408) sfxge_tx.c (310831)
1/*-
2 * Copyright (c) 2010-2016 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

42 *
43 * So, event queue plus label mapping to Tx queue index is:
44 * if event queue index is 0, TxQ-index = TxQ-label * [0..SFXGE_TXQ_NTYPES)
45 * else TxQ-index = SFXGE_TXQ_NTYPES + EvQ-index - 1
46 * See sfxge_get_txq_by_label() sfxge_ev.c
47 */
48
49#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2010-2016 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * This software was developed in part by Philip Paeps under contract for
6 * Solarflare Communications, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

42 *
43 * So, event queue plus label mapping to Tx queue index is:
44 * if event queue index is 0, TxQ-index = TxQ-label * [0..SFXGE_TXQ_NTYPES)
45 * else TxQ-index = SFXGE_TXQ_NTYPES + EvQ-index - 1
46 * See sfxge_get_txq_by_label() sfxge_ev.c
47 */
48
49#include <sys/cdefs.h>
50__FBSDID("$FreeBSD: stable/11/sys/dev/sfxge/sfxge_tx.c 301607 2016-06-08 13:14:52Z arybchik $");
50__FBSDID("$FreeBSD: stable/11/sys/dev/sfxge/sfxge_tx.c 310831 2016-12-30 17:26:19Z arybchik $");
51
52#include "opt_rss.h"
53
54#include <sys/param.h>
55#include <sys/malloc.h>
56#include <sys/mbuf.h>
57#include <sys/smp.h>
58#include <sys/socket.h>

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

833 * TX and RX parts of the flow to the same CPU
834 */
835 if (rss_m2bucket(m, &bucket_id) == 0)
836 index = bucket_id % (sc->txq_count - (SFXGE_TXQ_NTYPES - 1));
837#else
838 /* check if flowid is set */
839 if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
840 uint32_t hash = m->m_pkthdr.flowid;
51
52#include "opt_rss.h"
53
54#include <sys/param.h>
55#include <sys/malloc.h>
56#include <sys/mbuf.h>
57#include <sys/smp.h>
58#include <sys/socket.h>

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

833 * TX and RX parts of the flow to the same CPU
834 */
835 if (rss_m2bucket(m, &bucket_id) == 0)
836 index = bucket_id % (sc->txq_count - (SFXGE_TXQ_NTYPES - 1));
837#else
838 /* check if flowid is set */
839 if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
840 uint32_t hash = m->m_pkthdr.flowid;
841 uint32_t idx = hash % nitems(sc->rx_indir_table);
841
842
842 index = sc->rx_indir_table[hash % SFXGE_RX_SCALE_MAX];
843 index = sc->rx_indir_table[idx];
843 }
844#endif
845#if SFXGE_TX_PARSE_EARLY
846 if (m->m_pkthdr.csum_flags & CSUM_TSO)
847 sfxge_parse_tx_packet(m);
848#endif
849 txq = sc->txq[SFXGE_TXQ_IP_TCP_UDP_CKSUM + index];
850 } else if (m->m_pkthdr.csum_flags & CSUM_DELAY_IP) {

--- 1156 unchanged lines hidden ---
844 }
845#endif
846#if SFXGE_TX_PARSE_EARLY
847 if (m->m_pkthdr.csum_flags & CSUM_TSO)
848 sfxge_parse_tx_packet(m);
849#endif
850 txq = sc->txq[SFXGE_TXQ_IP_TCP_UDP_CKSUM + index];
851 } else if (m->m_pkthdr.csum_flags & CSUM_DELAY_IP) {

--- 1156 unchanged lines hidden ---