Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-14 Thread Zoltan Kiss



On 13/01/16 13:37, Mike Holmes wrote:



On 13 January 2016 at 03:49, Maxim Uvarov > wrote:

On 01/12/2016 21:57, Zoltan Kiss wrote:

Hi,

We have a couple of places where the entire source file couldn't
be copied from linux-generic, but some of the functions are.
E.g. the loopback implementation from linux-generic's pktio code
is something like that. It would be nice to somehow get the
updates and fixes for this codebase, but my current best way is
to compare the code of these copies and based on the differences
use diff to figure out which commits are relevant for us.
Does anyone have a more automated idea for this problem?


In that case we should move that functions to separate file in
linux-generic. Or reorganize code somehow in linux-generic to make
your work simpler.


Agree, what needs to be split out ?


I'm not sure splitting out works everywhere. The mentioned example of 
loopback pktio could use that. But there could be places where you can't 
clearly cut out a logical block of functions, because the ODP-DPDK 
alteration is probably a few lines in one of them. And I don't think 
it's a good idea to have odp_pool.c and 
odp_pool_stuff_needed_by_odp_dpdk.c, if you know what I mean.


I'm thinking about creating a script which does the following:
- takes all the commits affecting linux-generic in an interval
- remove commits from this list which are only modifying files which are 
symlinks in linux-dpdk directory
- also remove commits which are only modifying .c files in linux-generic 
which are not present in linux-dpdk (but new file creations stay!)


This list would be a good starting point as a shortlist for patches 
needed to be ported.
But this script only makes sense once you manually synced up the two 
directories, so then you can specify your interval eg. as 
"v1.6.0.0..v1.7.0.0"






Maxim.




Regards,

Zoltan Kiss
___
lng-odp mailing list
lng-odp@lists.linaro.org 
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org 
https://lists.linaro.org/mailman/listinfo/lng-odp




--
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org ***│ *Open source software for ARM SoCs

__




___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-14 Thread Zoltan Kiss



On 13/01/16 13:46, Maxim Uvarov wrote:

On 01/13/2016 00:15, Nicolas Morey-Chaisemartin wrote:

Hi,

I have the same issue with our implementation.
I usually either work from the git diff of linux generic before and
post update and backport changed or to a diff of the diff of
linux-generic vs mppa platform before and after the merge.
Theoretically the diff you be clode to void (except line changed) once
you backport everything.

I've looked a bit around and if your code is close enough to the
official one (ours start to be quite different on many files), you can
try something like this:
MBOX=$(mktemp); (cd platform/linux-generic/ && git format-patch
--relative COMMIT1..COMMIT2 --stdout -- . > $MBOX) && git am -3
--directory platform/dpdk/ $MBOX


dpdk has symlinks to linux-generic so in many places it just reuses files.


Symlinks are only in the include directory. C files are reused through 
Makefile.am




Maxim.


It will try to apply all the patches that went into the linux-generic
file into the dpdk platform.
It seems to work OK although I can see a lot of conflicts (trying to
merge API next into our master may be a bit hard for a first try)

I'll give it a try when master gets few commits in linux-generic post 1.6

Nicolas

On 01/12/2016 07:57 PM, Zoltan Kiss wrote:

Hi,

We have a couple of places where the entire source file couldn't be
copied from linux-generic, but some of the functions are. E.g. the
loopback implementation from linux-generic's pktio code is something
like that. It would be nice to somehow get the updates and fixes for
this codebase, but my current best way is to compare the code of
these copies and based on the differences use diff to figure out
which commits are relevant for us.
Does anyone have a more automated idea for this problem?

Regards,

Zoltan Kiss
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-14 Thread Zoltan Kiss



On 14/01/16 16:25, Stuart Haslam wrote:

On Thu, Jan 14, 2016 at 04:13:06PM +, Zoltan Kiss wrote:



On 13/01/16 13:37, Mike Holmes wrote:



On 13 January 2016 at 03:49, Maxim Uvarov > wrote:

On 01/12/2016 21:57, Zoltan Kiss wrote:

Hi,

We have a couple of places where the entire source file couldn't
be copied from linux-generic, but some of the functions are.
E.g. the loopback implementation from linux-generic's pktio code
is something like that. It would be nice to somehow get the
updates and fixes for this codebase, but my current best way is
to compare the code of these copies and based on the differences
use diff to figure out which commits are relevant for us.
Does anyone have a more automated idea for this problem?


In that case we should move that functions to separate file in
linux-generic. Or reorganize code somehow in linux-generic to make
your work simpler.


Agree, what needs to be split out ?


I'm not sure splitting out works everywhere. The mentioned example
of loopback pktio could use that. But there could be places where
you can't clearly cut out a logical block of functions, because the
ODP-DPDK alteration is probably a few lines in one of them. And I
don't think it's a good idea to have odp_pool.c and
odp_pool_stuff_needed_by_odp_dpdk.c, if you know what I mean.

I'm thinking about creating a script which does the following:
- takes all the commits affecting linux-generic in an interval
- remove commits from this list which are only modifying files which
are symlinks in linux-dpdk directory
- also remove commits which are only modifying .c files in
linux-generic which are not present in linux-dpdk (but new file
creations stay!)

This list would be a good starting point as a shortlist for patches
needed to be ported.
But this script only makes sense once you manually synced up the two
directories, so then you can specify your interval eg. as
"v1.6.0.0..v1.7.0.0"



Not sure I understand your workflow, but it might be worth looking into
using rerere - https://git-scm.com/docs/git-rerere



rerere seems to be an useful tool, but doesn't help here: we don't have 
separate branches, but copies of files in the same branch, and some 
commits to the original should be applied to the copy as well.






___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-14 Thread Nicolas Morey-Chaisemartin


On 01/13/2016 02:46 PM, Maxim Uvarov wrote:
> On 01/13/2016 00:15, Nicolas Morey-Chaisemartin wrote:
>> Hi,
>>
>> I have the same issue with our implementation.
>> I usually either work from the git diff of linux generic before and post 
>> update and backport changed or to a diff of the diff of linux-generic vs 
>> mppa platform before and after the merge.
>> Theoretically the diff you be clode to void (except line changed) once you 
>> backport everything.
>>
>> I've looked a bit around and if your code is close enough to the official 
>> one (ours start to be quite different on many files), you can try something 
>> like this:
>> MBOX=$(mktemp); (cd platform/linux-generic/ && git format-patch --relative 
>> COMMIT1..COMMIT2 --stdout -- . > $MBOX) && git am -3 --directory 
>> platform/dpdk/ $MBOX
>
> dpdk has symlinks to linux-generic so in many places it just reuses files.
>
> Maxim.
In tat case you can change the filter in git format-patch and use
--   ...
instead of
-- .
>
>> It will try to apply all the patches that went into the linux-generic file 
>> into the dpdk platform.
>> It seems to work OK although I can see a lot of conflicts (trying to merge 
>> API next into our master may be a bit hard for a first try)
>>
>> I'll give it a try when master gets few commits in linux-generic post 1.6
>>
>> Nicolas
>>
>> On 01/12/2016 07:57 PM, Zoltan Kiss wrote:
>>> Hi,
>>>
>>> We have a couple of places where the entire source file couldn't be copied 
>>> from linux-generic, but some of the functions are. E.g. the loopback 
>>> implementation from linux-generic's pktio code is something like that. It 
>>> would be nice to somehow get the updates and fixes for this codebase, but 
>>> my current best way is to compare the code of these copies and based on the 
>>> differences use diff to figure out which commits are relevant for us.
>>> Does anyone have a more automated idea for this problem?
>>>
>>> Regards,
>>>
>>> Zoltan Kiss
>>> ___
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> https://lists.linaro.org/mailman/listinfo/lng-odp
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-14 Thread Stuart Haslam
On Thu, Jan 14, 2016 at 04:13:06PM +, Zoltan Kiss wrote:
> 
> 
> On 13/01/16 13:37, Mike Holmes wrote:
> >
> >
> >On 13 January 2016 at 03:49, Maxim Uvarov  >> wrote:
> >
> >On 01/12/2016 21:57, Zoltan Kiss wrote:
> >
> >Hi,
> >
> >We have a couple of places where the entire source file couldn't
> >be copied from linux-generic, but some of the functions are.
> >E.g. the loopback implementation from linux-generic's pktio code
> >is something like that. It would be nice to somehow get the
> >updates and fixes for this codebase, but my current best way is
> >to compare the code of these copies and based on the differences
> >use diff to figure out which commits are relevant for us.
> >Does anyone have a more automated idea for this problem?
> >
> >
> >In that case we should move that functions to separate file in
> >linux-generic. Or reorganize code somehow in linux-generic to make
> >your work simpler.
> >
> >
> >Agree, what needs to be split out ?
> 
> I'm not sure splitting out works everywhere. The mentioned example
> of loopback pktio could use that. But there could be places where
> you can't clearly cut out a logical block of functions, because the
> ODP-DPDK alteration is probably a few lines in one of them. And I
> don't think it's a good idea to have odp_pool.c and
> odp_pool_stuff_needed_by_odp_dpdk.c, if you know what I mean.
> 
> I'm thinking about creating a script which does the following:
> - takes all the commits affecting linux-generic in an interval
> - remove commits from this list which are only modifying files which
> are symlinks in linux-dpdk directory
> - also remove commits which are only modifying .c files in
> linux-generic which are not present in linux-dpdk (but new file
> creations stay!)
> 
> This list would be a good starting point as a shortlist for patches
> needed to be ported.
> But this script only makes sense once you manually synced up the two
> directories, so then you can specify your interval eg. as
> "v1.6.0.0..v1.7.0.0"
> 

Not sure I understand your workflow, but it might be worth looking into
using rerere - https://git-scm.com/docs/git-rerere

-- 
Stuart.
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-13 Thread Maxim Uvarov

On 01/12/2016 21:57, Zoltan Kiss wrote:

Hi,

We have a couple of places where the entire source file couldn't be 
copied from linux-generic, but some of the functions are. E.g. the 
loopback implementation from linux-generic's pktio code is something 
like that. It would be nice to somehow get the updates and fixes for 
this codebase, but my current best way is to compare the code of these 
copies and based on the differences use diff to figure out which 
commits are relevant for us.

Does anyone have a more automated idea for this problem?


In that case we should move that functions to separate file in 
linux-generic. Or reorganize code somehow in linux-generic to make your 
work simpler.


Maxim.




Regards,

Zoltan Kiss
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-13 Thread Mike Holmes
On 13 January 2016 at 03:49, Maxim Uvarov  wrote:

> On 01/12/2016 21:57, Zoltan Kiss wrote:
>
>> Hi,
>>
>> We have a couple of places where the entire source file couldn't be
>> copied from linux-generic, but some of the functions are. E.g. the loopback
>> implementation from linux-generic's pktio code is something like that. It
>> would be nice to somehow get the updates and fixes for this codebase, but
>> my current best way is to compare the code of these copies and based on the
>> differences use diff to figure out which commits are relevant for us.
>> Does anyone have a more automated idea for this problem?
>>
>
> In that case we should move that functions to separate file in
> linux-generic. Or reorganize code somehow in linux-generic to make your
> work simpler.


Agree, what needs to be split out ?


>
>
> Maxim.
>
>
>
>
>> Regards,
>>
>> Zoltan Kiss
>> ___
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org  *│ *Open source software for ARM SoCs
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-13 Thread Maxim Uvarov

On 01/13/2016 00:15, Nicolas Morey-Chaisemartin wrote:

Hi,

I have the same issue with our implementation.
I usually either work from the git diff of linux generic before and post update 
and backport changed or to a diff of the diff of linux-generic vs mppa platform 
before and after the merge.
Theoretically the diff you be clode to void (except line changed) once you 
backport everything.

I've looked a bit around and if your code is close enough to the official one 
(ours start to be quite different on many files), you can try something like 
this:
MBOX=$(mktemp); (cd platform/linux-generic/ && git format-patch --relative 
COMMIT1..COMMIT2 --stdout -- . > $MBOX) && git am -3 --directory platform/dpdk/ $MBOX


dpdk has symlinks to linux-generic so in many places it just reuses files.

Maxim.


It will try to apply all the patches that went into the linux-generic file into 
the dpdk platform.
It seems to work OK although I can see a lot of conflicts (trying to merge API 
next into our master may be a bit hard for a first try)

I'll give it a try when master gets few commits in linux-generic post 1.6

Nicolas

On 01/12/2016 07:57 PM, Zoltan Kiss wrote:

Hi,

We have a couple of places where the entire source file couldn't be copied from 
linux-generic, but some of the functions are. E.g. the loopback implementation 
from linux-generic's pktio code is something like that. It would be nice to 
somehow get the updates and fixes for this codebase, but my current best way is 
to compare the code of these copies and based on the differences use diff to 
figure out which commits are relevant for us.
Does anyone have a more automated idea for this problem?

Regards,

Zoltan Kiss
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-12 Thread Zoltan Kiss

Hi,

We have a couple of places where the entire source file couldn't be 
copied from linux-generic, but some of the functions are. E.g. the 
loopback implementation from linux-generic's pktio code is something 
like that. It would be nice to somehow get the updates and fixes for 
this codebase, but my current best way is to compare the code of these 
copies and based on the differences use diff to figure out which commits 
are relevant for us.

Does anyone have a more automated idea for this problem?

Regards,

Zoltan Kiss
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] Maintain code copy-pasted from linux-generic in ODP-DPDK

2016-01-12 Thread Nicolas Morey-Chaisemartin
Hi,

I have the same issue with our implementation.
I usually either work from the git diff of linux generic before and post update 
and backport changed or to a diff of the diff of linux-generic vs mppa platform 
before and after the merge.
Theoretically the diff you be clode to void (except line changed) once you 
backport everything.

I've looked a bit around and if your code is close enough to the official one 
(ours start to be quite different on many files), you can try something like 
this:
MBOX=$(mktemp); (cd platform/linux-generic/ && git format-patch --relative 
COMMIT1..COMMIT2 --stdout -- . > $MBOX) && git am -3 --directory platform/dpdk/ 
$MBOX

It will try to apply all the patches that went into the linux-generic file into 
the dpdk platform.
It seems to work OK although I can see a lot of conflicts (trying to merge API 
next into our master may be a bit hard for a first try)

I'll give it a try when master gets few commits in linux-generic post 1.6

Nicolas

On 01/12/2016 07:57 PM, Zoltan Kiss wrote:
> Hi,
>
> We have a couple of places where the entire source file couldn't be copied 
> from linux-generic, but some of the functions are. E.g. the loopback 
> implementation from linux-generic's pktio code is something like that. It 
> would be nice to somehow get the updates and fixes for this codebase, but my 
> current best way is to compare the code of these copies and based on the 
> differences use diff to figure out which commits are relevant for us.
> Does anyone have a more automated idea for this problem?
>
> Regards,
>
> Zoltan Kiss
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp