DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: return failure for all ioctls
@ 2018-09-13 21:46 Dan Gora
  2018-09-18 16:19 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Gora @ 2018-09-13 21:46 UTC (permalink / raw)
  To: dev; +Cc: Dan Gora, Ferruh Yigit

Modify kni_net_ioctl() to return -EOPNOTSUPP for all ioctls instead
of 0.

This is necessary because the Wicked (and possibly other) network
interface managers will perform the SIOCGIWNAME ioctl to check if
the interface is a wireless interface.  If the KNI module returns
success, Wicked will incorrectly interpret the interface as a wireless
interface.

Signed-off-by: Dan Gora <dg@adax.com>
---
 kernel/linux/kni/kni_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index fea3ec7e7..f94f2abaf 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -600,7 +600,7 @@ kni_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 	pr_debug("kni_net_ioctl group:%d cmd:%d\n",
 		((struct kni_dev *)netdev_priv(dev))->group_id, cmd);
 
-	return 0;
+	return -EOPNOTSUPP;
 }
 
 static void
-- 
2.19.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: return failure for all ioctls
  2018-09-13 21:46 [dpdk-dev] [PATCH] kni: return failure for all ioctls Dan Gora
@ 2018-09-18 16:19 ` Ferruh Yigit
  2018-10-02 15:55   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-09-18 16:19 UTC (permalink / raw)
  To: Dan Gora, dev

On 9/13/2018 10:46 PM, Dan Gora wrote:
> Modify kni_net_ioctl() to return -EOPNOTSUPP for all ioctls instead
> of 0.
> 
> This is necessary because the Wicked (and possibly other) network
> interface managers will perform the SIOCGIWNAME ioctl to check if
> the interface is a wireless interface.  If the KNI module returns
> success, Wicked will incorrectly interpret the interface as a wireless
> interface.
> 
> Signed-off-by: Dan Gora <dg@adax.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: return failure for all ioctls
  2018-09-18 16:19 ` Ferruh Yigit
@ 2018-10-02 15:55   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-02 15:55 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Dan Gora

18/09/2018 18:19, Ferruh Yigit:
> On 9/13/2018 10:46 PM, Dan Gora wrote:
> > Modify kni_net_ioctl() to return -EOPNOTSUPP for all ioctls instead
> > of 0.
> > 
> > This is necessary because the Wicked (and possibly other) network
> > interface managers will perform the SIOCGIWNAME ioctl to check if
> > the interface is a wireless interface.  If the KNI module returns
> > success, Wicked will incorrectly interpret the interface as a wireless
> > interface.
> > 
> > Signed-off-by: Dan Gora <dg@adax.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-02 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13 21:46 [dpdk-dev] [PATCH] kni: return failure for all ioctls Dan Gora
2018-09-18 16:19 ` Ferruh Yigit
2018-10-02 15:55   ` Thomas Monjalon

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).