X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fark%2Fark_ddm.h;h=5456b4b5cc5e7e76077738d87d14df0b936fd5bd;hb=cbd5710db48d8ab45c7c8f549e6a7556fab62583;hp=de61926c3f059990b73abee88c537a482d515a81;hpb=cf18d4def295699b98838fbe5ea666eff7aeaedf;p=dpdk.git diff --git a/drivers/net/ark/ark_ddm.h b/drivers/net/ark/ark_ddm.h index de61926c3f..5456b4b5cc 100644 --- a/drivers/net/ark/ark_ddm.h +++ b/drivers/net/ark/ark_ddm.h @@ -1,34 +1,5 @@ -/*- - * BSD LICENSE - * - * Copyright (c) 2015-2017 Atomic Rules LLC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of copyright holder nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2015-2018 Atomic Rules LLC */ #ifndef _ARK_DDM_H_ @@ -48,7 +19,7 @@ /* struct defining Tx meta data -- fixed in FPGA -- 16 bytes */ struct ark_tx_meta { uint64_t physaddr; - uint32_t delta_ns; + uint32_t user1; uint16_t data_len; /* of this MBUF */ #define ARK_DDM_EOP 0x01 #define ARK_DDM_SOP 0x02 @@ -63,7 +34,10 @@ struct ark_tx_meta { * structs will never be instantiated in ram memory */ #define ARK_DDM_CFG 0x0000 -#define ARK_DDM_CONST 0xfacecafe +/* Set unique HW ID for hardware version */ +#define ARK_DDM_CONST2 (0x324d4444) +#define ARK_DDM_CONST1 (0xfacecafe) + struct ark_ddm_cfg_t { uint32_t r0; volatile uint32_t tlp_stats_clear; @@ -127,7 +101,7 @@ struct ark_ddm_cpld_ps_t { #define ARK_DDM_SETUP 0x00e0 struct ark_ddm_setup_t { - phys_addr_t cons_write_index_addr; + rte_iova_t cons_write_index_addr; uint32_t write_index_interval; /* 4ns each */ volatile uint32_t cons_index; }; @@ -165,7 +139,7 @@ void ark_ddm_start(struct ark_ddm_t *ddm); int ark_ddm_stop(struct ark_ddm_t *ddm, const int wait); void ark_ddm_reset(struct ark_ddm_t *ddm); void ark_ddm_stats_reset(struct ark_ddm_t *ddm); -void ark_ddm_setup(struct ark_ddm_t *ddm, phys_addr_t cons_addr, +void ark_ddm_setup(struct ark_ddm_t *ddm, rte_iova_t cons_addr, uint32_t interval); void ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg); void ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg);