Re: [PATCH 00/27] staging: add driver for KS7010 based SDIO cards
On Wed, May 11, 2016 at 08:06:15AM +0200, Wolfram Sang wrote: > On Tue, May 10, 2016 at 11:05:34PM +0200, Greg KH wrote: > > On Tue, May 10, 2016 at 03:52:13PM +0200, Wolfram Sang wrote: > > > This driver can be used with later Spectec SDW-821 and all SDW-823 cards. > > > See patch 1 and README for more details about its origin. To have the card > > > working, you need another patch which is already in mmc/next: > > > > > > https://patchwork.kernel.org/patch/9043341/ > > > > > > A working topic branch for the Renesas H3 can be found here: > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git > > > renesas/topic/gen3-sdio > > > > > > This series only can be found here: > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git staging/ks7010 > > > > > > Note: I needed this driver to verify SDIO capabilities for the new > > > Renesas H3 > > > SoC. The fact that the original KS7010 driver also comes from Renesas is a > > > coincidence. It does not mean official support for this driver. Parts of > > > this > > > work were backed by the above mentioned SDIO verification task while other > > > parts were my personal interest. Future patches and reviews will also > > > done by > > > me as a private person (unless something very surprising happens ;)) > > > > > > Please comment, review, apply... > > > > Can you change the README file to be named TODO to match all of the > > other staging driver files? That way people can look at them by just > > doing a staging/*/TODO match. > > Will do. Do you want a) an incremental patch, b) and updated branch to > pull from, or c) the whole series resend? An add-on patch is probably easiest for everyone involved here. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: rename README to TODO
From: Wolfram Sang To follow common pattern for staging/. Signed-off-by: Wolfram Sang --- drivers/staging/ks7010/{README => TODO} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename drivers/staging/ks7010/{README => TODO} (100%) diff --git a/drivers/staging/ks7010/README b/drivers/staging/ks7010/TODO similarity index 100% rename from drivers/staging/ks7010/README rename to drivers/staging/ks7010/TODO -- 2.8.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: ks7010: rename README to TODO
From: Wolfram Sang To follow common pattern for staging/. Signed-off-by: Wolfram Sang --- Change in V2: correct authorship, sorry for the noise! drivers/staging/ks7010/{README => TODO} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename drivers/staging/ks7010/{README => TODO} (100%) diff --git a/drivers/staging/ks7010/README b/drivers/staging/ks7010/TODO similarity index 100% rename from drivers/staging/ks7010/README rename to drivers/staging/ks7010/TODO -- 2.8.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: ks7010: adapt to new trans_start handling
From: Wolfram Sang trans_start is gone from netdevice, so use the new helper function to set the mark. Signed-off-by: Wolfram Sang --- This fixup is needed to build with linux/next because it contains a patch dropping trans_start. But the new helper is not there in current linux master. drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 3e282833372305..ac3354bf6f8c8a 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -3398,7 +3398,7 @@ int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev) netif_stop_queue(dev); rc = hostif_data_request(priv, skb); - dev->trans_start = jiffies; + netif_trans_update(dev); DPRINTK(4, "rc=%d\n", rc); if (rc) { -- 2.8.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: i4l: icn: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani --- drivers/staging/i4l/icn/icn.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/i4l/icn/icn.c b/drivers/staging/i4l/icn/icn.c index 46d957c..4cc5a7f 100644 --- a/drivers/staging/i4l/icn/icn.c +++ b/drivers/staging/i4l/icn/icn.c @@ -980,18 +980,17 @@ icn_loadproto(u_char __user *buffer, icn_card *card) card->secondhalf); #endif spin_lock_irqsave(&card->lock, flags); - init_timer(&card->st_timer); - card->st_timer.expires = jiffies + ICN_TIMER_DCREAD; - card->st_timer.function = icn_polldchan; - card->st_timer.data = (unsigned long) card; - add_timer(&card->st_timer); + setup_timer(&card->st_timer, icn_polldchan, + (unsigned long)card); + mod_timer(&card->st_timer, + jiffies + ICN_TIMER_DCREAD); card->flags |= ICN_FLAGS_RUNNING; if (card->doubleS0) { - init_timer(&card->other->st_timer); - card->other->st_timer.expires = jiffies + ICN_TIMER_DCREAD; - card->other->st_timer.function = icn_polldchan; - card->other->st_timer.data = (unsigned long) card->other; - add_timer(&card->other->st_timer); + setup_timer(&card->other->st_timer, + icn_polldchan, + (unsigned long)card->other); + mod_timer(&card->other->st_timer, + jiffies + ICN_TIMER_DCREAD); card->other->flags |= ICN_FLAGS_RUNNING; } spin_unlock_irqrestore(&card->lock, flags); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH RESEND^3] [media] staging/davinci_vfpe: allow modular build
It has never been possible to actually build this driver as a loadable module, only built-in because the Makefile attempts to build each file into its own module and fails: ERROR: "mbus_to_pix" [drivers/staging/media/davinci_vpfe/vpfe_video.ko] undefined! ERROR: "vpfe_resizer_register_entities" [drivers/staging/media/davinci_vpfe/vpfe_mc_capture.ko] undefined! ERROR: "rsz_enable" [drivers/staging/media/davinci_vpfe/dm365_resizer.ko] undefined! ERROR: "config_ipipe_hw" [drivers/staging/media/davinci_vpfe/dm365_ipipe.ko] undefined! ERROR: "ipipe_set_lutdpc_regs" [drivers/staging/media/davinci_vpfe/dm365_ipipe.ko] undefined! It took a long time to catch this bug with randconfig builds because at least 14 other Kconfig symbols have to be enabled in order to configure this one, and it was clearly only ever tested as built-in with mainline kernels, if at all. The solution is really easy: this patch changes the Makefile to link all files into one module. As discussed previously, the driver has never before used successfully as a loadable module, but there is no reason to prevent that configuration. Signed-off-by: Arnd Bergmann Link: http://lkml.iu.edu/hypermail/linux/kernel/1512.1/02383.html --- I keep running into this bug roughly every 1 randconfig builds, please apply the fix. drivers/staging/media/davinci_vpfe/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/Makefile b/drivers/staging/media/davinci_vpfe/Makefile index c64515c644cd..3019c9ecd548 100644 --- a/drivers/staging/media/davinci_vpfe/Makefile +++ b/drivers/staging/media/davinci_vpfe/Makefile @@ -1,3 +1,5 @@ -obj-$(CONFIG_VIDEO_DM365_VPFE) += \ +obj-$(CONFIG_VIDEO_DM365_VPFE) += davinci-vfpe.o + +davinci-vfpe-objs := \ dm365_isif.o dm365_ipipe_hw.o dm365_ipipe.o \ dm365_resizer.o dm365_ipipeif.o vpfe_mc_capture.o vpfe_video.o -- 2.7.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] MAINTAINERS: add entry for the Sync File Framework
From: Gustavo Padovan Add Gustavo as maintainer for the Sync File Framework. Sumit is co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's tree as base. Cc: Sumit Semwal Signed-off-by: Gustavo Padovan --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8c10b4c..0abc9c3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3677,6 +3677,16 @@ F: include/linux/*fence.h F: Documentation/dma-buf-sharing.txt T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git +SYNC FILE FRAMEWORK +M: Gustavo Padovan +S: Maintained +L: linux-me...@vger.kernel.org +L: dri-de...@lists.freedesktop.org +F: drivers/dma-buf/sync_file.c +F: include/linux/sync_file.h +F: Documentation/sync_file.txt +T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git + DMA GENERIC OFFLOAD ENGINE SUBSYSTEM M: Vinod Koul L: dmaeng...@vger.kernel.org -- 2.5.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: i4l: pcbit: edss1: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani --- drivers/staging/i4l/pcbit/edss1.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/i4l/pcbit/edss1.c b/drivers/staging/i4l/pcbit/edss1.c index e72c164..6d291d5 100644 --- a/drivers/staging/i4l/pcbit/edss1.c +++ b/drivers/staging/i4l/pcbit/edss1.c @@ -298,11 +298,8 @@ void pcbit_fsm_event(struct pcbit_dev *dev, struct pcbit_chan *chan, break; if (tentry->init != 0xff) { - init_timer(&chan->fsm_timer); - chan->fsm_timer.function = &pcbit_fsm_timer; - chan->fsm_timer.data = (ulong) chan; - chan->fsm_timer.expires = jiffies + tentry->timeout * HZ; - add_timer(&chan->fsm_timer); + setup_timer(&chan->fsm_timer, &pcbit_fsm_timer, (ulong)chan); + mod_timer(&chan->fsm_timer, jiffies + tentry->timeout * HZ); } spin_unlock_irqrestore(&dev->lock, flags); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: i4l: pcbit: drv: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani --- drivers/staging/i4l/pcbit/drv.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/staging/i4l/pcbit/drv.c b/drivers/staging/i4l/pcbit/drv.c index c5270e2..d417df5 100644 --- a/drivers/staging/i4l/pcbit/drv.c +++ b/drivers/staging/i4l/pcbit/drv.c @@ -359,11 +359,9 @@ static int pcbit_xmit(int driver, int chnum, int ack, struct sk_buff *skb) */ #ifdef BLOCK_TIMER if (chan->block_timer.function == NULL) { - init_timer(&chan->block_timer); - chan->block_timer.function = &pcbit_block_timer; - chan->block_timer.data = (long) chan; - chan->block_timer.expires = jiffies + 1 * HZ; - add_timer(&chan->block_timer); + setup_timer(&chan->block_timer, &pcbit_block_timer, + (long)chan); + mod_timer(&chan->block_timer, jiffies + 1 * HZ); } #endif return 0; @@ -804,11 +802,7 @@ static int set_protocol_running(struct pcbit_dev *dev) { isdn_ctrl ctl; - init_timer(&dev->set_running_timer); - - dev->set_running_timer.function = &set_running_timeout; - dev->set_running_timer.data = (ulong) dev; - dev->set_running_timer.expires = jiffies + SET_RUN_TIMEOUT; + setup_timer(&dev->set_running_timer, &set_running_timeout, (ulong)dev); /* kick it */ @@ -817,7 +811,7 @@ static int set_protocol_running(struct pcbit_dev *dev) writeb((0x80U | ((dev->rcv_seq & 0x07) << 3) | (dev->send_seq & 0x07)), dev->sh_mem + BANK4); - add_timer(&dev->set_running_timer); + mod_timer(&dev->set_running_timer, jiffies + SET_RUN_TIMEOUT); wait_event(dev->set_running_wq, dev->l2_state == L2_RUNNING || dev->l2_state == L2_DOWN); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: i4l: pcbit: layer2: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard way to set a timer up. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer and mod_timer to setup and arm a timer, to make the code cleaner and easier to read. Signed-off-by: Muhammad Falak R Wani --- drivers/staging/i4l/pcbit/layer2.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/i4l/pcbit/layer2.c b/drivers/staging/i4l/pcbit/layer2.c index 46e1240..a136c72 100644 --- a/drivers/staging/i4l/pcbit/layer2.c +++ b/drivers/staging/i4l/pcbit/layer2.c @@ -645,11 +645,9 @@ pcbit_l2_error(struct pcbit_dev *dev) dev->l2_state = L2_DOWN; - init_timer(&dev->error_recover_timer); - dev->error_recover_timer.function = &pcbit_l2_err_recover; - dev->error_recover_timer.data = (ulong) dev; - dev->error_recover_timer.expires = jiffies + ERRTIME; - add_timer(&dev->error_recover_timer); + setup_timer(&dev->error_recover_timer, &pcbit_l2_err_recover, + (ulong)dev); + mod_timer(&dev->error_recover_timer, jiffies + ERRTIME); } } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] MAINTAINERS: add entry for the Sync File Framework
Hi Gustavo, On 11 May 2016 at 19:15, Gustavo Padovan wrote: > From: Gustavo Padovan > > Add Gustavo as maintainer for the Sync File Framework. Sumit is > co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's > tree as base. > > Cc: Sumit Semwal > Signed-off-by: Gustavo Padovan With the de-staging patches going through staging, perhaps we should add an Acked-by: Sumit Semwal and request Greg to take it via the same? > --- > MAINTAINERS | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 8c10b4c..0abc9c3 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3677,6 +3677,16 @@ F: include/linux/*fence.h > F: Documentation/dma-buf-sharing.txt > T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git > > +SYNC FILE FRAMEWORK > +M: Gustavo Padovan > +S: Maintained > +L: linux-me...@vger.kernel.org > +L: dri-de...@lists.freedesktop.org > +F: drivers/dma-buf/sync_file.c > +F: include/linux/sync_file.h > +F: Documentation/sync_file.txt > +T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git > + > DMA GENERIC OFFLOAD ENGINE SUBSYSTEM > M: Vinod Koul > L: dmaeng...@vger.kernel.org > -- > 2.5.5 > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: wlan-ng: Fix trailing */ in block comments.
Fix checkpatch.pl warning: WARNING: Block comments use a trailing */ on a separate line. Signed-off-by: Bo Yu --- drivers/staging/wlan-ng/prism2mib.c | 506 ++-- 1 file changed, 253 insertions(+), 253 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index fe914b1..4dd4cdf 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -237,25 +237,25 @@ static struct mibrec mibtab[] = { {0, 0, 0, 0, 0, NULL} }; -/* -* prism2mgmt_mibset_mibget -* -* Set the value of a mib item. -* -* Arguments: -* wlandev wlan device structure -* msgpptr to msg buffer -* -* Returns: -* 0 success and done -* <0 success, but we're waiting for something to finish. -* >0 an error occurred while handling the message. -* Side effects: -* -* Call context: -* process thread (usually) -* interrupt -*/ +/* + * prism2mgmt_mibset_mibget + * + * Set the value of a mib item. + * + * Arguments: + * wlandev wlan device structure + * msgpptr to msg buffer + * + * Returns: + * 0 success and done + * <0 success, but we're waiting for something to finish. + * >0 an error occurred while handling the message. + * Side effects: + * + * Call context: + * process thread (usually) + * interrupt + */ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp) { @@ -346,30 +346,30 @@ done: return 0; } -/* -* prism2mib_bytearea2pstr -* -* Get/set pstr data to/from a byte area. -* -* MIB record parameters: -* parm1Prism2 RID value. -* parm2Number of bytes of RID data. -* parm3Not used. -* -* Arguments: -* mib MIB record. -* isgetMIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -*/ +/* + * prism2mib_bytearea2pstr + * + * Get/set pstr data to/from a byte area. + * + * MIB record parameters: + * parm1Prism2 RID value. + * parm2Number of bytes of RID data. + * parm3Not used. + * + * Arguments: + * mib MIB record. + * isgetMIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_bytearea2pstr(struct mibrec *mib, int isget, @@ -396,30 +396,30 @@ static int prism2mib_bytearea2pstr(struct mibrec *mib, return result; } -/* -* prism2mib_uint32 -* -* Get/set uint32 data. -* -* MIB record parameters: -* parm1Prism2 RID value. -* parm2Not used. -* parm3Not used. -* -* Arguments: -* mib MIB record. -* isgetMIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Success. -* ~0 - Error. -* -*/ +/* + * prism2mib_uint32 + * + * Get/set uint32 data. + * + * MIB record parameters: + * parm1Prism2 RID value. + * parm2Not used. + * parm3Not used. + * + * Arguments: + * mib MIB record. + * isgetMIBGET/MIBSET flag. + * wlandev wlan device structure. + * priv "priv" structure. + * hw "hw" structure. + * msg Message structure. + * data Data buffer. + * + * Returns: + * 0 - Success. + * ~0 - Error. + * + */ static int prism2mib_uint32(struct mibrec *mib, int isget, @@ -443,30 +443,30 @@ static int prism2mib_uint32(struct mibrec *mib, return result; } -/* -* prism2mib_flag -* -* Get/set a flag. -* -* MIB record parameters: -* parm1Prism2 RID value. -* parm2Bit to get/set. -* parm3Not used. -* -* Arguments: -* mib MIB record. -* isgetMIBGET/MIBSET flag. -* wlandev wlan device structure. -* priv "priv" structure. -* hw "hw" structure. -* msg Message structure. -* data Data buffer. -* -* Returns: -* 0 - Succ
[PATCH] staging: lustre: use setup_timer().
Use setup_timer() for initializing the timer, instead of structure assignments. This is the preferred/standard way. Signed-off-by: Muhammad Falak R Wani --- drivers/staging/lustre/lnet/lnet/net_fault.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/net_fault.c b/drivers/staging/lustre/lnet/lnet/net_fault.c index 7d76f28..e4aceb7 100644 --- a/drivers/staging/lustre/lnet/lnet/net_fault.c +++ b/drivers/staging/lustre/lnet/lnet/net_fault.c @@ -760,9 +760,7 @@ lnet_delay_rule_add(struct lnet_fault_attr *attr) wait_event(delay_dd.dd_ctl_waitq, delay_dd.dd_running); } - init_timer(&rule->dl_timer); - rule->dl_timer.function = delay_timer_cb; - rule->dl_timer.data = (unsigned long)rule; + setup_timer(&rule->dl_timer, delay_timer_cb, (unsigned long)rule); spin_lock_init(&rule->dl_lock); INIT_LIST_HEAD(&rule->dl_msg_list); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v10 net-next 0/1] introduce Hyper-V VM Sockets(hv_sock)
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It's somewhat like TCP over VMBus, but the transportation layer (VMBus) is much simpler than IP. With Hyper-V Sockets, applications between the host and the guest can talk to each other directly by the traditional BSD-style socket APIs. Hyper-V Sockets is only available on new Windows hosts, like Windows Server 2016. More info is in this article "Make your own integration services": https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/develop/make_mgmt_service The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. You can also get the patch by: https://github.com/dcui/linux/commits/decui/hv_sock/net-next/20160512_v10 Note: the VMBus driver side's supporting patches have been in the mainline tree. I know the kernel has already had a VM Sockets driver (AF_VSOCK) based on VMware VMCI (net/vmw_vsock/, drivers/misc/vmw_vmci), and KVM is proposing AF_VSOCK of virtio version: http://marc.info/?l=linux-netdev&m=145952064004765&w=2 However, though Hyper-V Sockets may seem conceptually similar to AF_VOSCK, there are differences in the transportation layer, and IMO these make the direct code reusing impractical: 1. In AF_VSOCK, the endpoint type is: , but in AF_HYPERV, the endpoint type is: . Here GUID is 128-bit. 2. AF_VSOCK supports SOCK_DGRAM, while AF_HYPERV doesn't. 3. AF_VSOCK supports some special sock opts, like SO_VM_SOCKETS_BUFFER_SIZE, SO_VM_SOCKETS_BUFFER_MIN/MAX_SIZE and SO_VM_SOCKETS_CONNECT_TIMEOUT. These are meaningless to AF_HYPERV. 4. Some AF_VSOCK's VMCI transportation ops are meanless to AF_HYPERV/VMBus, like .notify_recv_init .notify_recv_pre_block .notify_recv_pre_dequeue .notify_recv_post_dequeue .notify_send_init .notify_send_pre_block .notify_send_pre_enqueue .notify_send_post_enqueue etc. So I think we'd better introduce a new address family: AF_HYPERV. Please review the patch. Looking forward to your comments, especially comments from David. :-) Changes since v1: - updated "[PATCH 6/7] hvsock: introduce Hyper-V VM Sockets feature" - added __init and __exit for the module init/exit functions - net/hv_sock/Kconfig: "default m" -> "default m if HYPERV" - MODULE_LICENSE: "Dual MIT/GPL" -> "Dual BSD/GPL" Changes since v2: - fixed various coding issue pointed out by David Miller - fixed indentation issues - removed pr_debug in net/hv_sock/af_hvsock.c - used reverse-Chrismas-tree style for local variables. - EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL Changes since v3: - fixed a few coding issue pointed by Vitaly Kuznetsov and Dan Carpenter - fixed the ret value in vmbus_recvpacket_hvsock on error - fixed the style of multi-line comment: vmbus_get_hvsock_rw_status() Changes since v4 (https://lkml.org/lkml/2015/7/28/404): - addressed all the comments about V4. - treat the hvsock offers/channels as special VMBus devices - add a mechanism to pass hvsock events to the hvsock driver - fixed some corner cases with proper locking when a connection is closed - rebased to the latest Greg's tree Changes since v5 (https://lkml.org/lkml/2015/12/24/103): - addressed the coding style issues (Vitaly Kuznetsov & David Miller, thanks!) - used a better coding for the per-channel rescind callback (Thank Vitaly!) - avoided the introduction of new VMBUS driver APIs vmbus_sendpacket_hvsock() and vmbus_recvpacket_hvsock() and used vmbus_sendpacket()/vmbus_recvpacket() in the higher level (i.e., the vmsock driver). Thank Vitaly! Changes since v6 (http://lkml.iu.edu/hypermail/linux/kernel/1601.3/01813.html) - only a few minor changes of coding style and comments Changes since v7 - a few minor changes of coding style: thanks, Joe Perches! - added some lines of comments about GUID/UUID before the struct sockaddr_hv. Changes since v8 - removed the unnecessary __packed for some definitions: thanks, David! - hvsock_open_connection: use offer.u.pipe.user_def[0] to know the connection and reorganized the function direction - reorganized the code according to suggestions from Cathy Avery: split big functions into small ones, set .setsockopt and getsockopt to sock_no_setsockopt/sock_no_getsockopt - inline'd some small list helper functions Changes since v9 - minimized struct hvsock_sock by making the send/recv buffers pointers. the buffers are allocated by kmalloc() in __hvsock_create() now. - minimized the sizes of the send/recv buffers and the vmbus ringbuffers. Dexuan Cui (1): hv_sock: introduce Hyper-V Sockets MAINTAINERS |2 + include/linux/hyperv.h | 14 + include/linux/socket.h |4 +- include/net/af_hvsock.h | 78 +++ include/uapi/linux/hyperv.h | 25 + net/Kconfig |1 + net/Makefile|1 + net/hv_sock/Kconfig | 10 + net/hv_sock/Makefile|3 + net/hv_sock/af_hvsock.c | 1484 +++
Re: [lustre-devel] [PATCH 1/4] staging: lustre: o2iblnd: limit cap.max_send_wr for MLX5 (fwd)
> James, > I’m pretty sure this port to upstream is flawed. See below Yep. I missed that line. Thanks for review. Greg you can drop this one. I will submit a updated version soon. This patch series is not order dependent so the other patches are safe to land. > On 5/9/16, 7:53 AM, "lustre-devel on behalf of James Simmons" > > wrote: > >>From: Dmitry Eremin >> >>Decrease cap.max_send_wr until it is accepted by rdma_create_qp() >> >>Signed-off-by: Dmitry Eremin >>Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7124 >>Reviewed-on: http://review.whamcloud.com/18347 >>Reviewed-by: Olaf Weber >>Reviewed-by: Doug Oucharek >>Reviewed-by: Oleg Drokin >>Signed-off-by: James Simmons >>--- >> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 11 ++- >> 1 files changed, 10 insertions(+), 1 deletions(-) >> >>diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >>b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >>index d99b4fa..bc179a2 100644 >>--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >>+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >>@@ -768,7 +768,12 @@ kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct >>rdma_cm_id *cmid, >> >> conn->ibc_sched = sched; >> >> -rc = rdma_create_qp(cmid, conn->ibc_hdev->ibh_pd, init_qp_attr); >> +do { >> +rc = rdma_create_qp(cmid, conn->ibc_hdev->ibh_pd, init_qp_attr); >> +if (!rc || init_qp_attr->cap.max_send_wr < 16) >> +break; > > I think the loop here is missing code to decrease the max_send_wr value. In > current master it’s > > init_qp_attr->cap.max_send_wr -= init_qp_attr->cap.max_send_wr > / 4; > >>+ } while (rc); >>+ >> if (rc) { >> CERROR("Can't create QP: %d, send_wr: %d, recv_wr: %d\n", >> rc, init_qp_attr->cap.max_send_wr, >>@@ -776,6 +781,10 @@ kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct >>rdma_cm_id *cmid, >> goto failed_2; >> } >> >>+ if (init_qp_attr->cap.max_send_wr != IBLND_SEND_WRS(conn)) >>+ CDEBUG(D_NET, "original send wr %d, created with %d\n", >>+IBLND_SEND_WRS(conn), init_qp_attr->cap.max_send_wr); >>+ >> LIBCFS_FREE(init_qp_attr, sizeof(*init_qp_attr)); >> >> /* 1 ref for caller and each rxmsg */ >> -- >> 1.7.1 >> ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v10 net-next 1/1] hv_sock: introduce Hyper-V Sockets
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication mechanism between the host and the guest. It's somewhat like TCP over VMBus, but the transportation layer (VMBus) is much simpler than IP. With Hyper-V Sockets, applications between the host and the guest can talk to each other directly by the traditional BSD-style socket APIs. Hyper-V Sockets is only available on new Windows hosts, like Windows Server 2016. More info is in this article "Make your own integration services": https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/develop/make_mgmt_service The patch implements the necessary support in the guest side by introducing a new socket address family AF_HYPERV. Signed-off-by: Dexuan Cui Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Vitaly Kuznetsov Cc: Cathy Avery --- You can also get the patch on this branch: https://github.com/dcui/linux/commits/decui/hv_sock/net-next/20160512_v10 For the change log before v10, please see https://lkml.org/lkml/2016/5/4/532 In v10, the main changes consist of 1) minimize struct hvsock_sock by making the send/recv buffers pointers. the buffers are allocated by kmalloc() in __hvsock_create(). 2) minimize the sizes of the send/recv buffers and the vmbus ringbuffers. MAINTAINERS |2 + include/linux/hyperv.h | 14 + include/linux/socket.h |4 +- include/net/af_hvsock.h | 78 +++ include/uapi/linux/hyperv.h | 25 + net/Kconfig |1 + net/Makefile|1 + net/hv_sock/Kconfig | 10 + net/hv_sock/Makefile|3 + net/hv_sock/af_hvsock.c | 1484 +++ 10 files changed, 1621 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index b57df66..c9fe2c6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5271,7 +5271,9 @@ F:drivers/pci/host/pci-hyperv.c F: drivers/net/hyperv/ F: drivers/scsi/storvsc_drv.c F: drivers/video/fbdev/hyperv_fb.c +F: net/hv_sock/ F: include/linux/hyperv.h +F: include/net/af_hvsock.h F: tools/hv/ F: Documentation/ABI/stable/sysfs-bus-vmbus diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index aa0fadc..7be7237 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -1338,4 +1338,18 @@ extern __u32 vmbus_proto_version; int vmbus_send_tl_connect_request(const uuid_le *shv_guest_servie_id, const uuid_le *shv_host_servie_id); +struct vmpipe_proto_header { + u32 pkt_type; + u32 data_size; +}; + +#define HVSOCK_HEADER_LEN (sizeof(struct vmpacket_descriptor) + \ +sizeof(struct vmpipe_proto_header)) + +/* See 'prev_indices' in hv_ringbuffer_read(), hv_ringbuffer_write() */ +#define PREV_INDICES_LEN (sizeof(u64)) + +#define HVSOCK_PKT_LEN(payload_len)(HVSOCK_HEADER_LEN + \ + ALIGN((payload_len), 8) + \ + PREV_INDICES_LEN) #endif /* _HYPERV_H */ diff --git a/include/linux/socket.h b/include/linux/socket.h index b5cc5a6..0b68b58 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -202,8 +202,9 @@ struct ucred { #define AF_VSOCK 40 /* vSockets */ #define AF_KCM 41 /* Kernel Connection Multiplexor*/ #define AF_QIPCRTR 42 /* Qualcomm IPC Router */ +#define AF_HYPERV 43 /* Hyper-V Sockets */ -#define AF_MAX 43 /* For now.. */ +#define AF_MAX 44 /* For now.. */ /* Protocol families, same as address families. */ #define PF_UNSPEC AF_UNSPEC @@ -251,6 +252,7 @@ struct ucred { #define PF_VSOCK AF_VSOCK #define PF_KCM AF_KCM #define PF_QIPCRTR AF_QIPCRTR +#define PF_HYPERV AF_HYPERV #define PF_MAX AF_MAX /* Maximum queue length specifiable by listen. */ diff --git a/include/net/af_hvsock.h b/include/net/af_hvsock.h new file mode 100644 index 000..e002397 --- /dev/null +++ b/include/net/af_hvsock.h @@ -0,0 +1,78 @@ +#ifndef __AF_HVSOCK_H__ +#define __AF_HVSOCK_H__ + +#include +#include +#include + +/* Note: 3-page is the minimal recv ringbuffer size: + * + * the 1st page is used as the shared read/write index etc, rather than data: + * see hv_ringbuffer_init(); + * + * the payload length in the vmbus pipe message received from the host can + * be 4096 bytes, and considing the header of HVSOCK_HEADER_LEN bytes, we + * need at least 2 extra pages for ringbuffer data. + */ +#define HVSOCK_RCV_BUF_SZPAGE_SIZE +#define VMBUS_RINGBUFFER_SIZE_HVSOCK_RCV (3 * PAGE_SIZE) + +/* As to send, here let's make sure the hvsock_send_buf struct can be held in 1 + * page, and since we want to use 2 pages for the send ringbuffer size (this is + * the minimal size because the 1st page of the two is used as the shared + * read/write index etc, rather than data), we only have 1
re: staging: add Lustre file system client support
> Hello Lustre devs, > > The patch d7e09d0397e8: "staging: add Lustre file system client > support" from May 2, 2013, leads to the following Parfait warning. > Parfait is an Oracle static analysis tool. If there is a patch from > this could you give credit to Lidza Louina Just to let you know we have a ticket to track this issue at: https://jira.hpdd.intel.com/browse/LU-8128 The reason we have been avoiding this is that in the past small fixes to the ldlm layer has caused havoc at very large scale. So we are very careful when approaching this class of fixes. > drivers/staging/lustre/lustre/ldlm/interval_tree.c >399 void interval_erase(struct interval_node *node, >400 struct interval_node **root) >401 { >402 struct interval_node *child, *parent; >403 int color; >404 >405 LASSERT(interval_is_intree(node)); >406 node->in_intree = 0; >407 if (!node->in_left) { >408 child = node->in_right; >409 } else if (!node->in_right) { >410 child = node->in_left; >411 } else { /* Both left and right child are not NULL */ >412 struct interval_node *old = node; >413 >414 node = interval_next(node); > ^^ > It looks like interval_next() can return NULL. > >415 child = node->in_right; >416 parent = node->in_parent; >417 color = node->in_color; >418 > > Here is the interval_next() function: > > drivers/staging/lustre/lustre/ldlm/interval_tree.c >111 static struct interval_node *interval_next(struct interval_node *node) >112 { >113 if (!node) >114 return NULL; >115 if (node->in_right) >116 return interval_first(node->in_right); >117 while (node->in_parent && node_is_right_child(node)) >^^^ > We assume that ->in_parent can be NULL here. Is that actually possible? > >118 node = node->in_parent; >119 return node->in_parent; >120 } > > regards, > dan carpenter > ___ > devel mailing list > de...@linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel