All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Subject: [PATCH net-next v2 0/7] net: dsa: change dsa_ptr for a dsa_port
Date: Fri, 29 Sep 2017 17:19:14 -0400	[thread overview]
Message-ID: <20170929211921.5571-1-vivien.didelot@savoirfairelinux.com> (raw)

With DSA, a master net_device is physically wired to a dedicated CPU
switch port. For interaction with the DSA layer, the struct net_device
contains a dsa_ptr, which currently points to a dsa_switch_tree object.

This is only valid for a switch fabric with a single CPU port. In order
to support switch fabrics with multiple CPU ports, we first need to
change the type of dsa_ptr to what it really is: a dsa_port object.

This is what this patchset does. The first patches adds a
dsa_master_get_slave helper and cleans up portions of DSA core to make
the next patches more readable. These next patches prepare the xmit and
receive hot paths and finally change dsa_ptr.

Changes in v2:
  - introduce dsa_master_get_slave helper to simplify patch 6
  - keep hot path data at beginning of dsa_port for cacheline 1

Vivien Didelot (7):
  net: dsa: add master helper to look up slaves
  net: dsa: use cpu_dp in master code
  net: dsa: use temporary dsa_device_ops variable
  net: dsa: add tagging ops to port
  net: dsa: prepare master receive hot path
  net: dsa: change dsa_ptr for a dsa_port
  net: dsa: remove tag ops from the switch tree

 include/linux/netdevice.h |  4 ++--
 include/net/dsa.h         | 19 ++++++++-----------
 net/dsa/dsa.c             |  6 +++---
 net/dsa/dsa2.c            | 15 ++++++++++-----
 net/dsa/dsa_priv.h        | 27 +++++++++++++++++++++------
 net/dsa/legacy.c          | 15 ++++++++++-----
 net/dsa/master.c          | 47 ++++++++++++++++++++++-------------------------
 net/dsa/slave.c           |  3 +--
 net/dsa/tag_brcm.c        |  9 ++-------
 net/dsa/tag_dsa.c         | 18 ++----------------
 net/dsa/tag_edsa.c        | 18 ++----------------
 net/dsa/tag_ksz.c         |  9 +++------
 net/dsa/tag_lan9303.c     | 20 ++------------------
 net/dsa/tag_mtk.c         | 16 +++-------------
 net/dsa/tag_qca.c         | 17 +++--------------
 net/dsa/tag_trailer.c     |  9 +++------
 16 files changed, 97 insertions(+), 155 deletions(-)

-- 
2.14.1

             reply	other threads:[~2017-09-29 21:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 21:19 Vivien Didelot [this message]
2017-09-29 21:19 ` [PATCH net-next v2 1/7] net: dsa: add master helper to look up slaves Vivien Didelot
2017-09-30  1:14   ` Florian Fainelli
2017-09-29 21:19 ` [PATCH net-next v2 2/7] net: dsa: use cpu_dp in master code Vivien Didelot
2017-09-29 21:19 ` [PATCH net-next v2 3/7] net: dsa: use temporary dsa_device_ops variable Vivien Didelot
2017-09-29 21:19 ` [PATCH net-next v2 4/7] net: dsa: add tagging ops to port Vivien Didelot
2017-09-29 21:19 ` [PATCH net-next v2 5/7] net: dsa: prepare master receive hot path Vivien Didelot
2017-09-29 21:19 ` [PATCH net-next v2 6/7] net: dsa: change dsa_ptr for a dsa_port Vivien Didelot
2017-09-29 21:19 ` [PATCH net-next v2 7/7] net: dsa: remove tag ops from the switch tree Vivien Didelot
2017-10-01  3:15 ` [PATCH net-next v2 0/7] net: dsa: change dsa_ptr for a dsa_port David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170929211921.5571-1-vivien.didelot@savoirfairelinux.com \
    --to=vivien.didelot@savoirfairelinux.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.