X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fsfc_ef10.h;h=e9bb72e28b295e72b3e553c2bc452bc55295adc8;hb=6764c3bbdfa2397c745c9b665411f1cd2ed5f06a;hp=7bca2199e3dc0bd6615485bf42eb952b4268bfce;hpb=31113761e2f3aa90bf746a1fd26e9c686f6b34bc;p=dpdk.git diff --git a/drivers/net/sfc/sfc_ef10.h b/drivers/net/sfc/sfc_ef10.h index 7bca2199e3..e9bb72e28b 100644 --- a/drivers/net/sfc/sfc_ef10.h +++ b/drivers/net/sfc/sfc_ef10.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause * - * Copyright(c) 2019-2020 Xilinx, Inc. + * Copyright(c) 2019-2021 Xilinx, Inc. * Copyright(c) 2017-2019 Solarflare Communications Inc. * * This software was jointly developed between OKTET Labs (under contract @@ -22,6 +22,15 @@ extern "C" { #define SFC_EF10_EV_QCLEAR_MASK (~(SFC_EF10_EV_PER_CACHE_LINE - 1)) +/* + * Use simple libefx-based implementation of the + * sfc_ef10_ev_qclear_cache_line() if SSE2 is not available + * since optimized implementation uses __m128i intrinsics. + */ +#ifndef __SSE2__ +#define SFC_EF10_EV_QCLEAR_USE_EFX +#endif + #if defined(SFC_EF10_EV_QCLEAR_USE_EFX) static inline void sfc_ef10_ev_qclear_cache_line(void *ptr) @@ -90,7 +99,7 @@ sfc_ef10_ev_present(const efx_qword_t ev) static inline void sfc_ef10_rx_qpush(volatile void *doorbell, unsigned int added, - unsigned int ptr_mask) + unsigned int ptr_mask, uint32_t *dbell_counter) { efx_dword_t dword; @@ -109,6 +118,7 @@ sfc_ef10_rx_qpush(volatile void *doorbell, unsigned int added, * operations that follow it (i.e. doorbell write). */ rte_write32(dword.ed_u32[0], doorbell); + (*dbell_counter)++; } static inline void