[dpdk-dev] [PATCH v2] mbuf/ip_frag: Move mbuf chaining to common code

2015-09-09 Thread Ananyev, Konstantin
> -Original Message- > From: Simon K?gstr?m [mailto:simon.kagstrom at netinsight.net] > Sent: Tuesday, September 08, 2015 11:41 AM > To: Ananyev, Konstantin; dev at dpdk.org > Cc: Olivier MATZ; Zhang, Helin; Gonzalez Monroy, Sergio; Burakov, Anatoly > Subject: Re: [PATCH v2] mbuf/ip_frag:

[dpdk-dev] [PATCH v2] mbuf/ip_frag: Move mbuf chaining to common code

2015-09-08 Thread Simon Kågström
On 2015-09-08 01:21, Ananyev, Konstantin wrote: >> >> Thanks. I got it wrong anyway, what I wanted was to be able to handle >> the day when nb_segs changes to a 16-bit number, but then it should >> really be >> >> ... >= 1 << (sizeof(head->nb_segs) * 8) >> >> anyway. I'll fix that and also add a

[dpdk-dev] [PATCH v2] mbuf/ip_frag: Move mbuf chaining to common code

2015-09-07 Thread Ananyev, Konstantin
> -Original Message- > From: Simon K?gstr?m [mailto:simon.kagstrom at netinsight.net] > Sent: Monday, September 07, 2015 1:41 PM > To: Ananyev, Konstantin; dev at dpdk.org > Cc: Olivier MATZ; Zhang, Helin; Gonzalez Monroy, Sergio; Burakov, Anatoly > Subject: Re: [PATCH v2] mbuf/ip_frag: M

[dpdk-dev] [PATCH v2] mbuf/ip_frag: Move mbuf chaining to common code

2015-09-07 Thread Simon Kågström
On 2015-09-07 14:32, Ananyev, Konstantin wrote: >> +static inline int rte_pktmbuf_chain(struct rte_mbuf *head, struct rte_mbuf >> *tail) >> +{ >> +struct rte_mbuf *cur_tail; >> + >> +/* Check for number-of-segments-overflow */ >> +if (head->nb_segs + tail->nb_segs >= sizeof(head->nb_se

[dpdk-dev] [PATCH v2] mbuf/ip_frag: Move mbuf chaining to common code

2015-09-07 Thread Simon Kagstrom
Chaining/segmenting mbufs can be useful in many places, so make it global. Signed-off-by: Simon Kagstrom Signed-off-by: Johan Faltstrom --- ChangeLog: v2: * Check for nb_segs byte overflow (Olivier MATZ) * Don't reset nb_segs in tail (Olivier MATZ) lib/librte_ip_frag/ip_frag_common.h

[dpdk-dev] [PATCH v2] mbuf/ip_frag: Move mbuf chaining to common code

2015-09-07 Thread Ananyev, Konstantin
Hi Simon, Looks good to me, just one nit, see below. Konstantin > /** > + * Chain an mbuf to another, thereby creating a segmented packet. > + * > + * @param head the head of the mbuf chain (the first packet) > + * @param tail the mbuf to put last in the chain > + * > + * @return 0 on success,