Message ID | 1416560024-20661-3-git-send-email-bala.manoharan@linaro.org |
---|---|
State | New |
Headers | show |
On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote:
> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool)
Bala, I sent you patch to change API to odp_pktio_open( *dev, cost_t).
It should be also included to that patch set.
Thanks,
Maxim.
Hi Maxim, Can we have those as separate patches. I would like to keep this patch as specific for linking pktio with classification. I have created this patch from the current odp tip. Regards, Bala On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: > >> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char *dev, >> odp_buffer_pool_t pool) >> > Bala, I sent you patch to change API to odp_pktio_open( *dev, cost_t). It > should be also included to that patch set. > > Thanks, > Maxim. > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
On 11/21/2014 03:32 PM, Bala Manoharan wrote: > Hi Maxim, > > Can we have those as separate patches. > I would like to keep this patch as specific for linking pktio with > classification. > I have created this patch from the current odp tip. > > Regards, > Bala > My ideas was if we link now then we have workable example/packet with classifier. And we can check that basic functionality works and you don't forget init lock or something like that. Maxim. > On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org > <mailto:maxim.uvarov@linaro.org>> wrote: > > On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: > > @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char > *dev, odp_buffer_pool_t pool) > > Bala, I sent you patch to change API to odp_pktio_open( *dev, > cost_t). It should be also included to that patch set. > > Thanks, > Maxim. > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > http://lists.linaro.org/mailman/listinfo/lng-odp > >
Hi Maxim, As discussed, as per the current API a pktio can exist without initializing the classifier and in that case the packets are sent to the default queue for that pktio. We can test the classifier using the classifier example which I am currently working in parallel. Regards, Bala On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > On 11/21/2014 03:32 PM, Bala Manoharan wrote: > >> Hi Maxim, >> >> Can we have those as separate patches. >> I would like to keep this patch as specific for linking pktio with >> classification. >> I have created this patch from the current odp tip. >> >> Regards, >> Bala >> >> > My ideas was if we link now then we have workable example/packet with > classifier. > And we can check that basic functionality works and you don't forget init > lock or something > like that. > > Maxim. > > On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org <mailto: >> maxim.uvarov@linaro.org>> wrote: >> >> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >> >> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >> *dev, odp_buffer_pool_t pool) >> >> Bala, I sent you patch to change API to odp_pktio_open( *dev, >> cost_t). It should be also included to that patch set. >> >> Thanks, >> Maxim. >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >> http://lists.linaro.org/mailman/listinfo/lng-odp >> >> >> >
This no longer applies, can you rebase it ? On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> wrote: > Hi Maxim, > > As discussed, as per the current API a pktio can exist without initializing > the classifier and in that case the packets are sent to the default queue > for that pktio. We can test the classifier using the classifier example > which I am currently working in parallel. > > Regards, > Bala > > On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >> >> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>> >>> Hi Maxim, >>> >>> Can we have those as separate patches. >>> I would like to keep this patch as specific for linking pktio with >>> classification. >>> I have created this patch from the current odp tip. >>> >>> Regards, >>> Bala >>> >> >> My ideas was if we link now then we have workable example/packet with >> classifier. >> And we can check that basic functionality works and you don't forget init >> lock or something >> like that. >> >> Maxim. >> >>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>> <mailto:maxim.uvarov@linaro.org>> wrote: >>> >>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>> >>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>> *dev, odp_buffer_pool_t pool) >>> >>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>> cost_t). It should be also included to that patch set. >>> >>> Thanks, >>> Maxim. >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >>> >> > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
On 11/25/2014 12:34 AM, Mike Holmes wrote: > This no longer applies, can you rebase it ? git am -3 helps? > On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> wrote: >> Hi Maxim, >> >> As discussed, as per the current API a pktio can exist without initializing >> the classifier and in that case the packets are sent to the default queue >> for that pktio. We can test the classifier using the classifier example >> which I am currently working in parallel. >> >> Regards, >> Bala >> >> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>>> Hi Maxim, >>>> >>>> Can we have those as separate patches. >>>> I would like to keep this patch as specific for linking pktio with >>>> classification. >>>> I have created this patch from the current odp tip. >>>> >>>> Regards, >>>> Bala >>>> >>> My ideas was if we link now then we have workable example/packet with >>> classifier. >>> And we can check that basic functionality works and you don't forget init >>> lock or something >>> like that. >>> >>> Maxim. >>> >>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>>> >>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>>> >>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>>> *dev, odp_buffer_pool_t pool) >>>> >>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>>> cost_t). It should be also included to that patch set. >>>> >>>> Thanks, >>>> Maxim. >>>> >>>> _______________________________________________ >>>> lng-odp mailing list >>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>>> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp >> > >
Again, this points out that we need to start merging patches. Otherwise we're going to be spending all our time reworking and rebasing them rather than moving onto the next patch. There's just no clean way to avoid this with API changes since they tend to get very interdependent as applications and tests start using them. On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > On 11/25/2014 12:34 AM, Mike Holmes wrote: > >> This no longer applies, can you rebase it ? >> > > git am -3 > > helps? > > > > > On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >> wrote: >> >>> Hi Maxim, >>> >>> As discussed, as per the current API a pktio can exist without >>> initializing >>> the classifier and in that case the packets are sent to the default queue >>> for that pktio. We can test the classifier using the classifier example >>> which I am currently working in parallel. >>> >>> Regards, >>> Bala >>> >>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>> >>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>>> >>>>> Hi Maxim, >>>>> >>>>> Can we have those as separate patches. >>>>> I would like to keep this patch as specific for linking pktio with >>>>> classification. >>>>> I have created this patch from the current odp tip. >>>>> >>>>> Regards, >>>>> Bala >>>>> >>>>> My ideas was if we link now then we have workable example/packet with >>>> classifier. >>>> And we can check that basic functionality works and you don't forget >>>> init >>>> lock or something >>>> like that. >>>> >>>> Maxim. >>>> >>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>>>> >>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>>>> >>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>>>> *dev, odp_buffer_pool_t pool) >>>>> >>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>>>> cost_t). It should be also included to that patch set. >>>>> >>>>> Thanks, >>>>> Maxim. >>>>> >>>>> _______________________________________________ >>>>> lng-odp mailing list >>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>>> >>>>> >>>>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >>> >> >> > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
On 24 November 2014 16:45, Bill Fischofer <bill.fischofer@linaro.org> wrote: > Again, this points out that we need to start merging patches. Otherwise > we're going to be spending all our time reworking and rebasing them rather > than moving onto the next patch. There's just no clean way to avoid this > with API changes since they tend to get very interdependent as applications > and tests start using them. > > On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> > wrote: >> >> On 11/25/2014 12:34 AM, Mike Holmes wrote: >>> >>> This no longer applies, can you rebase it ? >> >> >> git am -3 >> >> helps? >> >> >> >> >>> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >>> wrote: >>>> >>>> Hi Maxim, >>>> >>>> As discussed, as per the current API a pktio can exist without >>>> initializing >>>> the classifier and in that case the packets are sent to the default >>>> queue >>>> for that pktio. We can test the classifier using the classifier example >>>> which I am currently working in parallel. >>>> >>>> Regards, >>>> Bala >>>> >>>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>>>> >>>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>>>>> >>>>>> Hi Maxim, >>>>>> >>>>>> Can we have those as separate patches. >>>>>> I would like to keep this patch as specific for linking pktio with >>>>>> classification. >>>>>> I have created this patch from the current odp tip. >>>>>> >>>>>> Regards, >>>>>> Bala >>>>>> >>>>> My ideas was if we link now then we have workable example/packet with >>>>> classifier. >>>>> And we can check that basic functionality works and you don't forget >>>>> init >>>>> lock or something >>>>> like that. >>>>> >>>>> Maxim. >>>>> >>>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>>>>> >>>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>>>>> >>>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>>>>> *dev, odp_buffer_pool_t pool) >>>>>> >>>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>>>>> cost_t). It should be also included to that patch set. >>>>>> >>>>>> Thanks, >>>>>> Maxim. >>>>>> >>>>>> _______________________________________________ >>>>>> lng-odp mailing list >>>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> lng-odp mailing list >>>> lng-odp@lists.linaro.org >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>> >>> >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp > >
On 24 November 2014 16:37, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > On 11/25/2014 12:34 AM, Mike Holmes wrote: >> >> This no longer applies, can you rebase it ? > > > git am -3 > > helps? > It does, I must have made a mistake when trying that way prior to posting, sorry for the noise > > > >> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >> wrote: >>> >>> Hi Maxim, >>> >>> As discussed, as per the current API a pktio can exist without >>> initializing >>> the classifier and in that case the packets are sent to the default queue >>> for that pktio. We can test the classifier using the classifier example >>> which I am currently working in parallel. >>> >>> Regards, >>> Bala >>> >>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>>> >>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>>>> >>>>> Hi Maxim, >>>>> >>>>> Can we have those as separate patches. >>>>> I would like to keep this patch as specific for linking pktio with >>>>> classification. >>>>> I have created this patch from the current odp tip. >>>>> >>>>> Regards, >>>>> Bala >>>>> >>>> My ideas was if we link now then we have workable example/packet with >>>> classifier. >>>> And we can check that basic functionality works and you don't forget >>>> init >>>> lock or something >>>> like that. >>>> >>>> Maxim. >>>> >>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>>>> >>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>>>> >>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>>>> *dev, odp_buffer_pool_t pool) >>>>> >>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>>>> cost_t). It should be also included to that patch set. >>>>> >>>>> Thanks, >>>>> Maxim. >>>>> >>>>> _______________________________________________ >>>>> lng-odp mailing list >>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>>> >>>>> >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >> >> >
On 24 November 2014 at 22:45, Bill Fischofer <bill.fischofer@linaro.org> wrote: > Again, this points out that we need to start merging patches. Otherwise > we're going to be spending all our time reworking and rebasing them rather > than moving onto the next patch. There's just no clean way to avoid this > with API changes since they tend to get very interdependent as applications > and tests start using them. Bill, We are merging patches, and there is always going to be a looser... There will be merge conflicts, that the submitter has to resolve if git am --3way don't do the trick. Cheers, Anders > > On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> > wrote: >> >> On 11/25/2014 12:34 AM, Mike Holmes wrote: >>> >>> This no longer applies, can you rebase it ? >> >> >> git am -3 >> >> helps? >> >> >> >> >>> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >>> wrote: >>>> >>>> Hi Maxim, >>>> >>>> As discussed, as per the current API a pktio can exist without >>>> initializing >>>> the classifier and in that case the packets are sent to the default >>>> queue >>>> for that pktio. We can test the classifier using the classifier example >>>> which I am currently working in parallel. >>>> >>>> Regards, >>>> Bala >>>> >>>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >>>>> >>>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>>>>> >>>>>> Hi Maxim, >>>>>> >>>>>> Can we have those as separate patches. >>>>>> I would like to keep this patch as specific for linking pktio with >>>>>> classification. >>>>>> I have created this patch from the current odp tip. >>>>>> >>>>>> Regards, >>>>>> Bala >>>>>> >>>>> My ideas was if we link now then we have workable example/packet with >>>>> classifier. >>>>> And we can check that basic functionality works and you don't forget >>>>> init >>>>> lock or something >>>>> like that. >>>>> >>>>> Maxim. >>>>> >>>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>>>>> >>>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>>>>> >>>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>>>>> *dev, odp_buffer_pool_t pool) >>>>>> >>>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>>>>> cost_t). It should be also included to that patch set. >>>>>> >>>>>> Thanks, >>>>>> Maxim. >>>>>> >>>>>> _______________________________________________ >>>>>> lng-odp mailing list >>>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>>>> >>>>>> >>>> >>>> _______________________________________________ >>>> lng-odp mailing list >>>> lng-odp@lists.linaro.org >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>> >>> >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
Hi, Pls let me know if there are any additional comments for this patch. If otherwise please provide reviewed-by Regards, Bala On 25 November 2014 03:24, Anders Roxell <anders.roxell@linaro.org> wrote: > On 24 November 2014 at 22:45, Bill Fischofer <bill.fischofer@linaro.org> > wrote: > > Again, this points out that we need to start merging patches. Otherwise > > we're going to be spending all our time reworking and rebasing them > rather > > than moving onto the next patch. There's just no clean way to avoid this > > with API changes since they tend to get very interdependent as > applications > > and tests start using them. > > Bill, > > We are merging patches, and there is always going to be a looser... > There will be merge conflicts, that the submitter has to resolve if > git am --3way don't do the trick. > > Cheers, > Anders > > > > > On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> > > wrote: > >> > >> On 11/25/2014 12:34 AM, Mike Holmes wrote: > >>> > >>> This no longer applies, can you rebase it ? > >> > >> > >> git am -3 > >> > >> helps? > >> > >> > >> > >> > >>> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> > >>> wrote: > >>>> > >>>> Hi Maxim, > >>>> > >>>> As discussed, as per the current API a pktio can exist without > >>>> initializing > >>>> the classifier and in that case the packets are sent to the default > >>>> queue > >>>> for that pktio. We can test the classifier using the classifier > example > >>>> which I am currently working in parallel. > >>>> > >>>> Regards, > >>>> Bala > >>>> > >>>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> > wrote: > >>>>> > >>>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: > >>>>>> > >>>>>> Hi Maxim, > >>>>>> > >>>>>> Can we have those as separate patches. > >>>>>> I would like to keep this patch as specific for linking pktio with > >>>>>> classification. > >>>>>> I have created this patch from the current odp tip. > >>>>>> > >>>>>> Regards, > >>>>>> Bala > >>>>>> > >>>>> My ideas was if we link now then we have workable example/packet with > >>>>> classifier. > >>>>> And we can check that basic functionality works and you don't forget > >>>>> init > >>>>> lock or something > >>>>> like that. > >>>>> > >>>>> Maxim. > >>>>> > >>>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org > >>>>>> <mailto:maxim.uvarov@linaro.org>> wrote: > >>>>>> > >>>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: > >>>>>> > >>>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char > >>>>>> *dev, odp_buffer_pool_t pool) > >>>>>> > >>>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, > >>>>>> cost_t). It should be also included to that patch set. > >>>>>> > >>>>>> Thanks, > >>>>>> Maxim. > >>>>>> > >>>>>> _______________________________________________ > >>>>>> lng-odp mailing list > >>>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > >>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp > >>>>>> > >>>>>> > >>>> > >>>> _______________________________________________ > >>>> lng-odp mailing list > >>>> lng-odp@lists.linaro.org > >>>> http://lists.linaro.org/mailman/listinfo/lng-odp > >>>> > >>> > >>> > >> > >> > >> _______________________________________________ > >> lng-odp mailing list > >> lng-odp@lists.linaro.org > >> http://lists.linaro.org/mailman/listinfo/lng-odp > > > > > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org > > http://lists.linaro.org/mailman/listinfo/lng-odp > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
Ping On 26 November 2014 at 11:07, Bala Manoharan <bala.manoharan@linaro.org> wrote: > Hi, > > Pls let me know if there are any additional comments for this patch. > If otherwise please provide reviewed-by > > Regards, > Bala > > On 25 November 2014 03:24, Anders Roxell <anders.roxell@linaro.org> wrote: > >> On 24 November 2014 at 22:45, Bill Fischofer <bill.fischofer@linaro.org> >> wrote: >> > Again, this points out that we need to start merging patches. Otherwise >> > we're going to be spending all our time reworking and rebasing them >> rather >> > than moving onto the next patch. There's just no clean way to avoid >> this >> > with API changes since they tend to get very interdependent as >> applications >> > and tests start using them. >> >> Bill, >> >> We are merging patches, and there is always going to be a looser... >> There will be merge conflicts, that the submitter has to resolve if >> git am --3way don't do the trick. >> >> Cheers, >> Anders >> >> > >> > On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> >> > wrote: >> >> >> >> On 11/25/2014 12:34 AM, Mike Holmes wrote: >> >>> >> >>> This no longer applies, can you rebase it ? >> >> >> >> >> >> git am -3 >> >> >> >> helps? >> >> >> >> >> >> >> >> >> >>> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >> >>> wrote: >> >>>> >> >>>> Hi Maxim, >> >>>> >> >>>> As discussed, as per the current API a pktio can exist without >> >>>> initializing >> >>>> the classifier and in that case the packets are sent to the default >> >>>> queue >> >>>> for that pktio. We can test the classifier using the classifier >> example >> >>>> which I am currently working in parallel. >> >>>> >> >>>> Regards, >> >>>> Bala >> >>>> >> >>>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> >> wrote: >> >>>>> >> >>>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >> >>>>>> >> >>>>>> Hi Maxim, >> >>>>>> >> >>>>>> Can we have those as separate patches. >> >>>>>> I would like to keep this patch as specific for linking pktio with >> >>>>>> classification. >> >>>>>> I have created this patch from the current odp tip. >> >>>>>> >> >>>>>> Regards, >> >>>>>> Bala >> >>>>>> >> >>>>> My ideas was if we link now then we have workable example/packet >> with >> >>>>> classifier. >> >>>>> And we can check that basic functionality works and you don't forget >> >>>>> init >> >>>>> lock or something >> >>>>> like that. >> >>>>> >> >>>>> Maxim. >> >>>>> >> >>>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >> >>>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >> >>>>>> >> >>>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >> >>>>>> >> >>>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >> >>>>>> *dev, odp_buffer_pool_t pool) >> >>>>>> >> >>>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >> >>>>>> cost_t). It should be also included to that patch set. >> >>>>>> >> >>>>>> Thanks, >> >>>>>> Maxim. >> >>>>>> >> >>>>>> _______________________________________________ >> >>>>>> lng-odp mailing list >> >>>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >> >>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >> >>>>>> >> >>>>>> >> >>>> >> >>>> _______________________________________________ >> >>>> lng-odp mailing list >> >>>> lng-odp@lists.linaro.org >> >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >> >>>> >> >>> >> >>> >> >> >> >> >> >> _______________________________________________ >> >> lng-odp mailing list >> >> lng-odp@lists.linaro.org >> >> http://lists.linaro.org/mailman/listinfo/lng-odp >> > >> > >> > >> > _______________________________________________ >> > lng-odp mailing list >> > lng-odp@lists.linaro.org >> > http://lists.linaro.org/mailman/listinfo/lng-odp >> > >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp >> > >
On Thu, Nov 27, 2014 at 7:49 AM, Bala Manoharan <bala.manoharan@linaro.org> wrote: > Ping One thing, I'm trying to build but odp_classification_datamodel.h is missing. Is that in another patch or you forgot to add it here? > > On 26 November 2014 at 11:07, Bala Manoharan <bala.manoharan@linaro.org> > wrote: >> >> Hi, >> >> Pls let me know if there are any additional comments for this patch. >> If otherwise please provide reviewed-by >> >> Regards, >> Bala >> >> On 25 November 2014 03:24, Anders Roxell <anders.roxell@linaro.org> wrote: >>> >>> On 24 November 2014 at 22:45, Bill Fischofer <bill.fischofer@linaro.org> >>> wrote: >>> > Again, this points out that we need to start merging patches. >>> > Otherwise >>> > we're going to be spending all our time reworking and rebasing them >>> > rather >>> > than moving onto the next patch. There's just no clean way to avoid >>> > this >>> > with API changes since they tend to get very interdependent as >>> > applications >>> > and tests start using them. >>> >>> Bill, >>> >>> We are merging patches, and there is always going to be a looser... >>> There will be merge conflicts, that the submitter has to resolve if >>> git am --3way don't do the trick. >>> >>> Cheers, >>> Anders >>> >>> > >>> > On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> >>> > wrote: >>> >> >>> >> On 11/25/2014 12:34 AM, Mike Holmes wrote: >>> >>> >>> >>> This no longer applies, can you rebase it ? >>> >> >>> >> >>> >> git am -3 >>> >> >>> >> helps? >>> >> >>> >> >>> >> >>> >> >>> >>> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >>> >>> wrote: >>> >>>> >>> >>>> Hi Maxim, >>> >>>> >>> >>>> As discussed, as per the current API a pktio can exist without >>> >>>> initializing >>> >>>> the classifier and in that case the packets are sent to the default >>> >>>> queue >>> >>>> for that pktio. We can test the classifier using the classifier >>> >>>> example >>> >>>> which I am currently working in parallel. >>> >>>> >>> >>>> Regards, >>> >>>> Bala >>> >>>> >>> >>>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> >>> >>>> wrote: >>> >>>>> >>> >>>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>> >>>>>> >>> >>>>>> Hi Maxim, >>> >>>>>> >>> >>>>>> Can we have those as separate patches. >>> >>>>>> I would like to keep this patch as specific for linking pktio with >>> >>>>>> classification. >>> >>>>>> I have created this patch from the current odp tip. >>> >>>>>> >>> >>>>>> Regards, >>> >>>>>> Bala >>> >>>>>> >>> >>>>> My ideas was if we link now then we have workable example/packet >>> >>>>> with >>> >>>>> classifier. >>> >>>>> And we can check that basic functionality works and you don't >>> >>>>> forget >>> >>>>> init >>> >>>>> lock or something >>> >>>>> like that. >>> >>>>> >>> >>>>> Maxim. >>> >>>>> >>> >>>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>> >>>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>> >>>>>> >>> >>>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>> >>>>>> >>> >>>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>> >>>>>> *dev, odp_buffer_pool_t pool) >>> >>>>>> >>> >>>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>> >>>>>> cost_t). It should be also included to that patch set. >>> >>>>>> >>> >>>>>> Thanks, >>> >>>>>> Maxim. >>> >>>>>> >>> >>>>>> _______________________________________________ >>> >>>>>> lng-odp mailing list >>> >>>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>> >>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >>>>>> >>> >>>>>> >>> >>>> >>> >>>> _______________________________________________ >>> >>>> lng-odp mailing list >>> >>>> lng-odp@lists.linaro.org >>> >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >>>> >>> >>> >>> >>> >>> >> >>> >> >>> >> _______________________________________________ >>> >> lng-odp mailing list >>> >> lng-odp@lists.linaro.org >>> >> http://lists.linaro.org/mailman/listinfo/lng-odp >>> > >>> > >>> > >>> > _______________________________________________ >>> > lng-odp mailing list >>> > lng-odp@lists.linaro.org >>> > http://lists.linaro.org/mailman/listinfo/lng-odp >>> > >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> http://lists.linaro.org/mailman/listinfo/lng-odp >> >> > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
On Thu, Nov 27, 2014 at 3:21 PM, Ciprian Barbu <ciprian.barbu@linaro.org> wrote: > On Thu, Nov 27, 2014 at 7:49 AM, Bala Manoharan > <bala.manoharan@linaro.org> wrote: >> Ping > > One thing, I'm trying to build but odp_classification_datamodel.h is > missing. Is that in another patch or you forgot to add it here? Nevermind, it's in the same series. > >> >> On 26 November 2014 at 11:07, Bala Manoharan <bala.manoharan@linaro.org> >> wrote: >>> >>> Hi, >>> >>> Pls let me know if there are any additional comments for this patch. >>> If otherwise please provide reviewed-by >>> >>> Regards, >>> Bala >>> >>> On 25 November 2014 03:24, Anders Roxell <anders.roxell@linaro.org> wrote: >>>> >>>> On 24 November 2014 at 22:45, Bill Fischofer <bill.fischofer@linaro.org> >>>> wrote: >>>> > Again, this points out that we need to start merging patches. >>>> > Otherwise >>>> > we're going to be spending all our time reworking and rebasing them >>>> > rather >>>> > than moving onto the next patch. There's just no clean way to avoid >>>> > this >>>> > with API changes since they tend to get very interdependent as >>>> > applications >>>> > and tests start using them. >>>> >>>> Bill, >>>> >>>> We are merging patches, and there is always going to be a looser... >>>> There will be merge conflicts, that the submitter has to resolve if >>>> git am --3way don't do the trick. >>>> >>>> Cheers, >>>> Anders >>>> >>>> > >>>> > On Mon, Nov 24, 2014 at 3:37 PM, Maxim Uvarov <maxim.uvarov@linaro.org> >>>> > wrote: >>>> >> >>>> >> On 11/25/2014 12:34 AM, Mike Holmes wrote: >>>> >>> >>>> >>> This no longer applies, can you rebase it ? >>>> >> >>>> >> >>>> >> git am -3 >>>> >> >>>> >> helps? >>>> >> >>>> >> >>>> >> >>>> >> >>>> >>> On 21 November 2014 08:30, Bala Manoharan <bala.manoharan@linaro.org> >>>> >>> wrote: >>>> >>>> >>>> >>>> Hi Maxim, >>>> >>>> >>>> >>>> As discussed, as per the current API a pktio can exist without >>>> >>>> initializing >>>> >>>> the classifier and in that case the packets are sent to the default >>>> >>>> queue >>>> >>>> for that pktio. We can test the classifier using the classifier >>>> >>>> example >>>> >>>> which I am currently working in parallel. >>>> >>>> >>>> >>>> Regards, >>>> >>>> Bala >>>> >>>> >>>> >>>> On 21 November 2014 18:18, Maxim Uvarov <maxim.uvarov@linaro.org> >>>> >>>> wrote: >>>> >>>>> >>>> >>>>> On 11/21/2014 03:32 PM, Bala Manoharan wrote: >>>> >>>>>> >>>> >>>>>> Hi Maxim, >>>> >>>>>> >>>> >>>>>> Can we have those as separate patches. >>>> >>>>>> I would like to keep this patch as specific for linking pktio with >>>> >>>>>> classification. >>>> >>>>>> I have created this patch from the current odp tip. >>>> >>>>>> >>>> >>>>>> Regards, >>>> >>>>>> Bala >>>> >>>>>> >>>> >>>>> My ideas was if we link now then we have workable example/packet >>>> >>>>> with >>>> >>>>> classifier. >>>> >>>>> And we can check that basic functionality works and you don't >>>> >>>>> forget >>>> >>>>> init >>>> >>>>> lock or something >>>> >>>>> like that. >>>> >>>>> >>>> >>>>> Maxim. >>>> >>>>> >>>> >>>>>> On 21 November 2014 17:37, Maxim Uvarov <maxim.uvarov@linaro.org >>>> >>>>>> <mailto:maxim.uvarov@linaro.org>> wrote: >>>> >>>>>> >>>> >>>>>> On 11/21/2014 11:53 AM, Balasubramanian Manoharan wrote: >>>> >>>>>> >>>> >>>>>> @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char >>>> >>>>>> *dev, odp_buffer_pool_t pool) >>>> >>>>>> >>>> >>>>>> Bala, I sent you patch to change API to odp_pktio_open( *dev, >>>> >>>>>> cost_t). It should be also included to that patch set. >>>> >>>>>> >>>> >>>>>> Thanks, >>>> >>>>>> Maxim. >>>> >>>>>> >>>> >>>>>> _______________________________________________ >>>> >>>>>> lng-odp mailing list >>>> >>>>>> lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> >>>> >>>>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>>>>> >>>> >>>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> lng-odp mailing list >>>> >>>> lng-odp@lists.linaro.org >>>> >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>>> >>>> >>>> >>> >>>> >>> >>>> >> >>>> >> >>>> >> _______________________________________________ >>>> >> lng-odp mailing list >>>> >> lng-odp@lists.linaro.org >>>> >> http://lists.linaro.org/mailman/listinfo/lng-odp >>>> > >>>> > >>>> > >>>> > _______________________________________________ >>>> > lng-odp mailing list >>>> > lng-odp@lists.linaro.org >>>> > http://lists.linaro.org/mailman/listinfo/lng-odp >>>> > >>>> >>>> _______________________________________________ >>>> lng-odp mailing list >>>> lng-odp@lists.linaro.org >>>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >>> >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp >>
diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index 23633ed..0599573 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -20,6 +20,7 @@ extern "C" { #include <odp_spinlock.h> #include <odp_packet_socket.h> +#include <odp_classification_datamodel.h> /** * Packet IO types @@ -38,6 +39,7 @@ struct pktio_entry { odp_pktio_type_t type; /**< pktio type */ pkt_sock_t pkt_sock; /**< using socket API for IO */ pkt_sock_mmap_t pkt_sock_mmap; /**< using socket mmap API for IO */ + classifier_t cls; }; typedef union { @@ -45,6 +47,21 @@ typedef union { uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(struct pktio_entry))]; } pktio_entry_t; +typedef struct { + pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES]; +} pktio_table_t; + +extern void *pktio_entry_ptr[]; + + +static inline pktio_entry_t *get_pktio_entry(odp_pktio_t id) +{ + if (odp_unlikely(id == ODP_PKTIO_INVALID || + id > ODP_CONFIG_PKTIO_ENTRIES)) + return NULL; + + return pktio_entry_ptr[id - 1]; +} #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index f78b7fd..4226db4 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -11,31 +11,22 @@ #include <odp_packet_internal.h> #include <odp_internal.h> #include <odp_spinlock.h> +#include <odp_rwlock.h> #include <odp_shared_memory.h> #include <odp_packet_socket.h> #include <odp_hints.h> #include <odp_config.h> #include <odp_queue_internal.h> #include <odp_schedule_internal.h> +#include <odp_classification_internal.h> #include <odp_debug.h> #include <string.h> -typedef struct { - pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES]; -} pktio_table_t; - static pktio_table_t *pktio_tbl; - -static pktio_entry_t *get_entry(odp_pktio_t id) -{ - if (odp_unlikely(id == ODP_PKTIO_INVALID || - id > ODP_CONFIG_PKTIO_ENTRIES)) - return NULL; - - return &pktio_tbl->entries[id - 1]; -} +/* pktio pointer entries ( for inlines) */ +void *pktio_entry_ptr[ODP_CONFIG_PKTIO_ENTRIES]; int odp_pktio_init_global(void) { @@ -57,10 +48,12 @@ int odp_pktio_init_global(void) memset(pktio_tbl, 0, sizeof(pktio_table_t)); for (id = 1; id <= ODP_CONFIG_PKTIO_ENTRIES; ++id) { - pktio_entry = get_entry(id); + pktio_entry = &pktio_tbl->entries[id - 1]; odp_spinlock_init(&pktio_entry->s.lock); + odp_rwlock_init(&pktio_entry->s.cls.lock); + pktio_entry_ptr[id - 1] = pktio_entry; /* Create a default output queue for each pktio resource */ snprintf(name, sizeof(name), "%i-pktio_outq_default", (int)id); name[ODP_QUEUE_NAME_LEN-1] = '\0'; @@ -107,12 +100,25 @@ static void unlock_entry(pktio_entry_t *entry) odp_spinlock_unlock(&entry->s.lock); } +static void lock_entry_classifier(pktio_entry_t *entry) +{ + odp_spinlock_lock(&entry->s.lock); + odp_rwlock_write_lock(&entry->s.cls.lock); +} + +static void unlock_entry_classifier(pktio_entry_t *entry) +{ + odp_rwlock_write_unlock(&entry->s.cls.lock); + odp_spinlock_unlock(&entry->s.lock); +} + static void init_pktio_entry(pktio_entry_t *entry) { set_taken(entry); entry->s.inq_default = ODP_QUEUE_INVALID; memset(&entry->s.pkt_sock, 0, sizeof(entry->s.pkt_sock)); memset(&entry->s.pkt_sock_mmap, 0, sizeof(entry->s.pkt_sock_mmap)); + pktio_classifier_init(entry); } static odp_pktio_t alloc_lock_pktio_entry(void) @@ -124,13 +130,13 @@ static odp_pktio_t alloc_lock_pktio_entry(void) for (i = 0; i < ODP_CONFIG_PKTIO_ENTRIES; ++i) { entry = &pktio_tbl->entries[i]; if (is_free(entry)) { - lock_entry(entry); + lock_entry_classifier(entry); if (is_free(entry)) { init_pktio_entry(entry); id = i + 1; return id; /* return with entry locked! */ } - unlock_entry(entry); + unlock_entry_classifier(entry); } } @@ -139,7 +145,7 @@ static odp_pktio_t alloc_lock_pktio_entry(void) static int free_pktio_entry(odp_pktio_t id) { - pktio_entry_t *entry = get_entry(id); + pktio_entry_t *entry = get_pktio_entry(id); if (entry == NULL) return -1; @@ -163,7 +169,7 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool) } /* if successful, alloc_pktio_entry() returns with the entry locked */ - pktio_entry = get_entry(id); + pktio_entry = get_pktio_entry(id); ODP_DBG("ODP_PKTIO_USE_FANOUT: %d\n", fanout); if (getenv("ODP_PKTIO_DISABLE_SOCKET_MMAP") == NULL) { @@ -197,13 +203,13 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_buffer_pool_t pool) close_pkt_sock(&pktio_entry->s.pkt_sock); } - unlock_entry(pktio_entry); + unlock_entry_classifier(pktio_entry); free_pktio_entry(id); ODP_ERR("Unable to init any I/O type.\n"); return ODP_PKTIO_INVALID; done: - unlock_entry(pktio_entry); + unlock_entry_classifier(pktio_entry); return id; } @@ -212,7 +218,7 @@ int odp_pktio_close(odp_pktio_t id) pktio_entry_t *entry; int res = -1; - entry = get_entry(id); + entry = get_pktio_entry(id); if (entry == NULL) return -1; @@ -251,7 +257,7 @@ odp_pktio_t odp_pktio_get_input(odp_packet_t pkt) int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) { - pktio_entry_t *pktio_entry = get_entry(id); + pktio_entry_t *pktio_entry = get_pktio_entry(id); int pkts; int i; @@ -289,7 +295,7 @@ int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) { - pktio_entry_t *pktio_entry = get_entry(id); + pktio_entry_t *pktio_entry = get_pktio_entry(id); int pkts; if (pktio_entry == NULL) @@ -319,7 +325,7 @@ int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) int odp_pktio_inq_setdef(odp_pktio_t id, odp_queue_t queue) { - pktio_entry_t *pktio_entry = get_entry(id); + pktio_entry_t *pktio_entry = get_pktio_entry(id); queue_entry_t *qentry = queue_to_qentry(queue); if (pktio_entry == NULL || qentry == NULL) @@ -349,7 +355,7 @@ int odp_pktio_inq_remdef(odp_pktio_t id) odp_queue_t odp_pktio_inq_getdef(odp_pktio_t id) { - pktio_entry_t *pktio_entry = get_entry(id); + pktio_entry_t *pktio_entry = get_pktio_entry(id); if (pktio_entry == NULL) return ODP_QUEUE_INVALID; @@ -359,7 +365,7 @@ odp_queue_t odp_pktio_inq_getdef(odp_pktio_t id) odp_queue_t odp_pktio_outq_getdef(odp_pktio_t id) { - pktio_entry_t *pktio_entry = get_entry(id); + pktio_entry_t *pktio_entry = get_pktio_entry(id); if (pktio_entry == NULL) return ODP_QUEUE_INVALID; @@ -419,7 +425,7 @@ odp_buffer_hdr_t *pktin_dequeue(queue_entry_t *qentry) odp_buffer_t buf; odp_packet_t pkt_tbl[QUEUE_MULTI_MAX]; odp_buffer_hdr_t *tmp_hdr_tbl[QUEUE_MULTI_MAX]; - int pkts, i; + int pkts, i, j; buf_hdr = queue_deq(qentry); if (buf_hdr != NULL) @@ -429,12 +435,15 @@ odp_buffer_hdr_t *pktin_dequeue(queue_entry_t *qentry) if (pkts <= 0) return NULL; - for (i = 0; i < pkts; ++i) { + for (i = 0, j = 0; i < pkts; ++i) { buf = odp_packet_to_buffer(pkt_tbl[i]); - tmp_hdr_tbl[i] = odp_buf_to_hdr(buf); + buf_hdr = odp_buf_to_hdr(buf); + if (0 > packet_classifier(qentry->s.pktin, pkt_tbl[i])) + tmp_hdr_tbl[j++] = buf_hdr; } - queue_enq_multi(qentry, tmp_hdr_tbl, pkts); + if (j) + queue_enq_multi(qentry, tmp_hdr_tbl, j); buf_hdr = tmp_hdr_tbl[0]; return buf_hdr; } @@ -450,8 +459,9 @@ int pktin_deq_multi(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr[], int num) int nbr; odp_packet_t pkt_tbl[QUEUE_MULTI_MAX]; odp_buffer_hdr_t *tmp_hdr_tbl[QUEUE_MULTI_MAX]; + odp_buffer_hdr_t *tmp_hdr; odp_buffer_t buf; - int pkts, i; + int pkts, i, j; nbr = queue_deq_multi(qentry, buf_hdr, num); if (odp_unlikely(nbr > num)) @@ -468,11 +478,14 @@ int pktin_deq_multi(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr[], int num) if (pkts <= 0) return nbr; - for (i = 0; i < pkts; ++i) { + for (i = 0, j = 0; i < pkts; ++i) { buf = odp_packet_to_buffer(pkt_tbl[i]); - tmp_hdr_tbl[i] = odp_buf_to_hdr(buf); + tmp_hdr = odp_buf_to_hdr(buf); + if (0 > packet_classifier(qentry->s.pktin, pkt_tbl[i])) + tmp_hdr_tbl[j++] = tmp_hdr; } - queue_enq_multi(qentry, tmp_hdr_tbl, pkts); + if (j) + queue_enq_multi(qentry, tmp_hdr_tbl, j); return nbr; }
This patch links classification with pktio module. The classification variables are stored as a separate struct with pktio entry and the same is initialized as part of pktio initialization. This patch also moves the inline function get_pktio_entry() to header file as the same is called from classification module. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> --- .../linux-generic/include/odp_packet_io_internal.h | 17 +++++ platform/linux-generic/odp_packet_io.c | 81 +++++++++++++--------- 2 files changed, 64 insertions(+), 34 deletions(-)