Re: [PATCH v5 1/3] lib: add Generic Receive Offload API framework
From: Jiayu Hu <hidden>
Date: 2017-06-20 01:47:36
On Mon, Jun 19, 2017 at 08:55:00AM -0700, Stephen Hemminger wrote:
On Sun, 18 Jun 2017 15:21:07 +0800 Jiayu Hu [off-list ref] wrote:quoted
+/** + * This is the main reassembly API used in lightweight mode, which + * merges numbers of packets at a time. After it returns, applications + * can get GROed packets immediately. Applications don't need to + * flush packets manually. In lightweight mode, applications just need + * to tell the reassembly API what rules should be applied when merge + * packets. Therefore, applications can perform GRO in very a simple + * way. + * + * To process one packet, we find its corresponding reassembly table + * according to the packet type. Then search for the reassembly table + * to find one packet to merge. If find, chain the two packets together. + * If not find, insert the inputted packet into the reassembly table. + * Besides, to merge two packets is to chain them together. No + * memory copy is needed. Before rte_gro_reassemble_burst returns, + * header checksums of merged packets are re-calculated. + * + * @param pkts + * a pointer array which points to the packets to reassemble. After + * GRO, it is also used to keep GROed packets. + * @param nb_pkts + * the number of packets to reassemble. + * @param param + * Applications use param to tell rte_gro_reassemble_burst what rules + * are demanded. + * @return + * the number of packets after GROed. + */ +uint16_t rte_gro_reassemble_burst(struct rte_mbuf **pkts __rte_unused, + const uint16_t nb_pkts __rte_unused, + const struct rte_gro_param param __rte_unused);I think the __rte_unused attribute should be on the function definition, not on the prototype. I think GCC ignores it on function prototypes.
Thanks. I will modify it in next patch. BRs, Jiayu