DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Yang, Zhiyong" <zhiyong.yang@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "Tan, Jianfeng" <jianfeng.tan@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"yliu@fridaylinux.org" <yliu@fridaylinux.org>,
	"Bie, Tiwei" <tiwei.bie@intel.com>,
	"Wang, Zhihong" <zhihong.wang@intel.com>,
	"Wang, Dong1" <dong1.wang@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/4] vhost: move fdset functions from fd_man.c to fd_man.h
Date: Fri, 16 Mar 2018 08:43:32 +0000	[thread overview]
Message-ID: <E182254E98A5DA4EB1E657AC7CB9BD2A8B06F099@BGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <4377329.31r3eYUQgx@xps>



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, March 15, 2018 5:33 PM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>
> Cc: Tan, Jianfeng <jianfeng.tan@intel.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>; dev@dpdk.org; yliu@fridaylinux.org; Bie,
> Tiwei <tiwei.bie@intel.com>; Wang, Zhihong <zhihong.wang@intel.com>;
> Wang, Dong1 <dong1.wang@intel.com>
> Subject: Re: [PATCH 1/4] vhost: move fdset functions from fd_man.c to
> fd_man.h
> 
> 13/03/2018 10:50, Yang, Zhiyong:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 13/03/2018 09:46, Yang, Zhiyong:
> > > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > > > 05/03/2018 08:43, Yang, Zhiyong:
> > > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > > > > > I don't see why it should be exported outside of DPDK,
> > > > > > > except for
> > > PMDs.
> > > > > > > I would tend to keep it internal but I understand that it
> > > > > > > would mean duplicating some code, which is not ideal.
> > > > > > > Please could you show what would be the content of the .h in EAL?
> > > > > > >
> > > > > >
> > > > > > If needed to expose them in eal.h, I think that they should be
> > > > > > the whole fdset mechanism as followings.
> > > > > >
> > > > > > typedef void (*fd_cb)(int fd, void *dat, int *remove);
> > > > > >
> > > > > > struct fdentry {
> > > > > > 	int fd;		/* -1 indicates this entry is empty */
> > > > > > 	fd_cb rcb;	/* callback when this fd is readable. */
> > > > > > 	fd_cb wcb;	/* callback when this fd is writeable.*/
> > > > > > 	void *dat;	/* fd context */
> > > > > > 	int busy;	/* whether this entry is being used in cb. */
> > > > > > };
> > > > > >
> > > > > > struct fdset {
> > > > > > 	struct pollfd rwfds[MAX_FDS];
> > > > > > 	struct fdentry fd[MAX_FDS];
> > > > > > 	pthread_mutex_t fd_mutex;
> > > > > > 	int num;	/* current fd number of this fdset */
> > > > > > };
> > > > > >
> > > > > > void fdset_init(struct fdset *pfdset);    (not used in the patchset)
> > > > > >
> > > > > > int fdset_add(struct fdset *pfdset, int fd,
> > > > > > 	fd_cb rcb, fd_cb wcb, void *dat);     (used in this patchset)
> > > > > >
> > > > > > void *fdset_del(struct fdset *pfdset, int fd); (not used in
> > > > > > the
> > > > > > patchset)
> > > > > >
> > > > > > void *fdset_event_dispatch(void *arg);   (used in this patchset)
> > > > > >
> > > > > > seems that we have 4 options.
> > > > > > 1) expose them in librte_vhost
> > > > > > 2) expose them in other existing or new libs. for example,  eal.
> > > > > > 3) duplicate the code lines at PMD layer.
> > > > > > 4) do it as the patch does that.
> > > > >
> > > > > It looks to be very close of the interrupt thread.
> > > > > Can we have all merged in an unique event dispatcher thread?
> > > >
> > > > If I understand right, do you mean that we can merge them in lib eal ?
> right?
> > >
> > > Yes merge with interrupt thread in EAL.
> > > I didn't look at the details, but it seems the right place for such thing.
> > >
> > Ok,  we have to expose them as new APIs.  Expect that somebody as DPDK
> > users can use and like them as well. :)
> 
> I think you missed my initial question:
> Is it possible to merge the vhost events needs in the EAL interrupt thread?
> 

Sorry to miss this question.
Compared to vhost event mechanism(poll), Eal interrupt uses epoll,
>From my basic understanding,  linux and freeBSD both support poll,
Epoll is supported by Linux only. 

Hi Maxime, 
I want to know your opinion about Thomas's question.

This patchset aim to support for virtio-user server mode and just need to call event functions,
So, Let me try librte_eal epoll mechanism if support for server mode.


Thanks
Zhiyong

  reply	other threads:[~2018-03-16  8:43 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 14:53 [dpdk-dev] [PATCH 0/4] add to support for virtio-user server mode Zhiyong Yang
2018-02-14 14:53 ` [dpdk-dev] [PATCH 1/4] vhost: move fdset functions from fd_man.c to fd_man.h Zhiyong Yang
2018-02-27 17:51   ` Maxime Coquelin
2018-02-28  1:36     ` Yang, Zhiyong
2018-02-28  8:45       ` Maxime Coquelin
2018-03-01  6:02         ` Tan, Jianfeng
2018-03-01 14:13           ` Thomas Monjalon
2018-03-05  7:43             ` Yang, Zhiyong
2018-03-05  8:54               ` Thomas Monjalon
2018-03-13  8:46                 ` Yang, Zhiyong
     [not found]                   ` <9059097.ABoCBN0gVk@xps>
2018-03-13  9:50                     ` Yang, Zhiyong
2018-03-15  9:32                       ` Thomas Monjalon
2018-03-16  8:43                         ` Yang, Zhiyong [this message]
2018-03-21  6:51                           ` Yang, Zhiyong
2018-03-15  9:45   ` [dpdk-dev] [PATCH v2 0/5] add support for virtio-user server mode zhiyong.yang
2018-03-15  9:45     ` [dpdk-dev] [PATCH v2 1/5] net/virtio: fix add pointer checking zhiyong.yang
2018-03-15  9:45     ` [dpdk-dev] [PATCH v2 2/5] net/virtio: add checking for cvq zhiyong.yang
2018-03-15  9:45     ` [dpdk-dev] [PATCH v2 3/5] eal: expose fdset related APIs zhiyong.yang
2018-03-15  9:45     ` [dpdk-dev] [PATCH v2 4/5] net/virtio-user: add support for server mode zhiyong.yang
2018-03-15  9:45     ` [dpdk-dev] [PATCH v2 5/5] net/vhost: add memory checking zhiyong.yang
2018-02-14 14:53 ` [dpdk-dev] [PATCH 2/4] net/virtio-user: add data members to support server mode Zhiyong Yang
2018-02-27 17:53   ` Maxime Coquelin
2018-02-28  1:38     ` Yang, Zhiyong
2018-02-14 14:53 ` [dpdk-dev] [PATCH 3/4] net/virtio-user: " Zhiyong Yang
2018-02-27 18:01   ` Maxime Coquelin
2018-02-28  1:53     ` Yang, Zhiyong
2018-02-28  8:33       ` Maxime Coquelin
2018-02-14 14:53 ` [dpdk-dev] [PATCH 4/4] net/vhost: add memory checking to support client mode Zhiyong Yang
2018-03-21  3:03 ` [dpdk-dev] [PATCH v3 0/4] add support for virtio-user server mode zhiyong.yang
2018-03-21  3:03   ` [dpdk-dev] [PATCH v3 1/4] net/virtio: fix add pointer checking zhiyong.yang
2018-03-28  7:26     ` Tan, Jianfeng
2018-03-28  7:48       ` Yang, Zhiyong
2018-03-29 11:59     ` Maxime Coquelin
2018-03-29 12:01     ` Maxime Coquelin
2018-03-21  3:03   ` [dpdk-dev] [PATCH v3 2/4] net/virtio: add checking for cvq zhiyong.yang
2018-03-28  8:34     ` Tan, Jianfeng
2018-03-29 11:59     ` Maxime Coquelin
2018-03-29 12:06     ` Maxime Coquelin
2018-03-21  3:03   ` [dpdk-dev] [PATCH v3 3/4] net/virtio-user: add support for server mode zhiyong.yang
2018-03-28 15:14     ` Tan, Jianfeng
2018-03-30  2:08       ` Yang, Zhiyong
2018-03-21  3:03   ` [dpdk-dev] [PATCH v3 4/4] net/vhost: add NULL pointer checking zhiyong.yang
2018-03-29 13:19     ` Maxime Coquelin
2018-03-30  2:00       ` Yang, Zhiyong
2018-03-30  7:41         ` Yang, Zhiyong
2018-04-03 12:20   ` [dpdk-dev] [PATCH v4 0/1] server mode virtio-user zhiyong.yang
2018-04-03 12:20     ` [dpdk-dev] [PATCH v4 1/1] net/virtio-user: add support for server mode zhiyong.yang
2018-04-03 15:16       ` Tan, Jianfeng
2018-04-04  3:31         ` Yang, Zhiyong
2018-04-04  3:47           ` Tan, Jianfeng
2018-04-04  5:37         ` Tiwei Bie
2018-04-04  9:59           ` Yang, Zhiyong
2018-04-04 14:57             ` Yang, Zhiyong
2018-04-04 17:17       ` [dpdk-dev] [PATCH v5] " zhiyong.yang
2018-04-05  8:29         ` Tiwei Bie
2018-04-05  9:19           ` Yang, Zhiyong
2018-04-06  7:22           ` Yang, Zhiyong
2018-04-05  9:21         ` Yang, Zhiyong
2018-04-06  0:18         ` [dpdk-dev] [PATCH v6] " zhiyong.yang
2018-04-05 18:13           ` Tan, Jianfeng
2018-04-06  7:14             ` Yang, Zhiyong
2018-04-06  9:25           ` [dpdk-dev] [PATCH v7] " zhiyong.yang
2018-04-08  0:36             ` Tan, Jianfeng
2018-04-10 11:55               ` Maxime Coquelin

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=E182254E98A5DA4EB1E657AC7CB9BD2A8B06F099@BGSMSX101.gar.corp.intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=dong1.wang@intel.com \
    --cc=jianfeng.tan@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    --cc=tiwei.bie@intel.com \
    --cc=yliu@fridaylinux.org \
    --cc=zhihong.wang@intel.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).