nuttx/mm/iob/Make.defs
gaohedong dc651e090e net/can: Add SO_RCVBUF option for can socket
If the CAN stack receiving packets fast, but the application layer reading packets slow. Then `conn->readahead` will continue to grow, leading to memory leaks. Finally CAN stack potentially starve out all IOB buffers. To prevent memory leaks, users can restrict can socket buffer length.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-06-14 19:54:07 +08:00

53 lines
1.8 KiB
Plaintext

############################################################################
# mm/iob/Make.defs
#
# 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.
#
############################################################################
ifeq ($(CONFIG_MM_IOB),y)
# Include IOB source files
CSRCS += iob_add_queue.c iob_alloc.c iob_alloc_qentry.c iob_clone.c
CSRCS += iob_concat.c iob_copyin.c iob_copyout.c iob_contig.c iob_free.c
CSRCS += iob_free_chain.c iob_free_qentry.c iob_free_queue.c
CSRCS += iob_initialize.c iob_pack.c iob_peek_queue.c iob_remove_queue.c
CSRCS += iob_statistics.c iob_trimhead.c iob_trimhead_queue.c iob_trimtail.c
CSRCS += iob_navail.c iob_free_queue_qentry.c iob_tailroom.c
CSRCS += iob_get_queue_info.c iob_reserve.c iob_update_pktlen.c
CSRCS += iob_count.c
ifeq ($(CONFIG_IOB_NOTIFIER),y)
CSRCS += iob_notifier.c
endif
ifeq ($(CONFIG_DEBUG_FEATURES),y)
CSRCS += iob_dump.c
endif
ifneq ($(CONFIG_IOB_SECTION),"")
CFLAGS += ${DEFINE_PREFIX}IOB_SECTION=CONFIG_IOB_SECTION
endif
# Include iob build support
DEPPATH += --dep-path iob
VPATH += :iob
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)mm$(DELIM)iob
endif # CONFIG_MM_IOB