Deleted Added
full compact
ef10_tx.c (293814) ef10_tx.c (293891)
1/*-
2 * Copyright (c) 2012-2015 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

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

24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012-2015 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

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

24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_tx.c 293814 2016-01-13 07:25:51Z arybchik $");
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_tx.c 293891 2016-01-14 09:05:51Z arybchik $");
33
34#include "efx.h"
35#include "efx_impl.h"
36
37
38#if EFSYS_OPT_HUNTINGTON
39
40#if EFSYS_OPT_QSTATS

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

82 req.emr_out_buf = payload;
83 req.emr_out_length = MC_CMD_INIT_TXQ_OUT_LEN;
84
85 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_SIZE, size);
86 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_TARGET_EVQ, target_evq);
87 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_LABEL, label);
88 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_INSTANCE, instance);
89
33
34#include "efx.h"
35#include "efx_impl.h"
36
37
38#if EFSYS_OPT_HUNTINGTON
39
40#if EFSYS_OPT_QSTATS

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

82 req.emr_out_buf = payload;
83 req.emr_out_length = MC_CMD_INIT_TXQ_OUT_LEN;
84
85 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_SIZE, size);
86 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_TARGET_EVQ, target_evq);
87 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_LABEL, label);
88 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_INSTANCE, instance);
89
90 MCDI_IN_POPULATE_DWORD_6(req, INIT_TXQ_IN_FLAGS,
90 MCDI_IN_POPULATE_DWORD_7(req, INIT_TXQ_IN_FLAGS,
91 INIT_TXQ_IN_FLAG_BUFF_MODE, 0,
92 INIT_TXQ_IN_FLAG_IP_CSUM_DIS,
93 (flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1,
94 INIT_TXQ_IN_FLAG_TCP_CSUM_DIS,
95 (flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1,
91 INIT_TXQ_IN_FLAG_BUFF_MODE, 0,
92 INIT_TXQ_IN_FLAG_IP_CSUM_DIS,
93 (flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1,
94 INIT_TXQ_IN_FLAG_TCP_CSUM_DIS,
95 (flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1,
96 INIT_TXQ_EXT_IN_FLAG_TSOV2_EN, (flags & EFX_TXQ_FATSOV2) ? 1 : 0,
96 INIT_TXQ_IN_FLAG_TCP_UDP_ONLY, 0,
97 INIT_TXQ_IN_CRC_MODE, 0,
98 INIT_TXQ_IN_FLAG_TIMESTAMP, 0);
99
100 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_OWNER_ID, 0);
101 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_PORT_ID, EVB_PORT_ID_ASSIGNED);
102
103 dma_addr = MCDI_IN2(req, efx_qword_t, INIT_TXQ_IN_DMA_ADDR);

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

584 ESF_DZ_TX_OPTION_TYPE,
585 ESE_DZ_TX_OPTION_DESC_TSO,
586 ESF_DZ_TX_TSO_TCP_FLAGS, tcp_flags,
587 ESF_DZ_TX_TSO_IP_ID, ipv4_id,
588 ESF_DZ_TX_TSO_TCP_SEQNO, tcp_seq);
589}
590
591 void
97 INIT_TXQ_IN_FLAG_TCP_UDP_ONLY, 0,
98 INIT_TXQ_IN_CRC_MODE, 0,
99 INIT_TXQ_IN_FLAG_TIMESTAMP, 0);
100
101 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_OWNER_ID, 0);
102 MCDI_IN_SET_DWORD(req, INIT_TXQ_IN_PORT_ID, EVB_PORT_ID_ASSIGNED);
103
104 dma_addr = MCDI_IN2(req, efx_qword_t, INIT_TXQ_IN_DMA_ADDR);

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

585 ESF_DZ_TX_OPTION_TYPE,
586 ESE_DZ_TX_OPTION_DESC_TSO,
587 ESF_DZ_TX_TSO_TCP_FLAGS, tcp_flags,
588 ESF_DZ_TX_TSO_IP_ID, ipv4_id,
589 ESF_DZ_TX_TSO_TCP_SEQNO, tcp_seq);
590}
591
592 void
593ef10_tx_qdesc_tso2_create(
594 __in efx_txq_t *etp,
595 __in uint16_t ipv4_id,
596 __in uint32_t tcp_seq,
597 __in uint16_t tcp_mss,
598 __out_ecount(count) efx_desc_t *edp,
599 __in int count)
600{
601 EFSYS_PROBE4(tx_desc_tso2_create, unsigned int, etp->et_index,
602 uint16_t, ipv4_id, uint32_t, tcp_seq,
603 uint16_t, tcp_mss);
604
605 EFSYS_ASSERT(count >= EFX_TX_FATSOV2_OPT_NDESCS);
606
607 EFX_POPULATE_QWORD_5(edp[0].ed_eq,
608 ESF_DZ_TX_DESC_IS_OPT, 1,
609 ESF_DZ_TX_OPTION_TYPE,
610 ESE_DZ_TX_OPTION_DESC_TSO,
611 ESF_DZ_TX_TSO_OPTION_TYPE,
612 ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A,
613 ESF_DZ_TX_TSO_IP_ID, ipv4_id,
614 ESF_DZ_TX_TSO_TCP_SEQNO, tcp_seq);
615 EFX_POPULATE_QWORD_4(edp[1].ed_eq,
616 ESF_DZ_TX_DESC_IS_OPT, 1,
617 ESF_DZ_TX_OPTION_TYPE,
618 ESE_DZ_TX_OPTION_DESC_TSO,
619 ESF_DZ_TX_TSO_OPTION_TYPE,
620 ESE_DZ_TX_TSO_OPTION_DESC_FATSO2B,
621 ESF_DZ_TX_TSO_TCP_MSS, tcp_mss);
622}
623
624 void
592ef10_tx_qdesc_vlantci_create(
593 __in efx_txq_t *etp,
594 __in uint16_t tci,
595 __out efx_desc_t *edp)
596{
597 EFSYS_PROBE2(tx_desc_vlantci_create, unsigned int, etp->et_index,
598 uint16_t, tci);
599

--- 78 unchanged lines hidden ---
625ef10_tx_qdesc_vlantci_create(
626 __in efx_txq_t *etp,
627 __in uint16_t tci,
628 __out efx_desc_t *edp)
629{
630 EFSYS_PROBE2(tx_desc_vlantci_create, unsigned int, etp->et_index,
631 uint16_t, tci);
632

--- 78 unchanged lines hidden ---