From: Santosh Shukla <sshukla@mvista.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [ [PATCH v2] 10/13] include/exec-env: ioport: add rte_virt_ioport header file
Date: Mon, 14 Dec 2015 21:47:30 +0530 [thread overview]
Message-ID: <CAAyOgsaSOMam2Nr6hwNXNZJKzRJ2ekHPYZksJpH8ktsNnUC8Ww@mail.gmail.com> (raw)
In-Reply-To: <20151214144356.GE30309@localhost.localdomain>
On Mon, Dec 14, 2015 at 8:13 PM, Jerin Jacob
<jerin.jacob@caviumnetworks.com> wrote:
> On Mon, Dec 14, 2015 at 06:30:29PM +0530, Santosh Shukla wrote:
>> including virtio_ioport header file has iopci bar page_size, bar_len and
>> device filename info.
>>
>> Signed-off-by: Santosh Shukla <sshukla@mvista.com>
>> ---
>> lib/librte_eal/linuxapp/eal/Makefile | 2 +-
>> .../eal/include/exec-env/rte_virt_ioport.h | 81 ++++++++++++++++++++
>> 2 files changed, 82 insertions(+), 1 deletion(-)
>> create mode 100644 lib/librte_eal/linuxapp/eal/include/exec-env/rte_virt_ioport.h
>>
>> diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
>> index 26eced5..1252e05 100644
>> --- a/lib/librte_eal/linuxapp/eal/Makefile
>> +++ b/lib/librte_eal/linuxapp/eal/Makefile
>> @@ -115,7 +115,7 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
>> CFLAGS_eal_thread.o += -Wno-return-type
>> endif
>>
>> -INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h
>> +INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h rte_virt_ioport.h
>>
>> SYMLINK-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP)-include/exec-env := \
>> $(addprefix include/exec-env/,$(INC))
>> diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_virt_ioport.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_virt_ioport.h
>> new file mode 100644
>> index 0000000..8098eaf
>> --- /dev/null
>> +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_virt_ioport.h
>> @@ -0,0 +1,81 @@
>> +/*
>> + * This file is provided under a dual BSD/LGPLv2 license. When using or
>> + * redistributing this file, you may do so under either license.
>> + *
>> + * GNU LESSER GENERAL PUBLIC LICENSE
>> + *
>> + * Copyright(c) 2015 Cavium Networks. All rights reserved.
>> + * All rights reserved.
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of version 2.1 of the GNU Lesser General Public License
>> + * as published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope that it will be useful, but
>> + * WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public License
>> + * along with this program; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
>> + *
>> + * Contact Information:
>> + * Cavium Networks
>> + *
>> + *
>> + * BSD LICENSE
>> + *
>> + * Copyright(c) 2015 Cavium Networks. All rights reserved.
>> + * All rights reserved.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + *
>> + * * Redistributions of source code must retain the above copyright
>> + * notice, this list of conditions and the following disclaimer.
>> + * * Redistributions in binary form must reproduce the above copyright
>> + * notice, this list of conditions and the following disclaimer in
>> + * the documentation and/or other materials provided with the
>> + * distribution.
>> + * * Neither the name of Intel Corporation nor the names of its
>> + * contributors may be used to endorse or promote products derived
>> + * from this software without specific prior written permission.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>> + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
>> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
>> + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
>> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>> + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>> + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>> + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>> + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> + *
>> + */
>> +#ifndef _RTE_VIRTIO_IOPORT_H_
>> +#define _RTE_VIRTIO_IOPORT_H_
>> +
>> +#define VIRT_IOPORT_DEV "/dev/igb_ioport"
>> +
>> +/**
>> + * Keeping pci_virt_ioport_size = 4k.
>> + * So maximum mmaped pci_iobar supported =
>> + * (virt_ioport_size/pci_dev->mem_resource[0].len)
>> + * where, pci_dev->mem_resource[0].len == virtio_pci_iobar_len i.e.. 32 byte
>> + *
>> + * Note: kernel could allow maximum 32 virtio-net-pci interface, that mean
>> + * maximum 32 PCI_IOBAR(s) where each PCI_IOBAR_LEN=0x20, so virtio_map_ioport()
>> + * func by theory gonna support 4k/0x20 ==> 128 PCI_IOBAR(s), more than
>> + * max-virtio-net-pci interface.
>> + */
>> +#define PAGE_SIZE 4096
>
> IMO, We can remove this PAGE_SIZE macro and set PCI_VIRT_IOPORT_SIZE as
> 4096 directly. It will remove the confusion between
> kernel page size
>
yes.
>> +#define PCI_VIRT_IOPORT_SIZE PAGE_SIZE
>> +#define PCI_VIRT_IOBAR_LEN 32
>> +#define PCI_VIRT_IOPORT_MAX (PCI_VIRT_IOPORT_SIZE/PCI_VIRT_IOBAR_LEN)
>> + /* 128 max ioport */
>> +
>> +#endif /* _RTE_VIRTIO_IOPORT_H_ */
>> --
>> 1.7.9.5
>>
next prev parent reply other threads:[~2015-12-14 16:17 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 13:00 [dpdk-dev] [ [PATCH v2] 00/13] Add virtio support in arm/arm64 Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 01/13] virtio: Introduce config RTE_VIRTIO_INC_VECTOR Santosh Shukla
2015-12-17 12:02 ` Santosh Shukla
2015-12-17 12:03 ` Thomas Monjalon
2015-12-17 12:18 ` Santosh Shukla
2015-12-17 23:24 ` Stephen Hemminger
2015-12-18 1:31 ` Yuanhan Liu
2015-12-18 9:52 ` Xie, Huawei
2015-12-18 10:41 ` Thomas Monjalon
2015-12-18 17:33 ` Stephen Hemminger
2015-12-18 18:11 ` Thomas Monjalon
2015-12-18 12:46 ` Santosh Shukla
2015-12-22 6:26 ` Yuanhan Liu
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 02/13] config: i686: set RTE_VIRTIO_INC_VECTOR=n Santosh Shukla
2015-12-17 12:03 ` Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 03/13] rte_io: armv7/v8: Introduce api to emulate x86-style of PCI/ISA ioport access Santosh Shukla
2015-12-14 14:25 ` Jerin Jacob
2015-12-14 16:29 ` Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 04/13] virtio_pci: use rte_io.h for non-x86 arch Santosh Shukla
2015-12-14 14:28 ` Jerin Jacob
2015-12-14 15:29 ` Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type Santosh Shukla
2015-12-16 13:48 ` Yuanhan Liu
2015-12-16 14:01 ` Santosh Shukla
2015-12-16 14:23 ` Yuanhan Liu
2015-12-16 14:39 ` Santosh Shukla
2015-12-16 14:58 ` Yuanhan Liu
2015-12-16 15:05 ` Santosh Shukla
2015-12-17 7:19 ` Yuanhan Liu
2015-12-17 8:17 ` Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 06/13] config: armv7/v8: Enable RTE_LIBRTE_VIRTIO_PMD Santosh Shukla
2015-12-14 14:31 ` Jerin Jacob
2015-12-14 16:16 ` Santosh Shukla
2015-12-15 5:36 ` Jianbo Liu
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 07/13] linuxapp: eal: arm: Always return 0 for rte_eal_iopl_init() Santosh Shukla
2015-12-14 14:34 ` Jan Viktorin
2015-12-14 15:04 ` Santosh Shukla
2015-12-14 14:37 ` Jerin Jacob
2015-12-14 15:24 ` Santosh Shukla
2015-12-14 15:56 ` Jerin Jacob
2015-12-14 16:13 ` Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 08/13] rte_io: x86: Remove sys/io.h ifdef x86 clutter Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 09/13] igb_uio: ioport: map iopci region for armv7/v8 Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 10/13] include/exec-env: ioport: add rte_virt_ioport header file Santosh Shukla
2015-12-14 14:43 ` Jerin Jacob
2015-12-14 16:17 ` Santosh Shukla [this message]
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region Santosh Shukla
2015-12-16 13:29 ` Yuanhan Liu
2015-12-16 14:20 ` Santosh Shukla
2015-12-16 14:37 ` Yuanhan Liu
2015-12-16 14:40 ` Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 12/13] virtio_ethdev: use virtio_ioport api at device init/close Santosh Shukla
2015-12-14 13:00 ` [dpdk-dev] [ [PATCH v2] 13/13] virtio_ethdev : fix format specifier error for 64bit addr case Santosh Shukla
2015-12-14 14:31 ` [dpdk-dev] [ [PATCH v2] 00/13] Add virtio support in arm/arm64 Jan Viktorin
2015-12-14 16:09 ` Santosh Shukla
2015-12-16 7:48 ` Santosh Shukla
2015-12-16 8:47 ` David Marchand
2015-12-16 11:43 ` Santosh Shukla
2015-12-16 12:31 ` [dpdk-dev] [PATCH] eal: map io resources for non x86 architectures David Marchand
2015-12-16 12:48 ` Yuanhan Liu
2015-12-16 13:34 ` David Marchand
2015-12-16 13:42 ` Yuanhan Liu
2015-12-16 13:51 ` Santosh Shukla
2015-12-17 9:38 ` Yuanhan Liu
2015-12-17 10:01 ` Santosh Shukla
2015-12-17 10:02 ` Santosh Shukla
2015-12-17 10:07 ` Santosh Shukla
2015-12-17 10:14 ` Thomas Monjalon
2015-12-17 10:21 ` Santosh Shukla
2015-12-17 10:33 ` Thomas Monjalon
2015-12-17 11:22 ` Santosh Shukla
2015-12-18 5:30 ` Yuanhan Liu
2015-12-18 6:34 ` Jerin Jacob
2015-12-18 7:55 ` Yuanhan Liu
2015-12-18 9:37 ` Thomas Monjalon
2015-12-18 7:54 ` Santosh Shukla
2015-12-18 8:21 ` Yuanhan Liu
2015-12-18 12:55 ` Santosh Shukla
2015-12-29 5:56 ` Santosh Shukla
2015-12-29 9:56 ` Burakov, Anatoly
2015-12-29 10:47 ` Santosh Shukla
2015-12-29 11:06 ` Burakov, Anatoly
2015-12-29 12:23 ` Santosh Shukla
2015-12-29 14:04 ` Alex Williamson
2015-12-29 14:51 ` Santosh Shukla
2015-12-31 14:27 ` Santosh Shukla
2015-12-16 13:15 ` Bruce Richardson
2015-12-16 13:29 ` David Marchand
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=CAAyOgsaSOMam2Nr6hwNXNZJKzRJ2ekHPYZksJpH8ktsNnUC8Ww@mail.gmail.com \
--to=sshukla@mvista.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).