Re: [PATCH 1/4] scatterlist: Introduce some helper functions

2016-03-10 Thread Baolin Wang
On 10 March 2016 at 17:42, Robert Jarzmik wrote: >> >> >> Ah, sorry that's a mistake. It should check as below: >> static inline bool sg_is_contiguous(struct scatterlist *sga, struct >> scatterlist *sgb) >> { >> return (unsigned int)sg_virt(sga) + sga->length ==

Re: [PATCH 1/4] scatterlist: Introduce some helper functions

2016-03-10 Thread Robert Jarzmik
Baolin Wang writes: > Hi Robert, > > On 4 March 2016 at 03:15, Robert Jarzmik wrote: >> Baolin Wang writes: >>> +static inline bool sg_is_contiguous(struct scatterlist *sga, >>> + struct

Re: [PATCH 1/4] scatterlist: Introduce some helper functions

2016-03-03 Thread Baolin Wang
Hi Robert, On 4 March 2016 at 03:15, Robert Jarzmik wrote: > Baolin Wang writes: > >> @@ -212,6 +212,37 @@ static inline void sg_unmark_end(struct scatterlist *sg) >> } >> >> /** >> + * sg_is_contiguous - Check if the scatterlists are contiguous

Re: [PATCH 1/4] scatterlist: Introduce some helper functions

2016-03-03 Thread Robert Jarzmik
Baolin Wang writes: > @@ -212,6 +212,37 @@ static inline void sg_unmark_end(struct scatterlist *sg) > } > > /** > + * sg_is_contiguous - Check if the scatterlists are contiguous > + * @sga: SG entry > + * @sgb: SG entry > + * > + * Description: > + * If the sga

[PATCH 1/4] scatterlist: Introduce some helper functions

2016-03-02 Thread Baolin Wang
In crypto engine framework, one request can combine other requests' scatterlists into its sg table to improve engine efficency with handling bulk block. Thus we need some helper functions to manage dynamic scattertables. This patch introduces 'sg_is_contiguous()' function to check if two