Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2093956ybl; Thu, 30 Jan 2020 11:14:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzvMb+Uw0OInE9F3m3SU+hbn12sf1aMqePiEWjlKD6G7nLv5wjeSWct/9CvmXuAvtU/7zSj X-Received: by 2002:a54:4117:: with SMTP id l23mr3814088oic.140.1580411695441; Thu, 30 Jan 2020 11:14:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580411695; cv=none; d=google.com; s=arc-20160816; b=FfbEVb316SMa5AfnHMqT/1B7nZOW5DnVOAAdT8Bi10gQ68nWMQAr5W7HSQgIiBW9OK kGTzrS3dK2UtnixsCb6uyxGUIaFioGV3nSOujRThAUlMwtuC7Mqdq7fHtJ2GcK1NjDVT WuYl3IT18f8wFMnENg6p55mc1cId/i7T/ROiJvLDuL/6+NAJitpQpyxb72BuBKMyNoBw fEgi5WEw2HCgtuAdGopNNw4v8yMs4VQfvETswep2tQ09xLWyu+Q5aSTWx6mO5USVSVUF RGeTUfWWdNOpTZir2Uhg3wMGNSNKzXrmwerGuIwnQ3AqiRQrs0kQb67Auff2XtdZUZQi TJUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S0ahXV8ZcU1x0hWTfTZ/IF8kUX+xACXAw1MoAI4tq4I=; b=C74F2b51d0lq/EsLK8JOykB9RFMdDsm2zGMek6KF1hp72CH4P/S4tenkxeEm3hsiYn go1ywDY9frxrX0WaMLsysGGUsOGnINqHwHg12v9d3WRnycL3e6l5haO4iLH9faSxLNfO uLBl/s90XUc/9rYypPZBun+FPRrEp+h/nmRUrtgqC5D8+xB+jna4EjmGvD4IMhOt0fur /qpQeTYUDkuomouzpygtsgRNe8ZxaXZNXUn5+jI5VM5rcXffYmL5WOZ4HKdrN63F8/Ay oe66I65gUx2Y26Z7XvQAbJx+tU0IQlhUTKibzE9WNadenfZcTjCcZDzfX9l6bBizdRqn BUAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w9IyqasU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14si3840223ota.71.2020.01.30.11.14.43; Thu, 30 Jan 2020 11:14:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w9IyqasU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730250AbgA3Slu (ORCPT + 99 others); Thu, 30 Jan 2020 13:41:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:49792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730236AbgA3Slq (ORCPT ); Thu, 30 Jan 2020 13:41:46 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D5582083E; Thu, 30 Jan 2020 18:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409705; bh=SSZBkAhW4Il/TRVH99TGWnSXMPf9K7zc2YX6XuW3fdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w9IyqasUdrcn3UZuItCyKVc7FCju985qeLSCXvW6+QpJhJ1LTg6ljbhREcWf18dDs uEugk9Oi20br6PJ5EepawAYIX2AlZj35OC1+0zll3YpWFCixhf5MIi92ixKKMtY4UD iacKfs/9S5b6qJB3eZ/i5CNk4jiJ4IeFbN3CkQ10= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Auhagen , "David S. Miller" Subject: [PATCH 5.5 36/56] mvneta driver disallow XDP program on hardware buffer management Date: Thu, 30 Jan 2020 19:38:53 +0100 Message-Id: <20200130183615.531603716@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183608.849023566@linuxfoundation.org> References: <20200130183608.849023566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Auhagen [ Upstream commit 79572c98c554dcdb080bca547c871a51716dcdf8 ] Recently XDP Support was added to the mvneta driver for software buffer management only. It is still possible to attach an XDP program if hardware buffer management is used. It is not doing anything at that point. The patch disallows attaching XDP programs to mvneta if hardware buffer management is used. I am sorry about that. It is my first submission and I am having some troubles with the format of my emails. v4 -> v5: - Remove extra tabs v3 -> v4: - Please ignore v3 I accidentally submitted my other patch with git-send-mail and v4 is correct v2 -> v3: - My mailserver corrupted the patch resubmission with git-send-email v1 -> v2: - Fixing the patches indentation Signed-off-by: Sven Auhagen Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/marvell/mvneta.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -4226,6 +4226,12 @@ static int mvneta_xdp_setup(struct net_d return -EOPNOTSUPP; } + if (pp->bm_priv) { + NL_SET_ERR_MSG_MOD(extack, + "Hardware Buffer Management not supported on XDP"); + return -EOPNOTSUPP; + } + need_update = !!pp->xdp_prog != !!prog; if (running && need_update) mvneta_stop(dev);