<commit_before>/**
 * \file net_constants.h
 * \brief File to hold the constants needed by network stack
 * across driver, userspace and control plane values.
 */

/*
 * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
 * All rights reserved.
 *
 * This file is distributed under the terms in the attached LICENSE file.
 * If you do not find this file, copies can be found by writing to:
 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
 */

#ifndef LIBBARRELFISH_NETCONSTANTS_H
#define LIBBARRELFISH_NETCONSTANTS_H

#define FILTER_SERVICE_SUFFIX      "_FILT"

#define CTL_SERVICE_SUFFIX          "_CTRL"



#ifdef CONFIG_QEMU_NETWORK

#if !defined(__scc__)
/// Size of (static) heap memory
#ifndef MEM_SIZE
#define MEM_SIZE            (60*1024)
#endif // MEM_SIZE

/// Number of PBUF structs available
#ifndef MEMP_NUM_PBUF
#define MEMP_NUM_PBUF           128
#endif // MEMP_NUM_PBUF

/// Number of PBUF buffers available
#ifndef PBUF_POOL_SIZE
#define PBUF_POOL_SIZE          128
#endif // PBUF_POOL_SIZE

/* Used in the ethersrv.c and the driver. */
#define RECEIVE_BUFFERS 128
#define TRANSMIT_BUFFERS 128 //< Number of transmit descriptors
                              //< (must be multiple of 8)

/// the size of the pool
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE       (4 * 2048)
#endif // PBUF_POOL_BUFSIZE

/* from where the memory conf is coming? */
#ifndef MEM_CONF_LOC
#define MEM_CONF_LOC     "for_qemu"
#endif // MEM_CONF_LOC

#else // !defined(__scc__)

/************** SCC machine ******************/
/// Size of (static) heap memory
#ifndef MEM_SIZE
#define MEM_SIZE            (60*1024)
#endif // MEM_SIZE

/// Number of PBUF structs available
#ifndef MEMP_NUM_PBUF
#define MEMP_NUM_PBUF           2024
#endif // MEMP_NUM_PBUF

/// Number of PBUF buffers available
#ifndef PBUF_POOL_SIZE
#define PBUF_POOL_SIZE          2024
#endif // PBUF_POOL_SIZE

/* Used in the ethersrv.c and the driver. */
#define RECEIVE_BUFFERS 1024
#define TRANSMIT_BUFFERS 1024 //< Number of transmit descriptors
                              //< (must be multiple of 8)

/// the size of the pool
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE       (4 * 2048)
#endif // PBUF_POOL_BUFSIZE
<commit_msg>reducing the memory footprint of the network buffers<commit_after>/**
 * \file net_constants.h
 * \brief File to hold the constants needed by network stack
 * across driver, userspace and control plane values.
 */

/*
 * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
 * All rights reserved.
 *
 * This file is distributed under the terms in the attached LICENSE file.
 * If you do not find this file, copies can be found by writing to:
 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
 */

#ifndef LIBBARRELFISH_NETCONSTANTS_H
#define LIBBARRELFISH_NETCONSTANTS_H

#define FILTER_SERVICE_SUFFIX      "_FILT"

#define CTL_SERVICE_SUFFIX          "_CTRL"



#ifdef CONFIG_QEMU_NETWORK

#if !defined(__scc__)
/// Size of (static) heap memory
#ifndef MEM_SIZE
#define MEM_SIZE            (60*1024)
#endif // MEM_SIZE

/// Number of PBUF structs available
#ifndef MEMP_NUM_PBUF
#define MEMP_NUM_PBUF           128
#endif // MEMP_NUM_PBUF

/// Number of PBUF buffers available
#ifndef PBUF_POOL_SIZE
#define PBUF_POOL_SIZE          128
#endif // PBUF_POOL_SIZE

/* Used in the ethersrv.c and the driver. */
#define RECEIVE_BUFFERS 128
#define TRANSMIT_BUFFERS 128 //< Number of transmit descriptors
                              //< (must be multiple of 8)

/// the size of the pool
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE       (4 * 2048)
#endif // PBUF_POOL_BUFSIZE

/* from where the memory conf is coming? */
#ifndef MEM_CONF_LOC
#define MEM_CONF_LOC     "for_qemu"
#endif // MEM_CONF_LOC

#else // !defined(__scc__)

/************** SCC machine ******************/
/// Size of (static) heap memory
#ifndef MEM_SIZE
#define MEM_SIZE            (60*1024)
#endif // MEM_SIZE

/// Number of PBUF structs available
#ifndef MEMP_NUM_PBUF
#define MEMP_NUM_PBUF           1024
#endif // MEMP_NUM_PBUF

/// Number of PBUF buffers available
#ifndef PBUF_POOL_SIZE
#define PBUF_POOL_SIZE         1024 
#endif // PBUF_POOL_SIZE

/* Used in the ethersrv.c and the driver. */
#define RECEIVE_BUFFERS 512
#define TRANSMIT_BUFFERS 512 //< Number of transmit descriptors
                              //< (must be multiple of 8)

/// the size of the pool
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE       (1536)
#endif // PBUF_POOL_BUFSIZE

{'fraction_non_alphanumeric': 0.09767441860465116, 'fraction_numerical': 0.031672203765227024, 'mean_word_length': 3.1279707495429614, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7201502', 'n_tokens_mistral': 1650, 'n_tokens_neox': 1493, 'n_words': 488}