]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: dsa: remove tag ops from the switch tree
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 29 Sep 2017 21:19:21 +0000 (17:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 03:15:07 +0000 (04:15 +0100)
Now that the dsa_ptr is a dsa_port instance, there is no need to keep
the tag operations in the dsa_switch_tree structure. Remove it.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/dsa2.c
net/dsa/legacy.c

index 6bda01fa574779a7432b596fd4003f98b10a216d..10dceccd9ce8667418844aef7101a6487a85c1b3 100644 (file)
@@ -130,11 +130,6 @@ struct dsa_switch_tree {
         */
        struct dsa_platform_data        *pd;
 
-       /* Copy of tag_ops->rcv for faster access in hot path */
-       struct sk_buff *        (*rcv)(struct sk_buff *skb,
-                                      struct net_device *dev,
-                                      struct packet_type *pt);
-
        /*
         * The switch port to which the CPU is attached.
         */
@@ -144,12 +139,6 @@ struct dsa_switch_tree {
         * Data for the individual switch chips.
         */
        struct dsa_switch       *ds[DSA_MAX_SWITCHES];
-
-       /*
-        * Tagging protocol operations for adding and removing an
-        * encapsulation tag.
-        */
-       const struct dsa_device_ops *tag_ops;
 };
 
 /* TC matchall action types, only mirroring for now */
index 62302558f38c083038c8ba626f2a09cd0751d840..54ed054777bd7c8f9a8dc7ef26ba9a9524eb6bed 100644 (file)
@@ -523,11 +523,9 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index,
        }
 
        dst->cpu_dp->tag_ops = tag_ops;
-       dst->tag_ops = tag_ops;
 
        /* Make a few copies for faster access in master receive hot path */
        dst->cpu_dp->rcv = dst->cpu_dp->tag_ops->rcv;
-       dst->rcv = dst->tag_ops->rcv;
        dst->cpu_dp->dst = dst;
 
        return 0;
index 71917505a5ccf3c760da428bda06384d9be450cb..19ff6e0a21dc526d345e68a2b4bf1c593c0ff6f8 100644 (file)
@@ -153,11 +153,9 @@ static int dsa_switch_setup_one(struct dsa_switch *ds,
                        return PTR_ERR(tag_ops);
 
                dst->cpu_dp->tag_ops = tag_ops;
-               dst->tag_ops = tag_ops;
 
                /* Few copies for faster access in master receive hot path */
                dst->cpu_dp->rcv = dst->cpu_dp->tag_ops->rcv;
-               dst->rcv = dst->tag_ops->rcv;
                dst->cpu_dp->dst = dst;
        }