From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754798AbdJLBx0 (ORCPT ); Wed, 11 Oct 2017 21:53:26 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7978 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620AbdJLBxU (ORCPT ); Wed, 11 Oct 2017 21:53:20 -0400 From: Yunsheng Lin To: CC: , , , , , , , , , , , , Subject: [PATCH net-next 1/2] mqprio: Add a new hardware offload type in mqprio Date: Thu, 12 Oct 2017 10:38:31 +0800 Message-ID: <1507775912-22402-2-git-send-email-linyunsheng@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507775912-22402-1-git-send-email-linyunsheng@huawei.com> References: <1507775912-22402-1-git-send-email-linyunsheng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.59DECB0D.0065,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 86e7fcb386f6967373a0cc74131e12ca Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When a driver supports both dcb and hardware offloaded mqprio, and user is running mqprio and dcb tool concurrently, the configuration set by each tool may be conflicted with each other because the dcb and mqprio may be using the same hardwere offload component and share the tc system in the network stack. This patch adds a new offload type to indicate that the underlying driver offload prio mapping as part of DCB. If the driver would be incapable of that it would refuse the offload. User would then have to explicitly request that qdisc offload. Signed-off-by: Yunsheng Lin Suggested-by: Yuval Mintz --- include/uapi/linux/pkt_sched.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 099bf55..8016027 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h @@ -620,6 +620,7 @@ struct tc_drr_stats { enum { TC_MQPRIO_HW_OFFLOAD_NONE, /* no offload requested */ TC_MQPRIO_HW_OFFLOAD_TCS, /* offload TCs, no queue counts */ + TC_MQPRIO_HW_OFFLOAD_DCB, /* offload shared by DCB */ __TC_MQPRIO_HW_OFFLOAD_MAX }; -- 1.9.1