From patchwork Thu Sep 13 21:46:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Gora X-Patchwork-Id: 44704 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 610C15F54; Thu, 13 Sep 2018 23:47:09 +0200 (CEST) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 77E415F51 for ; Thu, 13 Sep 2018 23:47:08 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id d131-v6so4077476qke.11 for ; Thu, 13 Sep 2018 14:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ykeTZL1KM/ikIPrAhT4cbSK1npVpTOZwCC4+h7Q94Go=; b=OKazwJj8I3GADuHaysplsj32EWInQe84B11zVPfvpz8nX+x3pDfjPktu609+kWrhWV ILROyq5MWM5mg3pPVV9f9y2P46XFDTnFkZwqRCnNJR7LzmTiA6UCXIBgfjXzFpUEwzU5 9Fsf5vaZ3/iiAuQMdp+ZnFU2sLDLfKzBaiv6d6TwjSnaLVZWEECxCLsgPxQ9cBIJDe8U T+SjtVBCM31JKkWy6YuwlNfy60ZNRJpJlnv2zuDsAbnqcXPTYqXKY3cs6iBhGo7f9r0X qWlFDFc/uZkYPBSc7mlD5HtknLR+CCx5VRdvCMgEsfoLyJYi0Y7POhLmtkRjkAdm01xl 0n9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=ykeTZL1KM/ikIPrAhT4cbSK1npVpTOZwCC4+h7Q94Go=; b=Hlst5/p0jvOcNzYhS5W/Rw6TCjtlJfCikl4JFw1bJgpDEfXIr+AcHd0SjL7H/HPAFT qJXNOJZkwO+kyFr3eo+P7AgyCZ+IKpD5htUPJWWjyFGucfRYekw4Xby/V2GnqhTaTrkU zdmtTBYDbvVKNchi05gwQZSBunf78C/LYRoj/LjElvPqV75hSJBEzR4eq0nFvnQx8hSo tuOW8ktyyzlLNqjcOCRL540wP+XGn56AjmsOp6Cc+1Gv/qkTlSa/N2O00FyEjmT7j4la GHCylOqBKvURTTqqMaA70GelI4l4yKcJGGbnsSAvN2wQbGb7X26fmhAnvaX8YYMU+HW+ hLYw== X-Gm-Message-State: APzg51By2ZUI98CSfpeTy0aT//IVN7YOk9sEPljPr2ntE2vV2jZG1sv3 MW6fFBnkBf3Ra03ORgmEbm+boZ1R X-Google-Smtp-Source: ANB0VdaHmost9TplkTGAVr10xOlgmyG6xPOJqOp5y8k3PypN+xWDhqSCnLv9S9JOYoROx1DuSL1fGA== X-Received: by 2002:a37:a6ca:: with SMTP id p193-v6mr6657818qke.226.1536875227493; Thu, 13 Sep 2018 14:47:07 -0700 (PDT) Received: from snappy.local.lan (201-42-15-90.dsl.telesp.net.br. [201.42.15.90]) by smtp.gmail.com with ESMTPSA id p84-v6sm4448457qkh.12.2018.09.13.14.47.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Sep 2018 14:47:06 -0700 (PDT) From: Dan Gora To: dev@dpdk.org Cc: Dan Gora , Ferruh Yigit Date: Thu, 13 Sep 2018 18:46:52 -0300 Message-Id: <20180913214652.20771-1-dg@adax.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] kni: return failure for all ioctls X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Ferruh Yigit --- 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