mbox

[PULL,V4,00/31] Net patches

Message ID 1464850102-17829-1-git-send-email-jasowang@redhat.com
State New
Headers show

Pull-request

https://github.com/jasowang/qemu.git tags/net-pull-request

Message

Jason Wang June 2, 2016, 6:47 a.m. UTC
The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4:

  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100)

are available in the git repository at:

  https://github.com/jasowang/qemu.git tags/net-pull-request

for you to fetch changes up to 517b5e9a175fe7d47cc0fab6c2310241fd33c115:

  Add ENET device to i.MX6 SOC. (2016-06-02 10:42:46 +0800)

----------------------------------------------------------------
Main changes:
- e1000e emulation
- convet vmxnet3 to use DMA api
- ENET support for FEC device
Changes from V3:
- add ENET series
- fix clang sanitizer about misaligned access
Changes from V2:
- fix clang build
Changes from V1:
- fix 32bit build

----------------------------------------------------------------
Dmitry Fleytman (17):
      pci: fix unaligned access in pci_xxx_quad()
      msix: make msix_clr_pending() visible for clients
      pci: Introduce define for PM capability version 1.1
      pcie: Add support for PCIe CAP v1
      pcie: Introduce function for DSN capability creation
      vmxnet3: Use generic function for DSN capability definition
      net: Introduce Toeplitz hash calculator
      net: Add macros for MAC address tracing
      vmxnet3: Use common MAC address tracing macros
      net_pkt: Name vmxnet3 packet abstractions more generic
      rtl8139: Move more TCP definitions to common header
      net_pkt: Extend packet abstraction as required by e1000e functionality
      vmxnet3: Use pci_dma_* API instead of cpu_physical_memory_*
      e1000_regs: Add definitions for Intel 82574-specific bits
      e1000: Move out code that will be reused in e1000e
      net: Introduce e1000e device emulation
      e1000e: Introduce qtest for e1000e device

Eduardo Habkost (1):
      net: vl: Move default_net to vl.c

Jean-Christophe Dubois (10):
      net: improve UDP/TCP checksum computation.
      net: handle optional VLAN header in checksum computation.
      i.MX: Fix FEC code for MDIO operation selection
      i.MX: Fix FEC code for MDIO address selection
      i.MX: Fix FEC code for ECR register reset value.
      i.MX: reset TX/RX descriptors when FEC is disabled.
      i.MX: Rename i.MX FEC defines to ENET_XXX
      i.MX: move FEC device to a register array structure.
      Add ENET/Gbps Ethernet support to FEC device
      Add ENET device to i.MX6 SOC.

Prasad J Pandit (1):
      net: mipsnet: check packet length against buffer

Zhang Chen (1):
      net/net: Add SocketReadState for reuse codes

Zhou Jie (1):
      net/tap: Allocating Large sized arrays to heap

 MAINTAINERS                              |   18 +
 default-configs/pci.mak                  |    1 +
 hw/arm/fsl-imx25.c                       |    1 +
 hw/arm/fsl-imx6.c                        |   17 +
 hw/net/Makefile.objs                     |    5 +-
 hw/net/e1000.c                           |  411 +---
 hw/net/e1000_regs.h                      |  349 ++-
 hw/net/e1000e.c                          |  739 +++++++
 hw/net/e1000e_core.c                     | 3476 ++++++++++++++++++++++++++++++
 hw/net/e1000e_core.h                     |  146 ++
 hw/net/e1000x_common.c                   |  267 +++
 hw/net/e1000x_common.h                   |  213 ++
 hw/net/imx_fec.c                         | 1009 ++++++---
 hw/net/mipsnet.c                         |    3 +
 hw/net/net_rx_pkt.c                      |  600 ++++++
 hw/net/net_rx_pkt.h                      |  363 ++++
 hw/net/{vmxnet_tx_pkt.c => net_tx_pkt.c} |  358 +--
 hw/net/net_tx_pkt.h                      |  191 ++
 hw/net/rtl8139.c                         |    5 -
 hw/net/vmxnet3.c                         |  155 +-
 hw/net/vmxnet_debug.h                    |    3 -
 hw/net/vmxnet_rx_pkt.c                   |  187 --
 hw/net/vmxnet_rx_pkt.h                   |  174 --
 hw/net/vmxnet_tx_pkt.h                   |  146 --
 hw/pci/msix.c                            |    2 +-
 hw/pci/pcie.c                            |   94 +-
 include/hw/arm/fsl-imx6.h                |    6 +-
 include/hw/net/imx_fec.h                 |  250 ++-
 include/hw/pci/msix.h                    |    1 +
 include/hw/pci/pci.h                     |   11 +-
 include/hw/pci/pci_regs.h                |    2 +
 include/hw/pci/pcie.h                    |    5 +
 include/hw/pci/pcie_regs.h               |    5 +-
 include/net/checksum.h                   |   49 +-
 include/net/eth.h                        |  158 +-
 include/net/net.h                        |   19 +-
 net/checksum.c                           |  128 +-
 net/eth.c                                |  410 +++-
 net/filter-mirror.c                      |   66 +-
 net/net.c                                |   93 +-
 net/socket.c                             |   77 +-
 net/tap.c                                |    6 +-
 tests/Makefile                           |    7 +-
 tests/e1000e-test.c                      |  479 ++++
 trace-events                             |  213 ++
 vl.c                                     |   24 +-
 46 files changed, 9306 insertions(+), 1636 deletions(-)
 create mode 100644 hw/net/e1000e.c
 create mode 100644 hw/net/e1000e_core.c
 create mode 100644 hw/net/e1000e_core.h
 create mode 100644 hw/net/e1000x_common.c
 create mode 100644 hw/net/e1000x_common.h
 create mode 100644 hw/net/net_rx_pkt.c
 create mode 100644 hw/net/net_rx_pkt.h
 rename hw/net/{vmxnet_tx_pkt.c => net_tx_pkt.c} (52%)
 create mode 100644 hw/net/net_tx_pkt.h
 delete mode 100644 hw/net/vmxnet_rx_pkt.c
 delete mode 100644 hw/net/vmxnet_rx_pkt.h
 delete mode 100644 hw/net/vmxnet_tx_pkt.h
 create mode 100644 tests/e1000e-test.c

Comments

Peter Maydell June 2, 2016, 2:15 p.m. UTC | #1
On 2 June 2016 at 07:47, Jason Wang <jasowang@redhat.com> wrote:
> The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4:
>
>   Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100)
>
> are available in the git repository at:
>
>   https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to 517b5e9a175fe7d47cc0fab6c2310241fd33c115:
>
>   Add ENET device to i.MX6 SOC. (2016-06-02 10:42:46 +0800)
>
> ----------------------------------------------------------------
> Main changes:
> - e1000e emulation
> - convet vmxnet3 to use DMA api
> - ENET support for FEC device
> Changes from V3:
> - add ENET series
> - fix clang sanitizer about misaligned access
> Changes from V2:
> - fix clang build
> Changes from V1:
> - fix 32bit build
>

Applied, thanks.

-- PMM
Peter Maydell June 2, 2016, 4:29 p.m. UTC | #2
On 2 June 2016 at 15:15, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 2 June 2016 at 07:47, Jason Wang <jasowang@redhat.com> wrote:
>> The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4:
>>
>>   Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100)
>>
>> are available in the git repository at:
>>
>>   https://github.com/jasowang/qemu.git tags/net-pull-request
>>
>> for you to fetch changes up to 517b5e9a175fe7d47cc0fab6c2310241fd33c115:
>>
>>   Add ENET device to i.MX6 SOC. (2016-06-02 10:42:46 +0800)
>>
>> ----------------------------------------------------------------
>> Main changes:
>> - e1000e emulation
>> - convet vmxnet3 to use DMA api
>> - ENET support for FEC device
>> Changes from V3:
>> - add ENET series
>> - fix clang sanitizer about misaligned access
>> Changes from V2:
>> - fix clang build
>> Changes from V1:
>> - fix 32bit build
>>
>
> Applied, thanks.

Looks like this caused a travis build failure for the config which
uses --enable-trace-backends=ust:
https://travis-ci.org/qemu/qemu/jobs/134759359

Could you or Dmitry have a look, please?

thanks
-- PMM
Dmitry Fleytman June 2, 2016, 6:09 p.m. UTC | #3
> On 2 Jun 2016, at 19:29 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On 2 June 2016 at 15:15, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 2 June 2016 at 07:47, Jason Wang <jasowang@redhat.com> wrote:
>>> The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4:
>>> 
>>>  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100)
>>> 
>>> are available in the git repository at:
>>> 
>>>  https://github.com/jasowang/qemu.git tags/net-pull-request
>>> 
>>> for you to fetch changes up to 517b5e9a175fe7d47cc0fab6c2310241fd33c115:
>>> 
>>>  Add ENET device to i.MX6 SOC. (2016-06-02 10:42:46 +0800)
>>> 
>>> ----------------------------------------------------------------
>>> Main changes:
>>> - e1000e emulation
>>> - convet vmxnet3 to use DMA api
>>> - ENET support for FEC device
>>> Changes from V3:
>>> - add ENET series
>>> - fix clang sanitizer about misaligned access
>>> Changes from V2:
>>> - fix clang build
>>> Changes from V1:
>>> - fix 32bit build
>>> 
>> 
>> Applied, thanks.
> 
> Looks like this caused a travis build failure for the config which
> uses --enable-trace-backends=ust:
> https://travis-ci.org/qemu/qemu/jobs/134759359
> 
> Could you or Dmitry have a look, please?

Hi Peter,

The build did not pass because of tracepoint e1000e_rx_rss_ip6 which failed to compile.

This tracepoint has 11 parameters, when 1 parameter is removed build succeeds.
Could it be that ust backend has a limitation of 10 parameters per event?
Should I split this trace into 2 events?

In general, I would like to check compilability of my patches better next time,
is there a way to figure out a full list of configurations to be tested? Is there a tool for that maybe?

Thanks,
Dmitry

> 
> thanks
> -- PMM
Dmitry Fleytman June 2, 2016, 6:38 p.m. UTC | #4
Hi,

After deeper investigation:

From lttng/tracepoint.h:

…

/*
 * TP_ARGS takes tuples of type, argument separated by a comma.
 * It can take up to 10 tuples (which means that less than 10 tuples is
 * fine too).
 * Each tuple is also separated by a comma.
 */

…

So this is a ust backend limitation.

Since build is failing, I’m sending a patch that splits this tracepoint into 2 events.

~Dmitry


> On 2 Jun 2016, at 21:09 PM, Dmitry Fleytman <dmitry@daynix.com> wrote:
> 
>> 
>> On 2 Jun 2016, at 19:29 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> 
>> On 2 June 2016 at 15:15, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> On 2 June 2016 at 07:47, Jason Wang <jasowang@redhat.com> wrote:
>>>> The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4:
>>>> 
>>>> Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100)
>>>> 
>>>> are available in the git repository at:
>>>> 
>>>> https://github.com/jasowang/qemu.git tags/net-pull-request
>>>> 
>>>> for you to fetch changes up to 517b5e9a175fe7d47cc0fab6c2310241fd33c115:
>>>> 
>>>> Add ENET device to i.MX6 SOC. (2016-06-02 10:42:46 +0800)
>>>> 
>>>> ----------------------------------------------------------------
>>>> Main changes:
>>>> - e1000e emulation
>>>> - convet vmxnet3 to use DMA api
>>>> - ENET support for FEC device
>>>> Changes from V3:
>>>> - add ENET series
>>>> - fix clang sanitizer about misaligned access
>>>> Changes from V2:
>>>> - fix clang build
>>>> Changes from V1:
>>>> - fix 32bit build
>>>> 
>>> 
>>> Applied, thanks.
>> 
>> Looks like this caused a travis build failure for the config which
>> uses --enable-trace-backends=ust:
>> https://travis-ci.org/qemu/qemu/jobs/134759359
>> 
>> Could you or Dmitry have a look, please?
> 
> Hi Peter,
> 
> The build did not pass because of tracepoint e1000e_rx_rss_ip6 which failed to compile.
> 
> This tracepoint has 11 parameters, when 1 parameter is removed build succeeds.
> Could it be that ust backend has a limitation of 10 parameters per event?
> Should I split this trace into 2 events?
> 
> In general, I would like to check compilability of my patches better next time,
> is there a way to figure out a full list of configurations to be tested? Is there a tool for that maybe?
> 
> Thanks,
> Dmitry
> 
>> 
>> thanks
>> -- PMM
Eric Blake June 2, 2016, 7:05 p.m. UTC | #5
On 06/02/2016 12:09 PM, Dmitry Fleytman wrote:

> 
> The build did not pass because of tracepoint e1000e_rx_rss_ip6 which failed to compile.
> 
> This tracepoint has 11 parameters, when 1 parameter is removed build succeeds.
> Could it be that ust backend has a limitation of 10 parameters per event?
> Should I split this trace into 2 events?
> 
> In general, I would like to check compilability of my patches better next time,
> is there a way to figure out a full list of configurations to be tested? Is there a tool for that maybe?

The brand new docker tests (see commit cbd614870 and above) should make
it easier to test multiple setups, although I'm not sure if ust is one
of the docker tests yet.
Peter Maydell June 2, 2016, 9:45 p.m. UTC | #6
On 2 June 2016 at 19:38, Dmitry Fleytman <dmitry@daynix.com> wrote:
> From lttng/tracepoint.h:
>
> …
>
> /*
>  * TP_ARGS takes tuples of type, argument separated by a comma.
>  * It can take up to 10 tuples (which means that less than 10 tuples is
>  * fine too).
>  * Each tuple is also separated by a comma.
>  */
>
> …
>
> So this is a ust backend limitation.
>
> Since build is failing, I’m sending a patch that splits this
> tracepoint into 2 events.

I see; thanks for the patch.

(A possible enhancement for the trace code would be to make
going over 10 arguments to a tracepoint be a compile
failure whichever backend was in use, so they're less
likely to slip through.)

thanks
-- PMM
Fam Zheng June 3, 2016, 12:40 a.m. UTC | #7
On Thu, 06/02 13:05, Eric Blake wrote:
> On 06/02/2016 12:09 PM, Dmitry Fleytman wrote:
> 
> > 
> > The build did not pass because of tracepoint e1000e_rx_rss_ip6 which failed to compile.
> > 
> > This tracepoint has 11 parameters, when 1 parameter is removed build succeeds.
> > Could it be that ust backend has a limitation of 10 parameters per event?
> > Should I split this trace into 2 events?
> > 
> > In general, I would like to check compilability of my patches better next time,
> > is there a way to figure out a full list of configurations to be tested? Is there a tool for that maybe?
> 
> The brand new docker tests (see commit cbd614870 and above) should make
> it easier to test multiple setups, although I'm not sure if ust is one
> of the docker tests yet.

Yes, thanks for mentioning! And there is a "travis" script that can mimic
travis-ci.org testing (it's a PoC far from perfect for now):

    make docker-travis@ubuntu

Next step, I'll take a look at our .travis.yml matrix and make a selection out
of that (maybe by flattening all dimensions onto one base configuration, so it
can become a first class test that completes in a resonable time on a single
average machine that a developer owns).

Fam