From patchwork Thu Dec 14 13:54:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Mintz X-Patchwork-Id: 848564 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yyFS74M1Cz9s1h for ; Fri, 15 Dec 2017 00:55:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752405AbdLNNzC (ORCPT ); Thu, 14 Dec 2017 08:55:02 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:41760 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751046AbdLNNy7 (ORCPT ); Thu, 14 Dec 2017 08:54:59 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yuvalm@mellanox.com) with ESMTPS (AES256-SHA encrypted); 14 Dec 2017 15:54:56 +0200 Received: from dev-r-vrt-155.mtr.labs.mlnx (dev-r-vrt-155.mtr.labs.mlnx [10.212.155.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id vBEDstJX028636; Thu, 14 Dec 2017 15:54:55 +0200 From: Yuval Mintz To: davem@davemloft.net, netdev@vger.kernel.org Cc: mlxsw@mellanox.com, Yuval Mintz Subject: [PATCH net 0/3] net: sched: Make qdisc offload uapi uniform Date: Thu, 14 Dec 2017 15:54:28 +0200 Message-Id: <1513259671-1183-1-git-send-email-yuvalm@mellanox.com> X-Mailer: git-send-email 2.4.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Several qdiscs can already be offloaded to hardware, but there's an inconsistecy in regard to the uapi through which they indicate such an offload is taking place - indication is passed to the user via TCA_OPTIONS where each qdisc retains private logic for setting it. The recent addition of offloading to RED in 602f3baf2218 ("net_sch: red: Add offload ability to RED qdisc") caused the addition of yet another uapi field for this purpose - TC_RED_OFFLOADED. For clarity and prevention of bloat in the uapi we want to eliminate said added uapi, replacing it with a common mechanism that can be used to reflect offload status of the various qdiscs. The first patch introduces TCA_HW_OFFLOAD as the generic message meant for this purpose. The second changes the current RED implementation into setting the internal bits necessary for passing it, and the third removes TC_RED_OFFLOADED as its no longer needed. Dave, A bit unorthodox as it's not a fix per-se, but it's the last chance for killing the unneeded uapi and replacing it with something better before getting stuck with it forever. Cheers, Yuval Yuval Mintz (3): net: sched: Add TCA_HW_OFFLOAD net: sched: Move to new offload indication in RED pkt_sched: Remove TC_RED_OFFLOADED from uapi include/net/sch_generic.h | 1 + include/uapi/linux/pkt_sched.h | 1 - include/uapi/linux/rtnetlink.h | 1 + net/sched/sch_api.c | 2 ++ net/sched/sch_red.c | 31 +++++++++++++++---------------- 5 files changed, 19 insertions(+), 17 deletions(-)