[dpdk-dev] [PATCH v2] ip_frag: hide internal structures

Thomas Monjalon thomas at monjalon.net
Thu Nov 4 19:30:45 CET 2021


01/11/2021 13:49, Konstantin Ananyev:
> +/*
> + * RTE IP Fragmentation and Reassembly

RTE is not an entity, just a prefix.
Please use "DPDK" instead, or just drop "RTE".

> + * Implementation of IP packet fragmentation and reassembly.
> + */
> +
> +#include <rte_ip_frag.h>
> +
> +enum {
> +	IP_LAST_FRAG_IDX,    /**< index of last fragment */
> +	IP_FIRST_FRAG_IDX,   /**< index of first fragment */
> +	IP_MIN_FRAG_NUM,     /**< minimum number of fragments */
> +	IP_MAX_FRAG_NUM = RTE_LIBRTE_IP_FRAG_MAX_FRAG,
> +	/**< maximum number of fragments per packet */
> +};
> +
> +/** @internal fragmented mbuf */

Why having doxygen in this file?

> +struct ip_frag {
> +	uint16_t ofs;          /**< offset into the packet */
> +	uint16_t len;          /**< length of fragment */
> +	struct rte_mbuf *mb;   /**< fragment mbuf */
> +};
[...]
> -#define IP_FRAG_DEATH_ROW_MBUF_LEN (IP_FRAG_DEATH_ROW_LEN * (IP_MAX_FRAG_NUM + 1))
> +#define IP_FRAG_DEATH_ROW_MBUF_LEN \
> +	(IP_FRAG_DEATH_ROW_LEN * (RTE_LIBRTE_IP_FRAG_MAX_FRAG + 1))

Namespace is wrong here.
It should be fixed in another patch.




More information about the dev mailing list