Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv()

No tagging driver uses this.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vladimir Oltean and committed by
David S. Miller
29a097b7 35d7a6f1

+25 -49
+2 -5
include/net/dsa.h
··· 79 79 DSA_TAG_PROTO_SJA1110 = DSA_TAG_PROTO_SJA1110_VALUE, 80 80 }; 81 81 82 - struct packet_type; 83 82 struct dsa_switch; 84 83 85 84 struct dsa_device_ops { 86 85 struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev); 87 - struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev, 88 - struct packet_type *pt); 86 + struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev); 89 87 void (*flow_dissect)(const struct sk_buff *skb, __be16 *proto, 90 88 int *offset); 91 89 unsigned int needed_headroom; ··· 237 239 238 240 /* Copies for faster access in master receive hot path */ 239 241 struct dsa_switch_tree *dst; 240 - struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev, 241 - struct packet_type *pt); 242 + struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev); 242 243 243 244 enum { 244 245 DSA_PORT_TYPE_UNUSED = 0,
+1 -1
net/dsa/dsa.c
··· 238 238 if (!skb) 239 239 return 0; 240 240 241 - nskb = cpu_dp->rcv(skb, dev, pt); 241 + nskb = cpu_dp->rcv(skb, dev); 242 242 if (!nskb) { 243 243 kfree_skb(skb); 244 244 return 0;
+1 -2
net/dsa/tag_ar9331.c
··· 44 44 } 45 45 46 46 static struct sk_buff *ar9331_tag_rcv(struct sk_buff *skb, 47 - struct net_device *ndev, 48 - struct packet_type *pt) 47 + struct net_device *ndev) 49 48 { 50 49 u8 ver, port; 51 50 u16 hdr;
+5 -9
net/dsa/tag_brcm.c
··· 136 136 */ 137 137 static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb, 138 138 struct net_device *dev, 139 - struct packet_type *pt, 140 139 unsigned int offset) 141 140 { 142 141 int source_port; ··· 181 182 } 182 183 183 184 184 - static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev, 185 - struct packet_type *pt) 185 + static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev) 186 186 { 187 187 struct sk_buff *nskb; 188 188 189 189 /* skb->data points to the EtherType, the tag is right before it */ 190 - nskb = brcm_tag_rcv_ll(skb, dev, pt, 2); 190 + nskb = brcm_tag_rcv_ll(skb, dev, 2); 191 191 if (!nskb) 192 192 return nskb; 193 193 ··· 249 251 } 250 252 251 253 static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb, 252 - struct net_device *dev, 253 - struct packet_type *pt) 254 + struct net_device *dev) 254 255 { 255 256 int source_port; 256 257 u8 *brcm_tag; ··· 299 302 } 300 303 301 304 static struct sk_buff *brcm_tag_rcv_prepend(struct sk_buff *skb, 302 - struct net_device *dev, 303 - struct packet_type *pt) 305 + struct net_device *dev) 304 306 { 305 307 /* tag is prepended to the packet */ 306 - return brcm_tag_rcv_ll(skb, dev, pt, ETH_HLEN); 308 + return brcm_tag_rcv_ll(skb, dev, ETH_HLEN); 307 309 } 308 310 309 311 static const struct dsa_device_ops brcm_prepend_netdev_ops = {
+2 -4
net/dsa/tag_dsa.c
··· 332 332 return dsa_xmit_ll(skb, dev, 0); 333 333 } 334 334 335 - static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev, 336 - struct packet_type *pt) 335 + static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev) 337 336 { 338 337 if (unlikely(!pskb_may_pull(skb, DSA_HLEN))) 339 338 return NULL; ··· 372 373 return skb; 373 374 } 374 375 375 - static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev, 376 - struct packet_type *pt) 376 + static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev) 377 377 { 378 378 if (unlikely(!pskb_may_pull(skb, EDSA_HLEN))) 379 379 return NULL;
+1 -2
net/dsa/tag_gswip.c
··· 75 75 } 76 76 77 77 static struct sk_buff *gswip_tag_rcv(struct sk_buff *skb, 78 - struct net_device *dev, 79 - struct packet_type *pt) 78 + struct net_device *dev) 80 79 { 81 80 int port; 82 81 u8 *gswip_tag;
+1 -2
net/dsa/tag_hellcreek.c
··· 29 29 } 30 30 31 31 static struct sk_buff *hellcreek_rcv(struct sk_buff *skb, 32 - struct net_device *dev, 33 - struct packet_type *pt) 32 + struct net_device *dev) 34 33 { 35 34 /* Tag decoding */ 36 35 u8 *tag = skb_tail_pointer(skb) - HELLCREEK_TAG_LEN;
+2 -4
net/dsa/tag_ksz.c
··· 67 67 return skb; 68 68 } 69 69 70 - static struct sk_buff *ksz8795_rcv(struct sk_buff *skb, struct net_device *dev, 71 - struct packet_type *pt) 70 + static struct sk_buff *ksz8795_rcv(struct sk_buff *skb, struct net_device *dev) 72 71 { 73 72 u8 *tag = skb_tail_pointer(skb) - KSZ_EGRESS_TAG_LEN; 74 73 ··· 133 134 return skb; 134 135 } 135 136 136 - static struct sk_buff *ksz9477_rcv(struct sk_buff *skb, struct net_device *dev, 137 - struct packet_type *pt) 137 + static struct sk_buff *ksz9477_rcv(struct sk_buff *skb, struct net_device *dev) 138 138 { 139 139 /* Tag decoding */ 140 140 u8 *tag = skb_tail_pointer(skb) - KSZ_EGRESS_TAG_LEN;
+1 -2
net/dsa/tag_lan9303.c
··· 74 74 return skb; 75 75 } 76 76 77 - static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev, 78 - struct packet_type *pt) 77 + static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev) 79 78 { 80 79 __be16 *lan9303_tag; 81 80 u16 lan9303_tag1;
+1 -2
net/dsa/tag_mtk.c
··· 61 61 return skb; 62 62 } 63 63 64 - static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev, 65 - struct packet_type *pt) 64 + static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev) 66 65 { 67 66 u16 hdr; 68 67 int port;
+1 -2
net/dsa/tag_ocelot.c
··· 55 55 } 56 56 57 57 static struct sk_buff *ocelot_rcv(struct sk_buff *skb, 58 - struct net_device *netdev, 59 - struct packet_type *pt) 58 + struct net_device *netdev) 60 59 { 61 60 u64 src_port, qos_class; 62 61 u64 vlan_tci, tag_type;
+1 -2
net/dsa/tag_ocelot_8021q.c
··· 38 38 } 39 39 40 40 static struct sk_buff *ocelot_rcv(struct sk_buff *skb, 41 - struct net_device *netdev, 42 - struct packet_type *pt) 41 + struct net_device *netdev) 43 42 { 44 43 int src_port, switch_id; 45 44
+1 -2
net/dsa/tag_qca.c
··· 48 48 return skb; 49 49 } 50 50 51 - static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev, 52 - struct packet_type *pt) 51 + static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev) 53 52 { 54 53 u8 ver; 55 54 u16 hdr;
+1 -2
net/dsa/tag_rtl4_a.c
··· 64 64 } 65 65 66 66 static struct sk_buff *rtl4a_tag_rcv(struct sk_buff *skb, 67 - struct net_device *dev, 68 - struct packet_type *pt) 67 + struct net_device *dev) 69 68 { 70 69 u16 protport; 71 70 __be16 *p;
+2 -4
net/dsa/tag_sja1105.c
··· 391 391 } 392 392 393 393 static struct sk_buff *sja1105_rcv(struct sk_buff *skb, 394 - struct net_device *netdev, 395 - struct packet_type *pt) 394 + struct net_device *netdev) 396 395 { 397 396 int source_port = -1, switch_id = -1; 398 397 struct sja1105_meta meta = {0}; ··· 545 546 } 546 547 547 548 static struct sk_buff *sja1110_rcv(struct sk_buff *skb, 548 - struct net_device *netdev, 549 - struct packet_type *pt) 549 + struct net_device *netdev) 550 550 { 551 551 int source_port = -1, switch_id = -1; 552 552 bool host_only = false;
+1 -2
net/dsa/tag_trailer.c
··· 24 24 return skb; 25 25 } 26 26 27 - static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev, 28 - struct packet_type *pt) 27 + static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev) 29 28 { 30 29 u8 *trailer; 31 30 int source_port;
+1 -2
net/dsa/tag_xrs700x.c
··· 25 25 return skb; 26 26 } 27 27 28 - static struct sk_buff *xrs700x_rcv(struct sk_buff *skb, struct net_device *dev, 29 - struct packet_type *pt) 28 + static struct sk_buff *xrs700x_rcv(struct sk_buff *skb, struct net_device *dev) 30 29 { 31 30 int source_port; 32 31 u8 *trailer;