Hi Vladimir,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master v5.7-rc4 next-20200505]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    
https://github.com/0day-ci/linux/commits/Vladimir-Oltean/tc-gate-offload-for-SJA1105-DSA-switch/20200505-040345
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
627642f07b3093f501495d226c7a0b9d56a0c870
config: i386-randconfig-h001-20200503 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <l...@intel.com>

All errors (new ones prefixed by >>):

   drivers/net/dsa/sja1105/sja1105_flower.c: In function 
'sja1105_cls_flower_add':
>> drivers/net/dsa/sja1105/sja1105_flower.c:406:9: error: implicit declaration 
>> of function 'sja1105_init_scheduling'; did you mean 'sja1105_get_strings'? 
>> [-Werror=implicit-function-declaration]
       rc = sja1105_init_scheduling(priv);
            ^~~~~~~~~~~~~~~~~~~~~~~
            sja1105_get_strings
   cc1: some warnings being treated as errors

vim +406 drivers/net/dsa/sja1105/sja1105_flower.c

   303  
   304  int sja1105_cls_flower_add(struct dsa_switch *ds, int port,
   305                             struct flow_cls_offload *cls, bool ingress)
   306  {
   307          struct flow_rule *rule = flow_cls_offload_flow_rule(cls);
   308          struct netlink_ext_ack *extack = cls->common.extack;
   309          struct sja1105_private *priv = ds->priv;
   310          const struct flow_action_entry *act;
   311          unsigned long cookie = cls->cookie;
   312          bool routing_rule = false;
   313          struct sja1105_key key;
   314          bool gate_rule = false;
   315          bool vl_rule = false;
   316          int rc, i;
   317  
   318          rc = sja1105_flower_parse_key(priv, extack, cls, &key);
   319          if (rc)
   320                  return rc;
   321  
   322          rc = -EOPNOTSUPP;
   323  
   324          flow_action_for_each(i, act, &rule->action) {
   325                  switch (act->id) {
   326                  case FLOW_ACTION_POLICE:
   327                          rc = sja1105_flower_policer(priv, port, extack, 
cookie,
   328                                                      &key,
   329                                                      
act->police.rate_bytes_ps,
   330                                                      act->police.burst);
   331                          if (rc)
   332                                  goto out;
   333                          break;
   334                  case FLOW_ACTION_TRAP: {
   335                          int cpu = dsa_upstream_port(ds, port);
   336  
   337                          routing_rule = true;
   338                          vl_rule = true;
   339  
   340                          rc = sja1105_vl_redirect(priv, port, extack, 
cookie,
   341                                                   &key, BIT(cpu), true);
   342                          if (rc)
   343                                  goto out;
   344                          break;
   345                  }
   346                  case FLOW_ACTION_REDIRECT: {
   347                          struct dsa_port *to_dp;
   348  
   349                          if (!dsa_slave_dev_check(act->dev)) {
   350                                  NL_SET_ERR_MSG_MOD(extack,
   351                                                     "Destination not a 
switch port");
   352                                  return -EOPNOTSUPP;
   353                          }
   354  
   355                          to_dp = dsa_slave_to_port(act->dev);
   356                          routing_rule = true;
   357                          vl_rule = true;
   358  
   359                          rc = sja1105_vl_redirect(priv, port, extack, 
cookie,
   360                                                   &key, 
BIT(to_dp->index), true);
   361                          if (rc)
   362                                  goto out;
   363                          break;
   364                  }
   365                  case FLOW_ACTION_DROP:
   366                          vl_rule = true;
   367  
   368                          rc = sja1105_vl_redirect(priv, port, extack, 
cookie,
   369                                                   &key, 0, false);
   370                          if (rc)
   371                                  goto out;
   372                          break;
   373                  case FLOW_ACTION_GATE:
   374                          gate_rule = true;
   375                          vl_rule = true;
   376  
   377                          rc = sja1105_vl_gate(priv, port, extack, cookie,
   378                                               &key, act->gate.index,
   379                                               act->gate.prio,
   380                                               act->gate.basetime,
   381                                               act->gate.cycletime,
   382                                               act->gate.cycletimeext,
   383                                               act->gate.num_entries,
   384                                               act->gate.entries);
   385                          if (rc)
   386                                  goto out;
   387                          break;
   388                  default:
   389                          NL_SET_ERR_MSG_MOD(extack,
   390                                             "Action not supported");
   391                          rc = -EOPNOTSUPP;
   392                          goto out;
   393                  }
   394          }
   395  
   396          if (vl_rule && !rc) {
   397                  /* Delay scheduling configuration until DESTPORTS has 
been
   398                   * populated by all other actions.
   399                   */
   400                  if (gate_rule) {
   401                          if (!routing_rule) {
   402                                  NL_SET_ERR_MSG_MOD(extack,
   403                                                     "Can only offload 
gate action together with redirect or trap");
   404                                  return -EOPNOTSUPP;
   405                          }
 > 406                          rc = sja1105_init_scheduling(priv);
   407                          if (rc)
   408                                  goto out;
   409                  }
   410  
   411                  rc = sja1105_static_config_reload(priv, 
SJA1105_VIRTUAL_LINKS);
   412          }
   413  
   414  out:
   415          return rc;
   416  }
   417  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to