lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2c7b181ef9a44ef0ac11c81ccc23ee5d@HKXPR3004MB0088.064d.mgd.msft.net>
Date:	Tue, 5 Jan 2016 16:04:36 +0000
From:	Dexuan Cui <decui@...rosoft.com>
To:	Vitaly Kuznetsov <vkuznets@...hat.com>
CC:	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"stephen@...workplumber.org" <stephen@...workplumber.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"driverdev-devel@...uxdriverproject.org" 
	<driverdev-devel@...uxdriverproject.org>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"apw@...onical.com" <apw@...onical.com>,
	"jasowang@...hat.com" <jasowang@...hat.com>,
	KY Srinivasan <kys@...rosoft.com>,
	"pebolle@...cali.nl" <pebolle@...cali.nl>,
	"stefanha@...hat.com" <stefanha@...hat.com>,
	"dan.carpenter@...cle.com" <dan.carpenter@...cle.com>
Subject: RE: [PATCH V5 7/9] Drivers: hv: vmbus: add a mechanism to pass hvsock
 events to the hvsock driver

> From: Vitaly Kuznetsov [mailto:vkuznets@...hat.com]
> > diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
> >
> > +/* hvsock related definitions */
> > +enum hvsock_event {
> > +	/* The host application is close()-ing the connection */
> > +	HVSOCK_RESCIND_CHANNEL,
> > +};
> > +
> >  struct vmbus_channel {
> >  	/* Unique channel id */
> >  	int id;
> > @@ -740,6 +746,13 @@ struct vmbus_channel {
> >  	void (*sc_creation_callback)(struct vmbus_channel *new_sc);
> >
> >  	/*
> > +	 * hvsock event callback.
> > +	 * For now only 1 event is defined: HVSOCK_RESCIND_CHANNEL.
> > +	 */
> > +	void (*hvsock_event_callback)(struct vmbus_channel *channel,
> > +				      enum hvsock_event event);
> 
> Would it make sense to rename it to something more general,
> e.g. sc_rescind_callback and call it for all drivers (even if we don't
> need it now) intead of introducing enum hvsock_event? When new events
Your suggestion is good: channel->hvsock_event_callback != NULL implies
is_hvsock_channel(channel) is true.

> arrive we'll just add new callbacks (or, alternatively, we could unify
> it to 'channel_event_callback' and merging with sc_creation_callback()
> but I'd say it is uglier).

I'm OK to use the idea "when new events arrive we'll just add new callbacks".

Let me make a new patch.

Thanks,
-- Dexuan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ