From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v5 1/3] lib: add Generic Receive Offload API framework Date: Mon, 19 Jun 2017 08:55:00 -0700 Message-ID: <20170619085500.6c0b85fc@xeon-e3> References: <1496833731-53653-1-git-send-email-jiayu.hu@intel.com> <1497770469-16661-1-git-send-email-jiayu.hu@intel.com> <1497770469-16661-2-git-send-email-jiayu.hu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, konstantin.ananyev@intel.com, yliu@fridaylinux.org, keith.wiles@intel.com, jianfeng.tan@intel.com, tiwei.bie@intel.com, lei.a.yao@intel.com To: Jiayu Hu Return-path: Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) by dpdk.org (Postfix) with ESMTP id DB4602BDF for ; Mon, 19 Jun 2017 17:55:08 +0200 (CEST) Received: by mail-pf0-f176.google.com with SMTP id 83so55690332pfr.0 for ; Mon, 19 Jun 2017 08:55:08 -0700 (PDT) In-Reply-To: <1497770469-16661-2-git-send-email-jiayu.hu@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, 18 Jun 2017 15:21:07 +0800 Jiayu Hu wrote: > +/** > + * 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.