From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2846A04B8; Tue, 5 May 2020 16:56:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 669BF1D160; Tue, 5 May 2020 16:56:53 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id DDC861D15E for ; Tue, 5 May 2020 16:56:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588690611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=ug+fXK8/lQ2MqDmBI4FiFpONwG2pxxe+5us02BKgUvA=; b=Po5iS/DrJNTz0m4aB58/j1O1aokbqSHx3U1PnC8intnkJUYE7T/RTZjrx9x+eDpgV0WamO K03QlXTmj3DAHnS7yfagl4shWGAH5g2IMlCovAai1obqyuKdW6GdZZJ9GvF0JBakfiGGfr rUVlohqH3c3HdOYo9B/R4Dr0HyWNoyg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-35-7AYGTNxwOlig3QnzzjOVmQ-1; Tue, 05 May 2020 10:56:49 -0400 X-MC-Unique: 7AYGTNxwOlig3QnzzjOVmQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D4411005510; Tue, 5 May 2020 14:56:48 +0000 (UTC) Received: from [10.33.36.238] (unknown [10.33.36.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id A135160BF4; Tue, 5 May 2020 14:56:46 +0000 (UTC) To: Ajit Khaparde , dev@dpdk.org Cc: Randy Schacher , Peter Spreadborough References: <20200505040337.34463-1-ajit.khaparde@broadcom.com> From: Kevin Traynor Autocrypt: addr=ktraynor@redhat.com; keydata= mQINBF2J2awBEADUEPNhgNI+nJNgiTAUcw4YIgVXEoHlsNPyyzG1BEXkWXALy0Y3fNTiw6+r ltWDkF9jzL9kfkecgQ67itGfk1OaBXgSGKuw1PUpxAwX2Bi76LAR6M5OsyGM9TSVVQwARalz hMwRBIZPzPc7or6Pw7jAOJ8SQGJ1Zlp1YJCjrvpe87V1tH/LY8Wnxn/EuoseFmWILAQZAtYS tGjcrAgYn3SPMLR1B0BP5bTBY06vWQjiufH8drenfDnMJAzuBdG1mqjnTqCjULZ3Hunv4xqZ aMnkvL/K5Tj1c12Oe4930EE53LrXIBUltRg5mBudSWHnC7twjH0082HH9f963Z/2UI63SFIT iUvRvAzJYytgy7XnWLQ0+goZBADKYfolOuC0H8VgCaux8u8KFF28Dy+N6TV2KI58jTlyg1Zu l7QwykZpnOkJFiy37Gfbu3YEOzO72cP/S7/A+zvuqkxi63jyEkd+FY99vLt/HN2MUZwRmKDw UPbLkmrs8WU01/POVsqDcfvz7vu2St8hqqTiSIdQGS2zyTKB2/DvPSM3jws3udkIYSuhn+X4 QBiV6lkVZ7DSE6a065gnAauAql+b32Eymy+xnG5jCt1tR+0Cp2VZYCR9OU2gmomUKBDoX/He pSgED01CqYPNjN+TddirwmQX7ep4DtXc8FWvv2g/pq9WZFQk2QARAQABtCNLZXZpbiBUcmF5 bm9yIDxrdHJheW5vckByZWRoYXQuY29tPokCTgQTAQgAOBYhBAoiOaH51tHF7VYtEI9CINER a+yJBQJdidmsAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEI9CINERa+yJoxIP/3VF 2TIgW4ckxhRFCvFu/606bnvCPie88ake4uWVWMAWwcMc4fKEltR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uhaDXhF3GfW+5W/x wAg7Qg3w00ASsb/XTHBIhMnenKDfS7ihtQA8SacwX8ySdxb+15XPyiplM979qBQ0mhnilulm MIJzEf/JxoYR5huuj4f1PFqqrsP06Dl+YGB7dQZp3IKggS5c3/TAynARRg9N89UsDXNtp7X0 tgIPFF5k6fnHE0J5O64GYHeTqN/1aE6dAEOV9WrGzQAJxU9ipikb8jKAWXzLewRIKGmoPcRZ WdB0NmIjmQARAQABiQI2BBgBCAAgFiEECiI5ofnW0cXtVi0Qj0Ig0RFr7IkFAl2J2awCGwwA CgkQj0Ig0RFr7IkkORAAl/NbX93WK5MEoRw7/DaPTo/Lo6Pj1XMeSqGyACigHK/452UDvlEH NjNJMzYYrNIjMtEmN9VVCfjT38CSca7mpGQVwchc0mC7QSPAETLCS+UacVf/Kwxz5FfkEUUw UT7A+uyVOIgW3d9ldlRzkHA2czonSSgTQU+i2g6DM4ha+BuQb4byAXH6HQHt/Zh1J64z0ohH v6iGsCzCY/sMWF8+LEGSnzMGRCLiiwSF0vJBHbzWK68fANaF4gBV0Z/+6tQRFN7YMhj/INmk qgvHj1ZzHFNtirjMGPRxoZs51YoLQM/aBPxKrnmXThx1ufH+0L6sGmFTugiDt0XSEkC5reH7 a+VhQ1VTFFQrClA8NmDSPzFeuhru4ryaaDHO+uEB16cNHxHrQtlP/2hts2JM5lwkZRWJ5A57 h8eDEIK5be47T85NVHfuTaboNRmgg1HygVejhGUtt69u/0MVRg/roUTa0FyEbNsvz4qAecyW yWzMcVrcGJDQLC9JLKEpoyUF6gdTKaiDL2Vao4+XRIA3Y57b6MO35a3HuzAv7+i5Z0mnDEJO XxXqTOmKYpMIGexzM/PtuA0712sT1abG9tAJ17ao/B7cqMW5IkKkalemFbWfI2unns4Papvo tk9igVqyp6EJDU98z5TJioCVojwK2laDaoIjTJk9YYv3iwCsqPd5feU= Message-ID: Date: Tue, 5 May 2020 15:56:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200505040337.34463-1-ajit.khaparde@broadcom.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix build with gcc10 default fno-common X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 05/05/2020 05:03, Ajit Khaparde wrote: > From: Randy Schacher >=20 > Remove the defensive compile-time checker macro. >=20 Thanks Ajit/Randy. This removes the error for bnxt on my Fedora 32 system. Was chatting to David and he suggest if 'static __rte_used' could be added to the macro as an alternative. Checked and it [1] is working also. It seems like a cleaner fix for the specific issue to me. If you have an additional reason to remove the compile checks, it could be a separate patch or a comment added to the commit message. [1] --- a/drivers/net/bnxt/tf_core/hwrm_tf.h +++ b/drivers/net/bnxt/tf_core/hwrm_tf.h @@ -40,5 +40,5 @@ typedef enum tf_subtype { #define __BUILD_BUG_ON(condition, line) \ - char p##line[(condition) ? 1 : -1] + static __rte_unused char p##line[(condition) ? 1 : -1] > Bugzilla ID: 468 > Fixes: 8430a8b841c8 ("net/bnxt: add initial TruFlow core session open") > Signed-off-by: Randy Schacher > Reviewed-by: Peter Spreadborough > Reviewed-by: Ajit Khaparde > --- > drivers/net/bnxt/tf_core/hwrm_tf.h | 24 ------------------------ > 1 file changed, 24 deletions(-) >=20 > diff --git a/drivers/net/bnxt/tf_core/hwrm_tf.h b/drivers/net/bnxt/tf_cor= e/hwrm_tf.h > index 6299d588a..341909573 100644 > --- a/drivers/net/bnxt/tf_core/hwrm_tf.h > +++ b/drivers/net/bnxt/tf_core/hwrm_tf.h > @@ -38,11 +38,6 @@ typedef enum tf_subtype { > /* u32_t=09tlv_resp_value[170]; */ > #define TF_MAX_RESP_SIZE 680 > =20 > -#define __BUILD_BUG_ON(condition, line) \ > -=09char p##line[(condition) ? 1 : -1] > -#define _BUILD_BUG_ON(condition, line) __BUILD_BUG_ON(condition, line) > -#define BUILD_BUG_ON(condition) _BUILD_BUG_ON(condition, __LINE__) > - > /* Use this to allocate/free any kind of > * indexes over HWRM and fill the parms pointer > */ > @@ -98,7 +93,6 @@ typedef struct tf_session_attach_input { > =09/* Session Name */ > =09char=09=09=09=09 session_name[TF_SESSION_NAME_MAX]; > } tf_session_attach_input_t, *ptf_session_attach_input_t; > -BUILD_BUG_ON(sizeof(tf_session_attach_input_t) <=3D TF_MAX_REQ_SIZE); > =20 > /* Input params for session resource HW qcaps */ > typedef struct tf_session_hw_resc_qcaps_input { > @@ -111,7 +105,6 @@ typedef struct tf_session_hw_resc_qcaps_input { > =09/* When set to 1, indicates the query apply to TX */ > #define TF_SESSION_HW_RESC_QCAPS_INPUT_FLAGS_DIR_TX=09 (0x1) > } tf_session_hw_resc_qcaps_input_t, *ptf_session_hw_resc_qcaps_input_t; > -BUILD_BUG_ON(sizeof(tf_session_hw_resc_qcaps_input_t) <=3D TF_MAX_REQ_SI= ZE); > =20 > /* Output params for session resource HW qcaps */ > typedef struct tf_session_hw_resc_qcaps_output { > @@ -216,7 +209,6 @@ typedef struct tf_session_hw_resc_qcaps_output { > =09/* Maximum non-guaranteed number of LAG table entries */ > =09uint16_t=09=09=09 lag_tbl_entries_max; > } tf_session_hw_resc_qcaps_output_t, *ptf_session_hw_resc_qcaps_output_t= ; > -BUILD_BUG_ON(sizeof(tf_session_hw_resc_qcaps_output_t) <=3D TF_MAX_RESP_= SIZE); > =20 > /* Input params for session resource HW alloc */ > typedef struct tf_session_hw_resc_alloc_input { > @@ -275,7 +267,6 @@ typedef struct tf_session_hw_resc_alloc_input { > =09/* Number of LAG table entries to be allocated */ > =09uint16_t=09=09=09 num_lag_tbl_entries; > } tf_session_hw_resc_alloc_input_t, *ptf_session_hw_resc_alloc_input_t; > -BUILD_BUG_ON(sizeof(tf_session_hw_resc_alloc_input_t) <=3D TF_MAX_REQ_SI= ZE); > =20 > /* Output params for session resource HW alloc */ > typedef struct tf_session_hw_resc_alloc_output { > @@ -368,7 +359,6 @@ typedef struct tf_session_hw_resc_alloc_output { > =09/* Number of LAG table entries allocated */ > =09uint16_t=09=09=09 lag_tbl_entries_stride; > } tf_session_hw_resc_alloc_output_t, *ptf_session_hw_resc_alloc_output_t= ; > -BUILD_BUG_ON(sizeof(tf_session_hw_resc_alloc_output_t) <=3D TF_MAX_RESP_= SIZE); > =20 > /* Input params for session resource HW free */ > typedef struct tf_session_hw_resc_free_input { > @@ -471,7 +461,6 @@ typedef struct tf_session_hw_resc_free_input { > =09/* Number of LAG table entries allocated */ > =09uint16_t=09=09=09 lag_tbl_entries_stride; > } tf_session_hw_resc_free_input_t, *ptf_session_hw_resc_free_input_t; > -BUILD_BUG_ON(sizeof(tf_session_hw_resc_free_input_t) <=3D TF_MAX_REQ_SIZ= E); > =20 > /* Input params for session resource HW flush */ > typedef struct tf_session_hw_resc_flush_input { > @@ -574,7 +563,6 @@ typedef struct tf_session_hw_resc_flush_input { > =09/* Number of LAG table entries allocated */ > =09uint16_t=09=09=09 lag_tbl_entries_stride; > } tf_session_hw_resc_flush_input_t, *ptf_session_hw_resc_flush_input_t; > -BUILD_BUG_ON(sizeof(tf_session_hw_resc_flush_input_t) <=3D TF_MAX_REQ_SI= ZE); > =20 > /* Input params for session resource SRAM qcaps */ > typedef struct tf_session_sram_resc_qcaps_input { > @@ -587,7 +575,6 @@ typedef struct tf_session_sram_resc_qcaps_input { > =09/* When set to 1, indicates the query apply to TX */ > #define TF_SESSION_SRAM_RESC_QCAPS_INPUT_FLAGS_DIR_TX=09 (0x1) > } tf_session_sram_resc_qcaps_input_t, *ptf_session_sram_resc_qcaps_input= _t; > -BUILD_BUG_ON(sizeof(tf_session_sram_resc_qcaps_input_t) <=3D TF_MAX_REQ_= SIZE); > =20 > /* Output params for session resource SRAM qcaps */ > typedef struct tf_session_sram_resc_qcaps_output { > @@ -654,7 +641,6 @@ typedef struct tf_session_sram_resc_qcaps_output { > =09/* Maximum non-guaranteed number of NAT D_IPV4 */ > =09uint16_t=09=09=09 nat_d_ipv4_max; > } tf_session_sram_resc_qcaps_output_t, *ptf_session_sram_resc_qcaps_outp= ut_t; > -BUILD_BUG_ON(sizeof(tf_session_sram_resc_qcaps_output_t) <=3D TF_MAX_RES= P_SIZE); > =20 > /* Input params for session resource SRAM alloc */ > typedef struct tf_session_sram_resc_alloc_input { > @@ -695,7 +681,6 @@ typedef struct tf_session_sram_resc_alloc_input { > =09/* Number of NAT destination IPV4 addresses to be allocated */ > =09uint16_t=09=09=09 num_nat_d_ipv4; > } tf_session_sram_resc_alloc_input_t, *ptf_session_sram_resc_alloc_input= _t; > -BUILD_BUG_ON(sizeof(tf_session_sram_resc_alloc_input_t) <=3D TF_MAX_REQ_= SIZE); > =20 > /* Output params for session resource SRAM alloc */ > typedef struct tf_session_sram_resc_alloc_output { > @@ -757,7 +742,6 @@ typedef struct tf_session_sram_resc_alloc_output { > =09/* Number of NAT destination IPV4 addresses allocated */ > =09uint16_t=09=09=09 nat_d_ipv4_stride; > } tf_session_sram_resc_alloc_output_t, *ptf_session_sram_resc_alloc_outp= ut_t; > -BUILD_BUG_ON(sizeof(tf_session_sram_resc_alloc_output_t) <=3D TF_MAX_RES= P_SIZE); > =20 > /* Input params for session resource SRAM free */ > typedef struct tf_session_sram_resc_free_input { > @@ -825,7 +809,6 @@ typedef struct tf_session_sram_resc_free_input { > =09/* Number of NAT destination IPV4 addresses allocated */ > =09uint16_t=09=09=09 nat_d_ipv4_stride; > } tf_session_sram_resc_free_input_t, *ptf_session_sram_resc_free_input_t= ; > -BUILD_BUG_ON(sizeof(tf_session_sram_resc_free_input_t) <=3D TF_MAX_REQ_S= IZE); > =20 > /* Input params for session resource SRAM flush */ > typedef struct tf_session_sram_resc_flush_input { > @@ -893,7 +876,6 @@ typedef struct tf_session_sram_resc_flush_input { > =09/* Number of NAT destination IPV4 addresses allocated */ > =09uint16_t=09=09=09 nat_d_ipv4_stride; > } tf_session_sram_resc_flush_input_t, *ptf_session_sram_resc_flush_input= _t; > -BUILD_BUG_ON(sizeof(tf_session_sram_resc_flush_input_t) <=3D TF_MAX_REQ_= SIZE); > =20 > /* Input params for table type set */ > typedef struct tf_tbl_type_set_input { > @@ -914,7 +896,6 @@ typedef struct tf_tbl_type_set_input { > =09/* Index to set */ > =09uint32_t=09=09=09 index; > } tf_tbl_type_set_input_t, *ptf_tbl_type_set_input_t; > -BUILD_BUG_ON(sizeof(tf_tbl_type_set_input_t) <=3D TF_MAX_REQ_SIZE); > =20 > /* Input params for table type get */ > typedef struct tf_tbl_type_get_input { > @@ -931,7 +912,6 @@ typedef struct tf_tbl_type_get_input { > =09/* Index to get */ > =09uint32_t=09=09=09 index; > } tf_tbl_type_get_input_t, *ptf_tbl_type_get_input_t; > -BUILD_BUG_ON(sizeof(tf_tbl_type_get_input_t) <=3D TF_MAX_REQ_SIZE); > =20 > /* Output params for table type get */ > typedef struct tf_tbl_type_get_output { > @@ -940,7 +920,6 @@ typedef struct tf_tbl_type_get_output { > =09/* Data read */ > =09uint8_t=09=09=09 data[TF_BULK_RECV]; > } tf_tbl_type_get_output_t, *ptf_tbl_type_get_output_t; > -BUILD_BUG_ON(sizeof(tf_tbl_type_get_output_t) <=3D TF_MAX_RESP_SIZE); > =20 > /* Input params for EM internal rule insert */ > typedef struct tf_em_internal_insert_input { > @@ -963,7 +942,6 @@ typedef struct tf_em_internal_insert_input { > =09/* number of bits in em_key */ > =09uint16_t=09=09=09 em_key_bitlen; > } tf_em_internal_insert_input_t, *ptf_em_internal_insert_input_t; > -BUILD_BUG_ON(sizeof(tf_em_internal_insert_input_t) <=3D TF_MAX_REQ_SIZE)= ; > =20 > /* Output params for EM internal rule insert */ > typedef struct tf_em_internal_insert_output { > @@ -972,7 +950,6 @@ typedef struct tf_em_internal_insert_output { > =09/* EM record offset 0~3 */ > =09uint8_t=09=09=09 rptr_entry; > } tf_em_internal_insert_output_t, *ptf_em_internal_insert_output_t; > -BUILD_BUG_ON(sizeof(tf_em_internal_insert_output_t) <=3D TF_MAX_RESP_SIZ= E); > =20 > /* Input params for EM INTERNAL rule delete */ > typedef struct tf_em_internal_delete_input { > @@ -991,6 +968,5 @@ typedef struct tf_em_internal_delete_input { > =09/* number of bits in em_key */ > =09uint16_t=09=09=09 em_key_bitlen; > } tf_em_internal_delete_input_t, *ptf_em_internal_delete_input_t; > -BUILD_BUG_ON(sizeof(tf_em_internal_delete_input_t) <=3D TF_MAX_REQ_SIZE)= ; > =20 > #endif /* _HWRM_TF_H_ */ >=20