xiaoxiang781216 commented on code in PR #4012:
URL: https://github.com/apache/nuttx-apps/pull/4012#discussion_r4533042628


##########
netutils/ngtcp2/Kconfig:
##########
@@ -0,0 +1,20 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config NETUTILS_QUIC

Review Comment:
   should we name it ngtcp2 instead quic?



##########
netutils/ngtcp2/CMakeLists.txt:
##########
@@ -0,0 +1,118 @@
+# 
##############################################################################
+# apps/netutils/ngtcp2/CMakeLists.txt
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+if(CONFIG_NETUTILS_QUIC)
+  set(NGTCP2_DIR ${CMAKE_CURRENT_LIST_DIR}/ngtcp2)
+  set(NGTCP2_VERSION ${CONFIG_NETUTILS_QUIC_VERSION})
+
+  if(NOT EXISTS ${NGTCP2_DIR})
+    set(NGTCP2_URL https://github.com/ngtcp2/ngtcp2/releases/download)
+    FetchContent_Declare(
+      ngtcp2_fetch
+      URL ${NGTCP2_URL}/v${NGTCP2_VERSION}/ngtcp2-${NGTCP2_VERSION}.tar.bz2
+      SOURCE_DIR ${NGTCP2_DIR}
+      BINARY_DIR ${CMAKE_BINARY_DIR}/apps/netutils/ngtcp2
+      DOWNLOAD_NO_PROGRESS true
+      TIMEOUT 30)
+
+    FetchContent_GetProperties(ngtcp2_fetch)
+
+    if(NOT ngtcp2_fetch_POPULATED)
+      FetchContent_Populate(ngtcp2_fetch)
+    endif()
+  endif()
+
+  set(NGTCP2_INCDIR
+      ${CMAKE_CURRENT_LIST_DIR}
+      ${NGTCP2_DIR}/lib
+      ${NGTCP2_DIR}/lib/includes
+      ${NGTCP2_DIR}/crypto
+      ${NGTCP2_DIR}/crypto/includes
+      ${NUTTX_APPS_DIR}/../nuttx/include
+      ${NUTTX_APPS_DIR}/crypto/wolfssl
+      ${NUTTX_APPS_DIR}/crypto/wolfssl/wolfssl
+      ${NUTTX_APPS_DIR}/crypto/wolfssl/openssl
+      ${NUTTX_APPS_DIR}/include)
+
+  set(NGTCP2_FLAGS
+      -Wno-undef
+      -mlongcalls

Review Comment:
   why add -mlongcalls



##########
netutils/ngtcp2/Makefile:
##########
@@ -0,0 +1,120 @@
+# 
##############################################################################
+# apps/netutils/ngtcp2/Makefile
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+include $(APPDIR)/Make.defs
+
+NGTCP2_UNPACKNAME = ngtcp2
+NGTCP2_VERSION = $(patsubst "%",%,$(strip $(CONFIG_NETUTILS_QUIC_VERSION)))
+
+# ngtcp2 library
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pkt.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conv.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_str.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_vec.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_buf.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conn.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_mem.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pq.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_map.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rob.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ppe.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_crypto.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_err.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_range.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_acktr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rtb.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_frame_chain.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_strm.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_idtr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_gaptr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ringbuf.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_log.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_qlog.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_cid.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ksl.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_cc.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_bbr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_addr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_path.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pv.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pmtud.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_version.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rst.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_window_filter.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_opl.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_balloc.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_objalloc.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_unreachable.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_transport_params.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_settings.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_callbacks.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_dcidtr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pcg.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ratelim.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conn_info.c
+
+# ngtcp2 crypto layer
+CSRCS += $(NGTCP2_UNPACKNAME)/crypto/shared.c
+CSRCS += $(NGTCP2_UNPACKNAME)/crypto/wolfssl/wolfssl.c
+
+# Compilation flags
+CFLAGS = -Wno-undef -mlongcalls

Review Comment:
   ```suggestion
   CFLAGS = -Wno-undef
   ```



##########
netutils/ngtcp2/CMakeLists.txt:
##########
@@ -0,0 +1,118 @@
+# 
##############################################################################
+# apps/netutils/ngtcp2/CMakeLists.txt
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+if(CONFIG_NETUTILS_QUIC)
+  set(NGTCP2_DIR ${CMAKE_CURRENT_LIST_DIR}/ngtcp2)
+  set(NGTCP2_VERSION ${CONFIG_NETUTILS_QUIC_VERSION})
+
+  if(NOT EXISTS ${NGTCP2_DIR})
+    set(NGTCP2_URL https://github.com/ngtcp2/ngtcp2/releases/download)
+    FetchContent_Declare(
+      ngtcp2_fetch
+      URL ${NGTCP2_URL}/v${NGTCP2_VERSION}/ngtcp2-${NGTCP2_VERSION}.tar.bz2
+      SOURCE_DIR ${NGTCP2_DIR}
+      BINARY_DIR ${CMAKE_BINARY_DIR}/apps/netutils/ngtcp2
+      DOWNLOAD_NO_PROGRESS true
+      TIMEOUT 30)
+
+    FetchContent_GetProperties(ngtcp2_fetch)
+
+    if(NOT ngtcp2_fetch_POPULATED)
+      FetchContent_Populate(ngtcp2_fetch)
+    endif()
+  endif()
+
+  set(NGTCP2_INCDIR
+      ${CMAKE_CURRENT_LIST_DIR}
+      ${NGTCP2_DIR}/lib
+      ${NGTCP2_DIR}/lib/includes
+      ${NGTCP2_DIR}/crypto
+      ${NGTCP2_DIR}/crypto/includes
+      ${NUTTX_APPS_DIR}/../nuttx/include

Review Comment:
   remove too



##########
netutils/ngtcp2/Makefile:
##########
@@ -0,0 +1,120 @@
+# 
##############################################################################
+# apps/netutils/ngtcp2/Makefile
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+include $(APPDIR)/Make.defs
+
+NGTCP2_UNPACKNAME = ngtcp2
+NGTCP2_VERSION = $(patsubst "%",%,$(strip $(CONFIG_NETUTILS_QUIC_VERSION)))
+
+# ngtcp2 library
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pkt.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conv.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_str.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_vec.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_buf.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conn.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_mem.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pq.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_map.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rob.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ppe.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_crypto.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_err.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_range.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_acktr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rtb.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_frame_chain.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_strm.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_idtr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_gaptr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ringbuf.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_log.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_qlog.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_cid.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ksl.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_cc.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_bbr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_addr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_path.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pv.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pmtud.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_version.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_rst.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_window_filter.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_opl.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_balloc.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_objalloc.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_unreachable.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_transport_params.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_settings.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_callbacks.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_dcidtr.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_pcg.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_ratelim.c
+CSRCS += $(NGTCP2_UNPACKNAME)/lib/ngtcp2_conn_info.c
+
+# ngtcp2 crypto layer
+CSRCS += $(NGTCP2_UNPACKNAME)/crypto/shared.c
+CSRCS += $(NGTCP2_UNPACKNAME)/crypto/wolfssl/wolfssl.c
+
+# Compilation flags
+CFLAGS = -Wno-undef -mlongcalls
+
+# ngtcp2 specific includes
+CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/netutils/ngtcp2
+CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/lib
+CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/lib/includes
+CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/crypto
+CFLAGS += ${INCDIR_PREFIX}$(NGTCP2_UNPACKNAME)/crypto/includes
+
+# NuttX specific includes
+CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/../nuttx/include

Review Comment:
   why need



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to