Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653472 > unrolled thread
| Started by | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| First post | 2017-05-30 20:40 +0200 |
| Last post | 2017-05-30 22:00 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-05-30 20:40 +0200
Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv Florian Fainelli <f.fainelli@gmail.com> - 2017-05-30 21:10 +0200
Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv Florian Fainelli <f.fainelli@gmail.com> - 2017-05-30 22:00 +0200
Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-05-30 22:10 +0200
Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-05-30 22:00 +0200
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-05-30 20:40 +0200 |
| Subject | [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv |
| Message-ID | <tMUdH-2qm-3@gated-at.bofh.it> |
The struct dsa_device_ops defines the rcv function with 2 unused
arguments struct packet_type *pt, and struct net_device *orig_dev.
This patch removes them from the definition and implementations.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
include/net/dsa.h | 4 +---
net/dsa/dsa.c | 2 +-
net/dsa/dsa_priv.h | 4 +---
net/dsa/tag_brcm.c | 4 +---
net/dsa/tag_dsa.c | 4 +---
net/dsa/tag_edsa.c | 4 +---
net/dsa/tag_lan9303.c | 3 +--
net/dsa/tag_mtk.c | 4 +---
net/dsa/tag_qca.c | 4 +---
net/dsa/tag_trailer.c | 4 +---
10 files changed, 10 insertions(+), 27 deletions(-)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 4675b52c964c..9e128e447f0b 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -129,9 +129,7 @@ struct dsa_switch_tree {
/* 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,
- struct net_device *orig_dev);
+ struct net_device *dev);
/*
* Original copy of the master netdev ethtool_ops
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 3288a80d4d6c..58594784ab94 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -204,7 +204,7 @@ static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
if (!skb)
return 0;
- nskb = dst->rcv(skb, dev, pt, orig_dev);
+ nskb = dst->rcv(skb, dev);
if (!nskb) {
kfree_skb(skb);
return 0;
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 2ce9fec9eec5..1a69d70fcd3a 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -67,9 +67,7 @@ struct dsa_notifier_vlan_info {
struct dsa_device_ops {
struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
- struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev);
+ struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev);
};
struct dsa_slave_priv {
diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c
index 9f204f18ada3..c8bff4d7543d 100644
--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -92,9 +92,7 @@ static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb, struct net_device *dev
return NULL;
}
-static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev)
+static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_switch_tree *dst = dev->dsa_ptr;
struct dsa_switch *ds;
diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c
index 3b62a57956a3..41f78e42f9ba 100644
--- a/net/dsa/tag_dsa.c
+++ b/net/dsa/tag_dsa.c
@@ -68,9 +68,7 @@ static struct sk_buff *dsa_xmit(struct sk_buff *skb, struct net_device *dev)
return NULL;
}
-static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev)
+static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_switch_tree *dst = dev->dsa_ptr;
struct dsa_switch *ds;
diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c
index f95cafd05702..36389fc8fe06 100644
--- a/net/dsa/tag_edsa.c
+++ b/net/dsa/tag_edsa.c
@@ -81,9 +81,7 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev)
return NULL;
}
-static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev)
+static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_switch_tree *dst = dev->dsa_ptr;
struct dsa_switch *ds;
diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c
index afd59330b5f1..82e150486497 100644
--- a/net/dsa/tag_lan9303.c
+++ b/net/dsa/tag_lan9303.c
@@ -71,8 +71,7 @@ static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net_device *dev)
return NULL;
}
-static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt, struct net_device *orig_dev)
+static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev)
{
u16 *lan9303_tag;
struct dsa_switch_tree *dst = dev->dsa_ptr;
diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c
index d1258e84cd71..7c9764c8d61b 100644
--- a/net/dsa/tag_mtk.c
+++ b/net/dsa/tag_mtk.c
@@ -47,9 +47,7 @@ static struct sk_buff *mtk_tag_xmit(struct sk_buff *skb,
return NULL;
}
-static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev)
+static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_switch_tree *dst = dev->dsa_ptr;
struct dsa_switch *ds;
diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index 2451007699b7..d38bd5cbfad8 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -66,9 +66,7 @@ static struct sk_buff *qca_tag_xmit(struct sk_buff *skb, struct net_device *dev)
return NULL;
}
-static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev)
+static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_switch_tree *dst = dev->dsa_ptr;
struct dsa_switch *ds;
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index 7488ab2932ab..e1fd78197fc8 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -58,9 +58,7 @@ static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev)
return nskb;
}
-static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev,
- struct packet_type *pt,
- struct net_device *orig_dev)
+static struct sk_buff *trailer_rcv(struct sk_buff *skb, struct net_device *dev)
{
struct dsa_switch_tree *dst = dev->dsa_ptr;
struct dsa_switch *ds;
--
2.13.0
[toc] | [next] | [standalone]
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-05-30 21:10 +0200 |
| Subject | Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv |
| Message-ID | <tMUGK-2PS-23@gated-at.bofh.it> |
| In reply to | #1653472 |
Hey Vivien, On 05/30/2017 11:33 AM, Vivien Didelot wrote: > The struct dsa_device_ops defines the rcv function with 2 unused > arguments struct packet_type *pt, and struct net_device *orig_dev. > > This patch removes them from the definition and implementations. > > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> I actually have a patch pending that adds support for HW insertion/extraction of switch tags (broadcom HW supports that) which require the orig_dev to be there so we know what features are supported by the master network device. Do you mind dropping this one from your patch series? Thanks! -- Florian
[toc] | [prev] | [next] | [standalone]
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-05-30 22:00 +0200 |
| Subject | Re: [PATCH net-next v2 4/6] net: dsa: remove unused arguments of tagger rcv |
| Message-ID | <tMVt7-37M-3@gated-at.bofh.it> |
| In reply to | #1653507 |
On 05/30/2017 12:55 PM, Vivien Didelot wrote: > Hi Florian, > > Florian Fainelli <f.fainelli@gmail.com> writes: > >> I actually have a patch pending that adds support for HW >> insertion/extraction of switch tags (broadcom HW supports that) which >> require the orig_dev to be there so we know what features are supported >> by the master network device. > > Is orig_dev really needed in the tagging implementation, or only in the > layer above? (dsa_slave_xmit and dsa_switch_rcv.) It's needed: https://github.com/ffainelli/linux/commits/switch-tag https://github.com/ffainelli/linux/commit/61f9ca70dd21bb8c1615f959934cd0ce80a2f3ce > >> Do you mind dropping this one from your patch series? > > I don't mind if they are actually needed in taggers. I'd wait for > reviews of the other patches before respinning though. > > Thanks, > > Vivien > -- Florian
[toc] | [prev] | [next] | [standalone]
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-05-30 22:10 +0200 |
| Message-ID | <tMVCN-3qh-1@gated-at.bofh.it> |
| In reply to | #1653532 |
Florian Fainelli <f.fainelli@gmail.com> writes: >> Is orig_dev really needed in the tagging implementation, or only in the >> layer above? (dsa_slave_xmit and dsa_switch_rcv.) > > It's needed: > > https://github.com/ffainelli/linux/commits/switch-tag > https://github.com/ffainelli/linux/commit/61f9ca70dd21bb8c1615f959934cd0ce80a2f3ce Patch dropped!
[toc] | [prev] | [next] | [standalone]
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2017-05-30 22:00 +0200 |
| Message-ID | <tMVt7-37M-5@gated-at.bofh.it> |
| In reply to | #1653507 |
Hi Florian,
Florian Fainelli <f.fainelli@gmail.com> writes:
> I actually have a patch pending that adds support for HW
> insertion/extraction of switch tags (broadcom HW supports that) which
> require the orig_dev to be there so we know what features are supported
> by the master network device.
Is orig_dev really needed in the tagging implementation, or only in the
layer above? (dsa_slave_xmit and dsa_switch_rcv.)
> Do you mind dropping this one from your patch series?
I don't mind if they are actually needed in taggers. I'd wait for
reviews of the other patches before respinning though.
Thanks,
Vivien
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web