bnxt.c (12479f627f7c2017e6fcd50b56c2537592674c50) | bnxt.c (4e95bc268b915c3a19ec8b9110f61e4ea41a1ed0) |
---|---|
1/* Broadcom NetXtreme-C/E network driver. 2 * 3 * Copyright (c) 2014-2016 Broadcom Corporation 4 * Copyright (c) 2016-2019 Broadcom Limited 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation. --- 9893 unchanged lines hidden (view full) --- 9902 switch (type) { 9903 case TC_SETUP_CLSFLOWER: 9904 return bnxt_tc_setup_flower(bp, bp->pf.fw_fid, type_data); 9905 default: 9906 return -EOPNOTSUPP; 9907 } 9908} 9909 | 1/* Broadcom NetXtreme-C/E network driver. 2 * 3 * Copyright (c) 2014-2016 Broadcom Corporation 4 * Copyright (c) 2016-2019 Broadcom Limited 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation. --- 9893 unchanged lines hidden (view full) --- 9902 switch (type) { 9903 case TC_SETUP_CLSFLOWER: 9904 return bnxt_tc_setup_flower(bp, bp->pf.fw_fid, type_data); 9905 default: 9906 return -EOPNOTSUPP; 9907 } 9908} 9909 |
9910static int bnxt_setup_tc_block(struct net_device *dev, 9911 struct tc_block_offload *f) 9912{ 9913 struct bnxt *bp = netdev_priv(dev); 9914 9915 if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS) 9916 return -EOPNOTSUPP; 9917 9918 switch (f->command) { 9919 case TC_BLOCK_BIND: 9920 return tcf_block_cb_register(f->block, bnxt_setup_tc_block_cb, 9921 bp, bp, f->extack); 9922 case TC_BLOCK_UNBIND: 9923 tcf_block_cb_unregister(f->block, bnxt_setup_tc_block_cb, bp); 9924 return 0; 9925 default: 9926 return -EOPNOTSUPP; 9927 } 9928} 9929 | |
9930static int bnxt_setup_tc(struct net_device *dev, enum tc_setup_type type, 9931 void *type_data) 9932{ | 9910static int bnxt_setup_tc(struct net_device *dev, enum tc_setup_type type, 9911 void *type_data) 9912{ |
9913 struct bnxt *bp = netdev_priv(dev); 9914 |
|
9933 switch (type) { 9934 case TC_SETUP_BLOCK: | 9915 switch (type) { 9916 case TC_SETUP_BLOCK: |
9935 return bnxt_setup_tc_block(dev, type_data); | 9917 return flow_block_cb_setup_simple(type_data, NULL, 9918 bnxt_setup_tc_block_cb, 9919 bp, bp, true); |
9936 case TC_SETUP_QDISC_MQPRIO: { 9937 struct tc_mqprio_qopt *mqprio = type_data; 9938 9939 mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS; 9940 9941 return bnxt_setup_mq_tc(dev, mqprio->num_tc); 9942 } 9943 default: --- 1177 unchanged lines hidden --- | 9920 case TC_SETUP_QDISC_MQPRIO: { 9921 struct tc_mqprio_qopt *mqprio = type_data; 9922 9923 mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS; 9924 9925 return bnxt_setup_mq_tc(dev, mqprio->num_tc); 9926 } 9927 default: --- 1177 unchanged lines hidden --- |