All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Leonid Bloch <leonid.bloch@ravellosystems.com>, qemu-devel@nongnu.org
Cc: Dmitry Fleytman <dmitry@daynix.com>,
	Leonid Bloch <leonid@daynix.com>,
	Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 09/13] net_pkt: Name vmxnet3 packet abstractions more generic
Date: Tue, 8 Mar 2016 11:10:57 +0800	[thread overview]
Message-ID: <56DE42C1.506@redhat.com> (raw)
In-Reply-To: <1456162651-22181-10-git-send-email-leonid.bloch@ravellosystems.com>



On 02/23/2016 01:37 AM, Leonid Bloch wrote:
> From: Dmitry Fleytman <dmitry.fleytman@ravellosystems.com>
>
> This patch drops "vmx" prefix from packet abstrations names
> to emphasize the fact they are generic and not tied to any
> specific network device.
>
> These abstrations will be reused by e1000e emulation implementation
> introduced by following patches so their names need generalization.
>
> This patch (except renamed files, adjusted comments and changes in MAINTAINTERS)
> was produced by:
>
> git grep -lz 'vmxnet_tx_pkt' | xargs -0 perl -i'' -pE "s/vmxnet_tx_pkt/net_tx_pkt/g"
> git grep -lz 'vmxnet_rx_pkt' | xargs -0 perl -i'' -pE "s/vmxnet_rx_pkt/net_rx_pkt/g"
> git grep -lz 'VmxnetTxPkt' | xargs -0 perl -i'' -pE "s/VmxnetTxPkt/NetTxPkt/g"
> git grep -lz 'VMXNET_TX_PKT' | xargs -0 perl -i'' -pE "s/VMXNET_TX_PKT/NET_TX_PKT/g"
> git grep -lz 'VmxnetRxPkt' | xargs -0 perl -i'' -pE "s/VmxnetRxPkt/NetRxPkt/g"
> git grep -lz 'VMXNET_RX_PKT' | xargs -0 perl -i'' -pE "s/VMXNET_RX_PKT/NET_RX_PKT/g"
> sed -ie 's/VMXNET_/NET_/g' hw/net/vmxnet_rx_pkt.c
> sed -ie 's/VMXNET_/NET_/g' hw/net/vmxnet_tx_pkt.c
>
> Signed-off-by: Dmitry Fleytman <dmitry.fleytman@ravellosystems.com>
> Signed-off-by: Leonid Bloch <leonid.bloch@ravellosystems.com>
> ---
>  MAINTAINERS            |   8 +
>  hw/net/Makefile.objs   |   2 +-
>  hw/net/net_rx_pkt.c    | 187 ++++++++++++++++
>  hw/net/net_rx_pkt.h    | 176 +++++++++++++++
>  hw/net/net_tx_pkt.c    | 581 +++++++++++++++++++++++++++++++++++++++++++++++++
>  hw/net/net_tx_pkt.h    | 148 +++++++++++++
>  hw/net/vmxnet3.c       |  88 ++++----
>  hw/net/vmxnet_rx_pkt.c | 187 ----------------
>  hw/net/vmxnet_rx_pkt.h | 176 ---------------
>  hw/net/vmxnet_tx_pkt.c | 581 -------------------------------------------------
>  hw/net/vmxnet_tx_pkt.h | 148 -------------
>  tests/Makefile         |   4 +-
>  12 files changed, 1147 insertions(+), 1139 deletions(-)
>  create mode 100644 hw/net/net_rx_pkt.c
>  create mode 100644 hw/net/net_rx_pkt.h
>  create mode 100644 hw/net/net_tx_pkt.c
>  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.c
>  delete mode 100644 hw/net/vmxnet_tx_pkt.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 02710f8..3a7c108 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -937,6 +937,14 @@ S: Maintained
>  F: hw/*/xilinx_*
>  F: include/hw/xilinx.h
>  
> +Network packet abstractions
> +M: Dmitry Fleytman <dmitry@daynix.com>
> +S: Maintained
> +F: include/net/eth.h
> +F: net/eth.c
> +F: hw/net/net_rx_pkt*
> +F: hw/net/net_tx_pkt*
> +

[...]

>
> +}
> +
> +bool net_tx_pkt_add_raw_fragment(struct NetTxPkt *pkt, hwaddr pa,
> +    size_t len)
> +{
> +    hwaddr mapped_len = 0;
> +    struct iovec *ventry;
> +    assert(pkt);
> +    assert(pkt->max_raw_frags > pkt->raw_frags);
> +
> +    if (!len) {
> +        return true;
> +     }
> +
> +    ventry = &pkt->raw[pkt->raw_frags];
> +    mapped_len = len;
> +
> +    ventry->iov_base = cpu_physical_memory_map(pa, &mapped_len, false);

I see an interesting issue here. The e1000e codes use pci_dma_XXX
helpers, so actually it was ready for IOMMU.  We probably want that here
also, otherwise e1000e with IOMMU may break. And since the codes were
shared with vmxnet3, so probably need another patch to convert vmxnet3
to use dma helpers.

[...]

  reply	other threads:[~2016-03-08  3:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 17:37 [Qemu-devel] [PATCH v2 00/13] Introduce Intel 82574 GbE Controller Emulation (e1000e) Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 01/13] msix: make msix_clr_pending() visible for clients Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 02/13] pci: Introduce define for PM capability version 1.1 Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 03/13] pcie: Add support for PCIe CAP v1 Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 04/13] pcie: Introduce function for DSN capability creation Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 05/13] vmxnet3: Use generic function for DSN capability definition Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 06/13] net: Introduce Toeplitz hash calculator Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 07/13] net: Add macros for MAC address tracing Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 08/13] vmxnet3: Use common MAC address tracing macros Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 09/13] net_pkt: Name vmxnet3 packet abstractions more generic Leonid Bloch
2016-03-08  3:10   ` Jason Wang [this message]
2016-04-06  7:27     ` Dmitry Fleytman
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 10/13] rtl8139: Move more TCP definitions to common header Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 11/13] net_pkt: Extend packet abstraction as required by e1000e functionality Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 12/13] e1000_regs: Add definitions for Intel 82574-specific bits Leonid Bloch
2016-02-22 17:37 ` [Qemu-devel] [PATCH v2 13/13] net: Introduce e1000e device emulation Leonid Bloch
2016-03-08  9:31   ` Jason Wang
2016-04-06  8:22     ` Dmitry Fleytman
2016-04-06 13:23       ` Michael S. Tsirkin
2016-04-06 13:42         ` Dmitry Fleytman
2016-04-06 13:44           ` Michael S. Tsirkin
2016-04-06 13:45             ` Dmitry Fleytman
2016-04-07  7:24       ` Jason Wang
2016-04-10 15:08         ` Dmitry Fleytman
2016-03-03 10:02 ` [Qemu-devel] [PATCH v2 00/13] Introduce Intel 82574 GbE Controller Emulation (e1000e) Leonid Bloch
2016-03-04  1:22   ` Jason Wang
2016-03-08  3:01 ` Jason Wang
2016-04-06  7:25   ` Dmitry Fleytman
2016-04-06  7:27   ` Dmitry Fleytman
2016-03-08  9:51 ` Jason Wang
2016-04-06  7:23   ` Dmitry Fleytman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56DE42C1.506@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=leonid.bloch@ravellosystems.com \
    --cc=leonid@daynix.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shmulik.ladkani@ravellosystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.