net: dsa: tag_ocelot: let DSA core deal with TX reallocation
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 1 Nov 2020 19:16:13 +0000 (21:16 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Nov 2020 01:41:16 +0000 (17:41 -0800)
Now that we have a central TX reallocation procedure that accounts for
the tagger's needed headroom in a generic way, we can remove the
skb_cow_head call.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/tag_ocelot.c

index 3b468aca5c53f2989f13dbdd9610fc594aa24bae..16a1afd5b8e1445df8a3d2f0b439dc3b9d542cc7 100644 (file)
@@ -143,13 +143,6 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb,
        struct ocelot_port *ocelot_port;
        u8 *prefix, *injection;
        u64 qos_class, rew_op;
-       int err;
-
-       err = skb_cow_head(skb, OCELOT_TOTAL_TAG_LEN);
-       if (unlikely(err < 0)) {
-               netdev_err(netdev, "Cannot make room for tag.\n");
-               return NULL;
-       }
 
        ocelot_port = ocelot->ports[dp->index];