]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Jul 2019 20:55:41 +0000 (22:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2019 21:38:50 +0000 (14:38 -0700)
Rename from TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* and
remove temporary tcf_block_binder_type alias.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mscc/ocelot_flower.c
drivers/net/ethernet/mscc/ocelot_tc.c
drivers/net/ethernet/netronome/nfp/flower/offload.c
include/net/flow_offload.h
include/net/pkt_cls.h
net/core/flow_offload.c
net/dsa/slave.c
net/sched/cls_api.c
net/sched/sch_ingress.c

index 853aff64ef4b6e327f48ad0656cb06610e087d32..f2ad1ca7ed2a8bc9fd621d592178ad743ff1fe1b 100644 (file)
@@ -701,7 +701,7 @@ mlx5e_rep_indr_setup_tc_block(struct net_device *netdev,
        struct mlx5e_rep_indr_block_priv *indr_priv;
        int err = 0;
 
-       if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
+       if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
                return -EOPNOTSUPP;
 
        switch (f->command) {
index 9cf61a9d82911ade3de614832db7d0653c32d83b..a178d082f061fb04a9ebbc029417e5f5a5003b7d 100644 (file)
@@ -1668,10 +1668,10 @@ static int mlxsw_sp_setup_tc_block(struct mlxsw_sp_port *mlxsw_sp_port,
        bool ingress;
        int err;
 
-       if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
+       if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
                cb = mlxsw_sp_setup_tc_block_cb_matchall_ig;
                ingress = true;
-       } else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
+       } else if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
                cb = mlxsw_sp_setup_tc_block_cb_matchall_eg;
                ingress = false;
        } else {
index 8778dee5a471e1c674f0f89d08769ff747ff4ba6..b682f08a93b42873dd646ab81d0da197e2304d57 100644 (file)
@@ -306,7 +306,7 @@ int ocelot_setup_tc_block_flower_bind(struct ocelot_port *port,
        struct tcf_block_cb *block_cb;
        int ret;
 
-       if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
+       if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
                return -EOPNOTSUPP;
 
        block_cb = tcf_block_cb_lookup(f->block,
index c84942ef8e7beef3cce22b4e1bd1b79cd2091b14..58a0b5f8850cba02521fa6ec1d596ea3a40c553d 100644 (file)
@@ -137,10 +137,10 @@ static int ocelot_setup_tc_block(struct ocelot_port *port,
        netdev_dbg(port->dev, "tc_block command %d, binder_type %d\n",
                   f->command, f->binder_type);
 
-       if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
+       if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS) {
                cb = ocelot_setup_tc_block_cb_ig;
                port->tc.block_shared = tcf_block_shared(f->block);
-       } else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
+       } else if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS) {
                cb = ocelot_setup_tc_block_cb_eg;
        } else {
                return -EOPNOTSUPP;
index 7c94f51420769ccbddf2ccc9233c9ff701a5c25f..46041e5091508611d54098c9dba832e687ed02bd 100644 (file)
@@ -1308,7 +1308,7 @@ static int nfp_flower_setup_tc_block(struct net_device *netdev,
        struct nfp_repr *repr = netdev_priv(netdev);
        struct nfp_flower_repr_priv *repr_priv;
 
-       if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
+       if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
                return -EOPNOTSUPP;
 
        repr_priv = repr->app_priv;
@@ -1389,8 +1389,8 @@ nfp_flower_setup_indr_tc_block(struct net_device *netdev, struct nfp_app *app,
        struct nfp_flower_priv *priv = app->priv;
        int err;
 
-       if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
-           !(f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS &&
+       if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
+           !(f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS &&
              nfp_flower_internal_port_can_offload(app, netdev)))
                return -EOPNOTSUPP;
 
index 7c9f7a2ac7cecf65c93edb5fabce70e7bc22af3d..f12b905ad95e95cd7bec75707cf103697e385102 100644 (file)
@@ -244,9 +244,9 @@ enum flow_block_command {
 };
 
 enum flow_block_binder_type {
-       TCF_BLOCK_BINDER_TYPE_UNSPEC,
-       TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
-       TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS,
+       FLOW_BLOCK_BINDER_TYPE_UNSPEC,
+       FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
+       FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS,
 };
 
 struct tcf_block;
index 1a96f469164f50d3a5507bb5c8fafb9dc02e6d41..e4499526fde80c7a6333a43058f74498c14e7382 100644 (file)
@@ -27,10 +27,9 @@ int register_tcf_proto_ops(struct tcf_proto_ops *ops);
 int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
 
 #define tc_block_offload flow_block_offload
-#define tcf_block_binder_type flow_block_binder_type
 
 struct tcf_block_ext_info {
-       enum tcf_block_binder_type binder_type;
+       enum flow_block_binder_type binder_type;
        tcf_chain_head_change_t *chain_head_change;
        void *chain_head_change_priv;
        u32 block_index;
index 593e73f7593a32bd83cb0eb99b87fab525c0c06d..6d8187e8effcfa3a78817c3f47201a9ab522e9bd 100644 (file)
@@ -172,7 +172,7 @@ int flow_block_cb_setup_simple(struct flow_block_offload *f,
                               bool ingress_only)
 {
        if (ingress_only &&
-           f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
+           f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
                return -EOPNOTSUPP;
 
        f->driver_block_list = driver_block_list;
index 58a71ee0747a665c28051d72d3f22f79588ba5fd..9b5e202c255e4dcb8adcbb6b8cdd38ef7452c6a7 100644 (file)
@@ -947,9 +947,9 @@ static int dsa_slave_setup_tc_block(struct net_device *dev,
 {
        tc_setup_cb_t *cb;
 
-       if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
+       if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
                cb = dsa_slave_setup_tc_block_cb_ig;
-       else if (f->binder_type == TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
+       else if (f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
                cb = dsa_slave_setup_tc_block_cb_eg;
        else
                return -EOPNOTSUPP;
index ed6f35cc11ea08394404768a5da1880ad2d0b5ce..49b89c89a8b9adc0f4e526163799a86905937476 100644 (file)
@@ -679,7 +679,7 @@ static void tc_indr_block_ing_cmd(struct tc_indr_block_dev *indr_dev,
 {
        struct tc_block_offload bo = {
                .command        = command,
-               .binder_type    = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
+               .binder_type    = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS,
                .block          = indr_dev->block,
        };
 
@@ -1341,17 +1341,17 @@ static void tcf_block_release(struct Qdisc *q, struct tcf_block *block,
 struct tcf_block_owner_item {
        struct list_head list;
        struct Qdisc *q;
-       enum tcf_block_binder_type binder_type;
+       enum flow_block_binder_type binder_type;
 };
 
 static void
 tcf_block_owner_netif_keep_dst(struct tcf_block *block,
                               struct Qdisc *q,
-                              enum tcf_block_binder_type binder_type)
+                              enum flow_block_binder_type binder_type)
 {
        if (block->keep_dst &&
-           binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
-           binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
+           binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
+           binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
                netif_keep_dst(qdisc_dev(q));
 }
 
@@ -1368,7 +1368,7 @@ EXPORT_SYMBOL(tcf_block_netif_keep_dst);
 
 static int tcf_block_owner_add(struct tcf_block *block,
                               struct Qdisc *q,
-                              enum tcf_block_binder_type binder_type)
+                              enum flow_block_binder_type binder_type)
 {
        struct tcf_block_owner_item *item;
 
@@ -1383,7 +1383,7 @@ static int tcf_block_owner_add(struct tcf_block *block,
 
 static void tcf_block_owner_del(struct tcf_block *block,
                                struct Qdisc *q,
-                               enum tcf_block_binder_type binder_type)
+                               enum flow_block_binder_type binder_type)
 {
        struct tcf_block_owner_item *item;
 
index 599730f804d77c55f9b1d0f3258fed6af385240c..bf56aa519797404b7d1cf24213fdb922b412beb4 100644 (file)
@@ -83,7 +83,7 @@ static int ingress_init(struct Qdisc *sch, struct nlattr *opt,
 
        mini_qdisc_pair_init(&q->miniqp, sch, &dev->miniq_ingress);
 
-       q->block_info.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
+       q->block_info.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
        q->block_info.chain_head_change = clsact_chain_head_change;
        q->block_info.chain_head_change_priv = &q->miniqp;
 
@@ -217,7 +217,7 @@ static int clsact_init(struct Qdisc *sch, struct nlattr *opt,
 
        mini_qdisc_pair_init(&q->miniqp_ingress, sch, &dev->miniq_ingress);
 
-       q->ingress_block_info.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
+       q->ingress_block_info.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS;
        q->ingress_block_info.chain_head_change = clsact_chain_head_change;
        q->ingress_block_info.chain_head_change_priv = &q->miniqp_ingress;
 
@@ -228,7 +228,7 @@ static int clsact_init(struct Qdisc *sch, struct nlattr *opt,
 
        mini_qdisc_pair_init(&q->miniqp_egress, sch, &dev->miniq_egress);
 
-       q->egress_block_info.binder_type = TCF_BLOCK_BINDER_TYPE_CLSACT_EGRESS;
+       q->egress_block_info.binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS;
        q->egress_block_info.chain_head_change = clsact_chain_head_change;
        q->egress_block_info.chain_head_change_priv = &q->miniqp_egress;