Skip to content

Commit a60c3fd

Browse files
Jakub Kicinskidavem330
authored andcommitted
ixgbe: use tc_cls_can_offload_and_chain0()
Make use of tc_cls_can_offload_and_chain0() to set extack msg in case ethtool tc offload flag is not set or chain unsupported. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 312324f commit a60c3fd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9303,9 +9303,6 @@ static int ixgbe_configure_clsu32(struct ixgbe_adapter *adapter,
93039303
static int ixgbe_setup_tc_cls_u32(struct ixgbe_adapter *adapter,
93049304
struct tc_cls_u32_offload *cls_u32)
93059305
{
9306-
if (cls_u32->common.chain_index)
9307-
return -EOPNOTSUPP;
9308-
93099306
switch (cls_u32->command) {
93109307
case TC_CLSU32_NEW_KNODE:
93119308
case TC_CLSU32_REPLACE_KNODE:
@@ -9327,7 +9324,7 @@ static int ixgbe_setup_tc_block_cb(enum tc_setup_type type, void *type_data,
93279324
{
93289325
struct ixgbe_adapter *adapter = cb_priv;
93299326

9330-
if (!tc_can_offload(adapter->netdev))
9327+
if (!tc_cls_can_offload_and_chain0(adapter->netdev, type_data))
93319328
return -EOPNOTSUPP;
93329329

93339330
switch (type) {

0 commit comments

Comments
 (0)