[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-15 Thread Thomas Monjalon
2015-05-13 16:58, Bruce Richardson:
> On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote:
> > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote:
> > > 2015-05-13 11:01, Bruce Richardson:
> > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> > > >> 2015-05-12 19:04, Bruce Richardson:
> > > >>>  drivers/e1000/e1000/e1000_hw.h | 1026 
> > > >>
> > > >> As explained in a previous comment,
> > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> > > >> I think this path would be better:
> > > >>drivers/net/e1000/base/e1000_hw.h
> > > > 
> > > > Two reasons why I didn't create the "net" subfolder:
> > > > 1. I initally forgot to consider it :-(
> > > > 2. While we may at some future point have other device driver types, 
> > > > are we really
> > > > needing to start categorising PMDs at this point?
> > > > 
> > > > As for the base driver part, I was viewing that as a something that 
> > > > should be
> > > > a separate patch set, since it's unrelated to moving things to the 
> > > > drivers
> > > > subdir.
> > > 
> > > I understand your points and I partially agree.
> > > However, file moves may be perturbing because it change habits
> > > and may complicate a bit the git history browsing.
> > > So I think it's better to minimize such moves and do altogether.
> > > 
> > Ok. I'll see about renaming the base code directories as part of the overall
> > move process [Unless there are objections from any of the driver 
> > maintainers].
> > 
> > As for drivers vs drivers/net, I suppose there is no real difference in what
> > the path actually is, so I can make that change too. However, I still think 
> > I
> > prefer the shorter path. Anyone else any opinions on this [before I start 
> > reworking this again]?
> 
> A further thought on the splitting up of drivers. What about devices which 
> provide
> more than one type of offload, how would the PMD for such a device be 
> classified?

Other projects (e.g. Linux) would have the same classification problem.
How do they solve it? Is it possible to split code in different directories
or different drivers?



[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-15 Thread Thomas Monjalon
2015-05-15 13:36, Bruce Richardson:
> On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote:
> > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote:
> > > 2015-05-13 11:01, Bruce Richardson:
> > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> > > >> 2015-05-12 19:04, Bruce Richardson:
> > > >>>  drivers/e1000/e1000/e1000_hw.h | 1026 
> > > >>
> > > >> As explained in a previous comment,
> > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> > > >> I think this path would be better:
> > > >>drivers/net/e1000/base/e1000_hw.h
> > > > 
> > > > Two reasons why I didn't create the "net" subfolder:
> > > > 1. I initally forgot to consider it :-(
> > > > 2. While we may at some future point have other device driver types, 
> > > > are we really
> > > > needing to start categorising PMDs at this point?
> > > > 
> > > > As for the base driver part, I was viewing that as a something that 
> > > > should be
> > > > a separate patch set, since it's unrelated to moving things to the 
> > > > drivers
> > > > subdir.
> > > 
> > > I understand your points and I partially agree.
> > > However, file moves may be perturbing because it change habits
> > > and may complicate a bit the git history browsing.
> > > So I think it's better to minimize such moves and do altogether.
> > > 
> > Ok. I'll see about renaming the base code directories as part of the overall
> > move process [Unless there are objections from any of the driver 
> > maintainers].
> > 
> > As for drivers vs drivers/net, I suppose there is no real difference in what
> > the path actually is, so I can make that change too. However, I still think 
> > I
> > prefer the shorter path. Anyone else any opinions on this [before I start 
> > reworking this again]?
> > 
> > /Bruce
> 
> Hi Thomas,
> 
> a specific question on how you want the rename of the "base" driver 
> directories.
> Can I take it from your question that you want the base driver renaming to be
> merged into a single commit with the rest of the move for the driver? For 
> example,
> as part of the patch move from "lib/librte_pmd_e1000" to "drivers/net/e1000" 
> we
> also rename the "e1000" subdir to "base".

Yes, to minimize number of patches moving files (and breaking history for
some tools).

> The slight problem with this approach - of trying to do both moves in a single
> patch is that the rename of the subdirectory "e1000" involves changes to 
> other 
> files in the librte_pmd_e1000 directory which are being moved, so we can't
> have a clean patch that just moves files and doesn't touch those files which 
> are
> being moved. Therefore, from a patch cleanliness point of view, the renames
> to the base directory should be a separate patch, which I can make part of 
> this
> series.

The changes are only in Makefile and include lines, right?
I think it's not a big deal to have small changes. But maybe it will make
difficult to read the move with some tools.
Feel free to adopt the solution you prefer if nobody else has an experienced
opinion.



[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-15 Thread Bruce Richardson
On Fri, May 15, 2015 at 02:54:50PM +0200, Thomas Monjalon wrote:
> 2015-05-13 16:58, Bruce Richardson:
> > On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote:
> > > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote:
> > > > 2015-05-13 11:01, Bruce Richardson:
> > > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> > > > >> 2015-05-12 19:04, Bruce Richardson:
> > > > >>>  drivers/e1000/e1000/e1000_hw.h | 1026 
> > > > >>
> > > > >> As explained in a previous comment,
> > > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> > > > >> I think this path would be better:
> > > > >>drivers/net/e1000/base/e1000_hw.h
> > > > > 
> > > > > Two reasons why I didn't create the "net" subfolder:
> > > > > 1. I initally forgot to consider it :-(
> > > > > 2. While we may at some future point have other device driver types, 
> > > > > are we really
> > > > > needing to start categorising PMDs at this point?
> > > > > 
> > > > > As for the base driver part, I was viewing that as a something that 
> > > > > should be
> > > > > a separate patch set, since it's unrelated to moving things to the 
> > > > > drivers
> > > > > subdir.
> > > > 
> > > > I understand your points and I partially agree.
> > > > However, file moves may be perturbing because it change habits
> > > > and may complicate a bit the git history browsing.
> > > > So I think it's better to minimize such moves and do altogether.
> > > > 
> > > Ok. I'll see about renaming the base code directories as part of the 
> > > overall
> > > move process [Unless there are objections from any of the driver 
> > > maintainers].
> > > 
> > > As for drivers vs drivers/net, I suppose there is no real difference in 
> > > what
> > > the path actually is, so I can make that change too. However, I still 
> > > think I
> > > prefer the shorter path. Anyone else any opinions on this [before I start 
> > > reworking this again]?
> > 
> > A further thought on the splitting up of drivers. What about devices which 
> > provide
> > more than one type of offload, how would the PMD for such a device be 
> > classified?
> 
> Other projects (e.g. Linux) would have the same classification problem.
> How do they solve it? Is it possible to split code in different directories
> or different drivers?
> 
No idea, possibly some of the resident linux kernel experts on-list can inform 
us.
However, this is likely a solved problem, so I'm going to rework the patchset to
use drivers/net for now, and thereby allow future-proofing for other device 
types.

/Bruce


[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-15 Thread Bruce Richardson
On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote:
> On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote:
> > 2015-05-13 11:01, Bruce Richardson:
> > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> > >> 2015-05-12 19:04, Bruce Richardson:
> > >>>  drivers/e1000/e1000/e1000_hw.h | 1026 
> > >>
> > >> As explained in a previous comment,
> > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> > >> I think this path would be better:
> > >>drivers/net/e1000/base/e1000_hw.h
> > > 
> > > Two reasons why I didn't create the "net" subfolder:
> > > 1. I initally forgot to consider it :-(
> > > 2. While we may at some future point have other device driver types, are 
> > > we really
> > > needing to start categorising PMDs at this point?
> > > 
> > > As for the base driver part, I was viewing that as a something that 
> > > should be
> > > a separate patch set, since it's unrelated to moving things to the drivers
> > > subdir.
> > 
> > I understand your points and I partially agree.
> > However, file moves may be perturbing because it change habits
> > and may complicate a bit the git history browsing.
> > So I think it's better to minimize such moves and do altogether.
> > 
> Ok. I'll see about renaming the base code directories as part of the overall
> move process [Unless there are objections from any of the driver maintainers].
> 
> As for drivers vs drivers/net, I suppose there is no real difference in what
> the path actually is, so I can make that change too. However, I still think I
> prefer the shorter path. Anyone else any opinions on this [before I start 
> reworking this again]?
> 
> /Bruce

Hi Thomas,

a specific question on how you want the rename of the "base" driver directories.
Can I take it from your question that you want the base driver renaming to be
merged into a single commit with the rest of the move for the driver? For 
example,
as part of the patch move from "lib/librte_pmd_e1000" to "drivers/net/e1000" we
also rename the "e1000" subdir to "base". 
The slight problem with this approach - of trying to do both moves in a single
patch is that the rename of the subdirectory "e1000" involves changes to other 
files in the librte_pmd_e1000 directory which are being moved, so we can't
have a clean patch that just moves files and doesn't touch those files which are
being moved. Therefore, from a patch cleanliness point of view, the renames
to the base directory should be a separate patch, which I can make part of this
series.

/Bruce


[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-13 Thread Bruce Richardson
On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote:
> On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote:
> > 2015-05-13 11:01, Bruce Richardson:
> > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> > >> 2015-05-12 19:04, Bruce Richardson:
> > >>>  drivers/e1000/e1000/e1000_hw.h | 1026 
> > >>
> > >> As explained in a previous comment,
> > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> > >> I think this path would be better:
> > >>drivers/net/e1000/base/e1000_hw.h
> > > 
> > > Two reasons why I didn't create the "net" subfolder:
> > > 1. I initally forgot to consider it :-(
> > > 2. While we may at some future point have other device driver types, are 
> > > we really
> > > needing to start categorising PMDs at this point?
> > > 
> > > As for the base driver part, I was viewing that as a something that 
> > > should be
> > > a separate patch set, since it's unrelated to moving things to the drivers
> > > subdir.
> > 
> > I understand your points and I partially agree.
> > However, file moves may be perturbing because it change habits
> > and may complicate a bit the git history browsing.
> > So I think it's better to minimize such moves and do altogether.
> > 
> Ok. I'll see about renaming the base code directories as part of the overall
> move process [Unless there are objections from any of the driver maintainers].
> 
> As for drivers vs drivers/net, I suppose there is no real difference in what
> the path actually is, so I can make that change too. However, I still think I
> prefer the shorter path. Anyone else any opinions on this [before I start 
> reworking this again]?
> 

A further thought on the splitting up of drivers. What about devices which 
provide
more than one type of offload, how would the PMD for such a device be 
classified?

/Bruce


[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-13 Thread Thomas Monjalon
2015-05-13 11:01, Bruce Richardson:
> On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
>> 2015-05-12 19:04, Bruce Richardson:
>>>  drivers/e1000/e1000/e1000_hw.h | 1026 
>>
>> As explained in a previous comment,
>> http://dpdk.org/ml/archives/dev/2015-May/017509.html
>> I think this path would be better:
>>drivers/net/e1000/base/e1000_hw.h
> 
> Two reasons why I didn't create the "net" subfolder:
> 1. I initally forgot to consider it :-(
> 2. While we may at some future point have other device driver types, are we 
> really
> needing to start categorising PMDs at this point?
> 
> As for the base driver part, I was viewing that as a something that should be
> a separate patch set, since it's unrelated to moving things to the drivers
> subdir.

I understand your points and I partially agree.
However, file moves may be perturbing because it change habits
and may complicate a bit the git history browsing.
So I think it's better to minimize such moves and do altogether.



[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-13 Thread Bruce Richardson
On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote:
> 2015-05-13 11:01, Bruce Richardson:
> > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> >> 2015-05-12 19:04, Bruce Richardson:
> >>>  drivers/e1000/e1000/e1000_hw.h | 1026 
> >>
> >> As explained in a previous comment,
> >> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> >> I think this path would be better:
> >>drivers/net/e1000/base/e1000_hw.h
> > 
> > Two reasons why I didn't create the "net" subfolder:
> > 1. I initally forgot to consider it :-(
> > 2. While we may at some future point have other device driver types, are we 
> > really
> > needing to start categorising PMDs at this point?
> > 
> > As for the base driver part, I was viewing that as a something that should 
> > be
> > a separate patch set, since it's unrelated to moving things to the drivers
> > subdir.
> 
> I understand your points and I partially agree.
> However, file moves may be perturbing because it change habits
> and may complicate a bit the git history browsing.
> So I think it's better to minimize such moves and do altogether.
> 
Ok. I'll see about renaming the base code directories as part of the overall
move process [Unless there are objections from any of the driver maintainers].

As for drivers vs drivers/net, I suppose there is no real difference in what
the path actually is, so I can make that change too. However, I still think I
prefer the shorter path. Anyone else any opinions on this [before I start 
reworking this again]?

/Bruce


[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-13 Thread Bruce Richardson
On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote:
> 2015-05-12 19:04, Bruce Richardson:
> >  drivers/e1000/e1000/e1000_hw.h | 1026 
> 
> As explained in a previous comment,
> http://dpdk.org/ml/archives/dev/2015-May/017509.html
> I think this path would be better:
>drivers/net/e1000/base/e1000_hw.h
> 

Two reasons why I didn't create the "net" subfolder:
1. I initally forgot to consider it :-(
2. While we may at some future point have other device driver types, are we 
really
needing to start categorising PMDs at this point?

As for the base driver part, I was viewing that as a something that should be
a separate patch set, since it's unrelated to moving things to the drivers
subdir.

I realise now, I should have replied to the original email with these points
before diving into the new patchset. My bad...

/Bruce


[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-12 Thread Thomas Monjalon
2015-05-12 19:04, Bruce Richardson:
>  drivers/e1000/e1000/e1000_hw.h | 1026 

As explained in a previous comment,
http://dpdk.org/ml/archives/dev/2015-May/017509.html
I think this path would be better:
   drivers/net/e1000/base/e1000_hw.h



[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory

2015-05-12 Thread Bruce Richardson
As covered previously in an RFC, this patchset creates a new top-level drivers
folder and moves the PMDs into it. Moving the drivers involves a lot of code -
too big for a single patch, so each driver is moved separately in its own 
patchset.

Some doc updates are done as part of this patchset - based on the results of
git grep, but may be incomplete, so flag any doc areas that I may have missed,
please.


Bruce Richardson (19):
  pmds: Use relative rather than absolute paths
  drivers: create new top-level drivers directory
  af_packet: move af_packet pmd to drivers directory
  bond: Move bonded ethdev pmd to drivers
  e1000: move e1000 pmd to drivers directory
  enic: move enic PMD to drivers directory
  fm10k: move fm10k PMD to drivers directory
  i40e: move i40e PMD to drivers directory
  ixbge: move ixgbe PMD to drivers directory
  mlx4: move mlx4 PMD to drivers directory
  null pmd: move null PMD to drivers directory
  pcap: move pcap pmd to drivers directory
  ring pmd: move ring PMD to the drivers directory
  virtio: move virtio PMD to drivers directory
  xmvnet3: move vmxnet3 PMD to drivers directory
  xenvirt: move xenvirt PMD to drivers directory
  maintainers: update maintainers with driver paths
  doc: update GSG doc for new drivers subdirectory
  doc: update source organisation text for drivers

 GNUmakefile|2 +-
 MAINTAINERS|   28 +-
 app/dump_cfg/Makefile  |2 +-
 app/test-acl/Makefile  |2 +-
 app/test-pipeline/Makefile |2 +-
 app/test-pmd/Makefile  |2 +-
 app/test/Makefile  |2 +-
 doc/api/doxy-api.conf  |2 +-
 doc/guides/linux_gsg/build_dpdk.rst|8 +-
 doc/guides/prog_guide/source_org.rst   |   37 +-
 drivers/Makefile   |   50 +
 drivers/af_packet/Makefile |   64 +
 drivers/af_packet/rte_eth_af_packet.c  |  847 +++
 drivers/af_packet/rte_eth_af_packet.h  |   53 +
 drivers/af_packet/rte_pmd_af_packet_version.map|7 +
 drivers/bonding/Makefile   |   68 +
 drivers/bonding/rte_eth_bond.h |  366 ++
 drivers/bonding/rte_eth_bond_8023ad.c  | 1216 +
 drivers/bonding/rte_eth_bond_8023ad.h  |  222 +
 drivers/bonding/rte_eth_bond_8023ad_private.h  |  308 ++
 drivers/bonding/rte_eth_bond_alb.c |  287 +
 drivers/bonding/rte_eth_bond_alb.h |  142 +
 drivers/bonding/rte_eth_bond_api.c |  840 +++
 drivers/bonding/rte_eth_bond_args.c|  278 +
 drivers/bonding/rte_eth_bond_pmd.c | 2269 
 drivers/bonding/rte_eth_bond_private.h |  287 +
 drivers/bonding/rte_eth_bond_version.map   |   22 +
 drivers/e1000/Makefile |   99 +
 drivers/e1000/e1000/README |   39 +
 drivers/e1000/e1000/e1000_80003es2lan.c| 1514 ++
 drivers/e1000/e1000/e1000_80003es2lan.h|  100 +
 drivers/e1000/e1000/e1000_82540.c  |  717 +++
 drivers/e1000/e1000/e1000_82541.c  | 1268 +
 drivers/e1000/e1000/e1000_82541.h  |   91 +
 drivers/e1000/e1000/e1000_82542.c  |  588 ++
 drivers/e1000/e1000/e1000_82543.c  | 1553 ++
 drivers/e1000/e1000/e1000_82543.h  |   56 +
 drivers/e1000/e1000/e1000_82571.c  | 2026 +++
 drivers/e1000/e1000/e1000_82571.h  |   65 +
 drivers/e1000/e1000/e1000_82575.c  | 3639 +
 drivers/e1000/e1000/e1000_82575.h  |  520 ++
 drivers/e1000/e1000/e1000_api.c| 1357 +
 drivers/e1000/e1000/e1000_api.h|  167 +
 drivers/e1000/e1000/e1000_defines.h| 1498 +
 drivers/e1000/e1000/e1000_hw.h | 1026 
 drivers/e1000/e1000/e1000_i210.c   | 1000 
 drivers/e1000/e1000/e1000_i210.h   |  110 +
 drivers/e1000/e1000/e1000_ich8lan.c| 5260 ++
 drivers/e1000/e1000/e1000_ich8lan.h|  313 ++
 drivers/e1000/e1000/e1000_mac.c| 2247 
 drivers/e1000/e1000/e1000_mac.h|   95 +
 drivers/e1000/e1000/e1000_manage.c |  573 ++
 drivers/e1000/e1000/e1000_manage.h |   95 +
 drivers/e1000/e1000/e1000_mbx.c|  777 +++
 drivers/e1000/e1000/e1000_mbx.h|  105 +
 drivers/e1000/e1000/e1000_nvm.c| 1377 +
 drivers/e1000/e1000/e1000_nvm.h|   98 +
 drivers/e1000/e1000/e1000_osdep.c  |   83 +