One additional register range needs to be described within the Ocelot
device tree node: the PTP. This patch documents the binding needed to do
so.
Signed-off-by: Antoine Tenart
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++---
1 file changed, 6 insertions(+), 3 deletions
This patch adds a description of the PTP ready interrupt, which can be
triggered when a PTP timestamp is available on an hardware FIFO.
Signed-off-by: Antoine Tenart
Acked-by: Paul Burton
---
arch/mips/boot/dts/mscc/ocelot.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
One additional interrupt needs to be described within the Ocelot device
tree node: the PTP ready one. This patch documents the binding needed to
do so.
Signed-off-by: Antoine Tenart
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++-
1 file changed, 6 insertions(+), 5
This cosmetic patch improves the frame header parsing readability by
introducing a new macro to access and mask its fields.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot_board.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
This patch adds one register range within the mscc,vsc7514-switch node,
to describe the PTP registers.
Signed-off-by: Antoine Tenart
Acked-by: Paul Burton
---
arch/mips/boot/dts/mscc/ocelot.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/boot/dts/mscc
This patch adds support for using the PTP register range, and adds a
description of its registers. This bank is used when configuring PTP.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.h | 9 ++
drivers/net/ethernet/mscc/ocelot_board.c | 10 +-
drivers/net
In struct frame_info, the cpuq member is never used. This cosmetic patch
removes it from the structure, and from the parsing of the frame header
as it's only set but never used.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.h | 1 -
drivers/net/ethernet
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot
switch for both PTP 1-step and 2-step modes.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.c | 394 ++-
drivers/net/ethernet/mscc/ocelot.h | 39 +++
drivers/net/ethernet/mscc
case of ptp_clock_register().
- Added comments on optional dt properties.
Antoine Tenart (8):
Documentation/bindings: net: ocelot: document the PTP bank
MIPS: dts: mscc: describe the PTP register range
Documentation/bindings: net: ocelot: document the PTP ready IRQ
MIPS: dts: mscc: des
Hi David,
On Wed, Jul 24, 2019 at 11:52:26AM -0700, David Miller wrote:
> From: Antoine Tenart
> Date: Wed, 24 Jul 2019 10:17:15 +0200
>
> > +static int ocelot_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
> > +{
> > + struct ocelot *ocelot = cont
se of ptp_clock_register().
- Added comments on optional dt properties.
Antoine Tenart (6):
Documentation/bindings: net: ocelot: document the PTP bank
Documentation/bindings: net: ocelot: document the PTP ready IRQ
net: mscc: describe the PTP register range
net: mscc: improve the frame h
One additional interrupt needs to be described within the Ocelot device
tree node: the PTP ready one. This patch documents the binding needed to
do so.
Signed-off-by: Antoine Tenart
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++-
1 file changed, 6 insertions(+), 5
This patch adds support for using the PTP register range, and adds a
description of its registers. This bank is used when configuring PTP.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.h | 9 ++
drivers/net/ethernet/mscc/ocelot_board.c | 10 +-
drivers/net
One additional register range needs to be described within the Ocelot
device tree node: the PTP. This patch documents the binding needed to do
so.
Signed-off-by: Antoine Tenart
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++---
1 file changed, 6 insertions(+), 3 deletions
In struct frame_info, the cpuq member is never used. This cosmetic patch
removes it from the structure, and from the parsing of the frame header
as it's only set but never used.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.h | 1 -
drivers/net/ethernet
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot
switch for both PTP 1-step and 2-step modes.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.c | 394 ++-
drivers/net/ethernet/mscc/ocelot.h | 39 +++
drivers/net/ethernet/mscc
This cosmetic patch improves the frame header parsing readability by
introducing a new macro to access and mask its fields.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot_board.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
One additional interrupt needs to be described within the Ocelot device
tree node: the PTP ready one. This patch documents the binding needed to
do so.
Signed-off-by: Antoine Tenart
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++-
1 file changed, 6 insertions(+), 5
ak in ocelot_deinit() by calling
dev_kfree_skb_any().
- Fixed a locking issue in get_hwtimestamp().
- Handled the NULL case of ptp_clock_register().
- Added comments on optional dt properties.
Antoine Tenart (6):
Documentation/bindings: net: ocelot: document the PTP bank
Documentation/bin
This patch adds support for using the PTP register range, and adds a
description of its registers. This bank is used when configuring PTP.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.h | 9 ++
drivers/net/ethernet/mscc/ocelot_board.c | 10 +-
drivers/net
One additional register range needs to be described within the Ocelot
device tree node: the PTP. This patch documents the binding needed to do
so.
Signed-off-by: Antoine Tenart
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++---
1 file changed, 6 insertions(+), 3 deletions
This cosmetic patch improves the frame header parsing readability by
introducing a new macro to access and mask its fields.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot_board.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
In struct frame_info, the cpuq member is never used. This cosmetic patch
removes it from the structure, and from the parsing of the frame header
as it's only set but never used.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.h | 1 -
drivers/net/ethernet
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot
switch for both PTP 1-step and 2-step modes.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.c | 396 ++-
drivers/net/ethernet/mscc/ocelot.h | 39 +++
drivers/net/ethernet/mscc
Hello Matt,
On Thu, Aug 08, 2019 at 07:06:06PM -0400, Matt Pelland wrote:
>
> static void mvpp2_port_enable(struct mvpp2_port *port)
> @@ -3389,7 +3412,9 @@ static void mvpp2_stop_dev(struct mvpp2_port *port)
>
> if (port->phylink)
> phylink_stop(port->phylink);
> - ph
Hello Matt,
On Thu, Aug 08, 2019 at 07:06:05PM -0400, Matt Pelland wrote:
>
> +static void mvpp22_gop_init_rxaui(struct mvpp2_port *port)
> +{
> + struct mvpp2 *priv = port->priv;
> + void __iomem *xpcs;
> + u32 val;
> +
> + xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id
Hello Matt,
One small comment: it seems you made a typo on davem's email address.
It's .net, not .com :)
Thanks,
Antoine
On Thu, Aug 08, 2019 at 07:06:04PM -0400, Matt Pelland wrote:
> This patch set implements support for configuring Marvell's mvpp2 hardware for
> RXAUI operation. There are two
Hello Matt,
On Fri, Aug 09, 2019 at 06:20:28PM -0400, Matt Pelland wrote:
> On Fri, Aug 09, 2019 at 10:32:50AM +0200, Antoine Tenart wrote:
> > On Thu, Aug 08, 2019 at 07:06:06PM -0400, Matt Pelland wrote:
> > > @@ -5084,14 +5107,38 @@ static int mvpp2_port_probe(struct
>
Hi Andrew,
On Sat, Aug 10, 2019 at 07:32:24PM +0200, Andrew Lunn wrote:
> > @@ -596,11 +606,53 @@ static int ocelot_port_xmit(struct sk_buff *skb,
> > struct net_device *dev)
> >
> > dev->stats.tx_packets++;
> > dev->stats.tx_bytes += skb->len;
> > - dev_kfree_skb_any(skb);
> > +
> >
This patch adds support for PTP Hardware Clock (PHC) to the Ocelot
switch for both PTP 1-step and 2-step modes.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot.c | 401 ++-
drivers/net/ethernet/mscc/ocelot.h | 39 +++
drivers/net/ethernet/mscc
One additional interrupt needs to be described within the Ocelot device
tree node: the PTP ready one. This patch documents the binding needed to
do so.
Signed-off-by: Antoine Tenart
Reviewed-by: Andrew Lunn
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 11 ++-
1 file
In struct frame_info, the cpuq member is never used. This cosmetic patch
removes it from the structure, and from the parsing of the frame header
as it's only set but never used.
Signed-off-by: Antoine Tenart
Reviewed-by: Andrew Lunn
---
drivers/net/ethernet/mscc/ocelot.h | 1 -
dr
stamp().
- Handled the NULL case of ptp_clock_register().
- Added comments on optional dt properties.
Antoine Tenart (6):
Documentation/bindings: net: ocelot: document the PTP bank
Documentation/bindings: net: ocelot: document the PTP ready IRQ
net: mscc: describe the PTP register range
net:
One additional register range needs to be described within the Ocelot
device tree node: the PTP. This patch documents the binding needed to do
so.
Signed-off-by: Antoine Tenart
Reviewed-by: Andrew Lunn
---
Documentation/devicetree/bindings/net/mscc-ocelot.txt | 9 ++---
1 file changed, 6
This cosmetic patch improves the frame header parsing readability by
introducing a new macro to access and mask its fields.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mscc/ocelot_board.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
This patch adds support for using the PTP register range, and adds a
description of its registers. This bank is used when configuring PTP.
Signed-off-by: Antoine Tenart
Reviewed-by: Andrew Lunn
---
drivers/net/ethernet/mscc/ocelot.h | 9 ++
drivers/net/ethernet/mscc/ocelot_board.c
("net-sysfs: Add interface for Rx queue(s) map per Tx
queue")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 62ca2f2c0ee6..daf502c13d6d 100644
o
xps_rxqs in a concurrent thread. With the right timing an oops is
triggered.
Fixes: 8af2c06ff4b1 ("net-sysfs: Add interface for Rx queue(s) map per Tx
queue")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/net/core/n
is given in each of the commit logs.
Thanks!
Antoine
Antoine Tenart (4):
net-sysfs: take the rtnl lock when storing xps_cpus
net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc
net-sysfs: take the rtnl lock when storing xps_rxqs
net-sysfs: take the rtnl lock when access
in a concurrent thread. With the right timing an oops is
triggered.
Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/net/core/net-sysfs.c b/n
;net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 29 ++---
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 7cc15dec1717..65886bfbf822 100644
Hi Stefan,
Quoting stef...@marvell.com (2020-12-17 18:23:11)
> From: Stefan Chulski
>
> Current PPPoE+IPv6 entry is jumping to 'next-hdr'
> field and not to 'DIP' field as done for IPv4.
>
> Fixes: db9d7d36eecc ("net: mvpp2: Split the PPv2 driver to a dedicated
> directory")
That's not the co
Quoting stef...@marvell.com (2020-12-17 18:45:06)
> From: Stefan Chulski
>
> Issue:
> Flow control frame used to pause GoP(MAC) was delivered to the CPU
> and created a load on the CPU. Since XOFF/XON frames are used only
> by MAC, these frames should be dropped inside MAC.
>
> Fix:
> According
oss
> # install riscv cross compiling tool for clang build
> # apt-get install binutils-riscv64-linux-gnu
> #
> https://github.com/0day-ci/linux/commit/f989c3dcbe4d9abd1c6c48b34f08c6c0cd9d44b3
> git remote add linux-review https://github.com/0day-ci/l
Hi Jakub, Alexander,
Quoting Alexander Duyck (2020-12-19 02:41:08)
> On Fri, Dec 18, 2020 at 4:30 PM Jakub Kicinski wrote:
> >
> > Two things: (a) is the datapath not exposed to a similar problem?
> > __get_xps_queue_idx() uses dev->tc_num in a very similar fashion.
>
> I think we are shielded f
. I updated its commit log
to describe both races.
Thanks!
Antoine
Antoine Tenart (3):
net: fix race conditions in xps by locking the maps and dev->tc_num
net: move the xps cpus retrieval out of net-sysfs
net: move the xps rxqs retrieval out of net-sysfs
include/linux/netdevice.h | 9 +
This is why the patch is a little bit longer, and moves
netdev_unbind_sb_channel up in the file.
Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 122 -
s to keep xps_cpus_show and xps_rxqs_show synced as their
logic is the same (as in __netif_set_xps_queue, the function allocating
and setting them up).
Fixes: 8af2c06ff4b1 ("net-sysfs: Add interface for Rx queue(s) map per Tx
queue")
Signed-off-by: Antoine Tenart
---
include/linux/netdevic
e xps_map mutex is defined and used.
Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart
---
include/linux/netdevice.h | 8 ++
net/core/dev.c| 59 +++
net/c
Hi Alexander,
Quoting Alexander Duyck (2020-12-21 23:33:15)
>
> One thing I might change is to actually bump this patch up in the
> patch set as I think it would probably make things a bit cleaner to
> read as you are going to be moving the other functions to this pattern
> as well.
Right. If it
Hello Alexander, Jakub,
Quoting Alexander Duyck (2020-12-22 00:21:57)
>
> Looking over this patch it seems kind of obvious that extending the
> xps_map_mutex is making things far more complex then they need to be.
>
> Applying the rtnl_mutex would probably be much simpler. Although as I
> think
en should reflect the
length of the header created. Otherwise, when not used,
dev->needed_headroom should be used.
Fixes: eb95f52fc72d ("net: ipv6_gre: Fix GRO to work on IPv6 over GRE tap")
Cc: Maria Pasechnik
Signed-off-by: Antoine Tenart
---
net/ipv6/ip6_gre.c | 16 +-
Hello Christian,
Quoting Christian Eggers (2020-11-22 09:26:36)
> Use recently introduced PTP_MSGTYPE_SYNC and PTP_MSGTYPE_DELAY_REQ
> defines instead of a driver internal enumeration.
>
> Signed-off-by: Christian Eggers
Reviewed-by: Antoine Tenart
Thanks!
Antoine
> Cc: Quent
e cares about the value of
skb->pkt_type after br_dev_queue_push_xmit (which isn't true), resetting
it to its original value should be safe.
Signed-off-by: Antoine Tenart
---
net/bridge/br_netfilter_hooks.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/br
Hi Steen!
Either this is a fix and it would need a Fixes: tag in addition to the
Signed-off-by: one (you can have a look at the git history to see what
is the format); or the patch is not a fix and then it should have
[net-next] in its subject instead of [net].
Please have a look at the relevant
Hi Steen,
Quoting Steen Hegelund (2020-11-11 16:17:53)
> The MSCC PHYs selected for PTP and MACSec was not correct
>
> - PTP
> - Add VSC8572 and VSC8574
>
> - MACsec
> - Removed VSC8575
>
> The relevant datasheets can be found here:
> - VSC8572: https://www.microchip.com/wwwproducts/e
the "Fixes:" tag
>
> Fixes: 1bbe0ecc2a1a ("net: phy: mscc: macsec initialization")
> Signed-off-by: Steen Hegelund
Reviewed-by: Antoine Tenart
Small comment: you can put the commit history after the --- so it
doesn't end-up in the commit log (except when it's re
_middle.cocci script")
> CC: Denis Efremov
> Reported-by: kernel test robot
> Signed-off-by: kernel test robot
> Signed-off-by: Julia Lawall
Reviewed-by: Antoine Tenart
Thanks!
Antoine
> ---
>
> v2: add netdev mailing list
>
> tree: https://git.kerne
Hi Jakub,
Quoting Jakub Kicinski (2020-12-23 19:27:29)
> On Tue, 22 Dec 2020 08:12:28 -0800 Alexander Duyck wrote:
> > On Tue, Dec 22, 2020 at 1:21 AM Antoine Tenart wrote:
> >
> > > If I understood correctly, as things are a bit too complex now, you
> > >
Quoting Jakub Kicinski (2020-12-23 21:11:10)
> On Wed, 23 Dec 2020 20:36:33 +0100 Antoine Tenart wrote:
> > Quoting Jakub Kicinski (2020-12-23 19:27:29)
> > > On Tue, 22 Dec 2020 08:12:28 -0800 Alexander Duyck wrote:
> > > > On Tue, Dec 22, 2020 at 1:21 AM
Quoting Jakub Kicinski (2020-12-23 21:43:15)
> On Wed, 23 Dec 2020 21:35:15 +0100 Antoine Tenart wrote:
> > > > - For net-next, to resend patches 2 and 3 from v2 (they'll have to be
> > > > slightly reworked, to take into account the review from Alexander a
Thanks!
Antoine
Antoine Tenart (4):
net-sysfs: take the rtnl lock when storing xps_cpus
net-sysfs: take the rtnl lock when accessing xps_cpus_map and num_tc
net-sysfs: take the rtnl lock when storing xps_rxqs
net-sysfs: take the rtnl lock when accessing xps_rxqs_map and num_tc
net/
_queue, netdev_set_num_tc
and netdev_reset_tc should be mutually exclusive. We do that by taking
the rtnl lock in xps_rxqs_store.
Fixes: 8af2c06ff4b1 ("net-sysfs: Add interface for Rx queue(s) map per Tx
queue")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 7 +++
1 file
("net-sysfs: Add interface for Rx queue(s) map per Tx
queue")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 62ca2f2c0ee6..daf502c13d6d 100644
;net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 29 ++---
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 7cc15dec1717..65886bfbf822 100644
_queue, netdev_set_num_tc
and netdev_reset_tc should be mutually exclusive. We do that by taking
the rtnl lock in xps_cpus_store.
Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 6 ++
1 file changed,
looks better and is easier to review.
Thanks!
Antoine
[1]
https://lore.kernel.org/netdev/160875219353.1783433.8066935261216141538@kwain.local/
Antoine Tenart (3):
net-sysfs: convert xps_cpus_show to bitmap_zalloc
net-sysfs: store the return of get_netdev_queue_index in an unsigned
int
In net-sysfs, get_netdev_queue_index returns an unsigned int. Some of
its callers use an unsigned long to store the returned value. Update the
code to be consistent, this should only be cosmetic.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 11 +++
1 file changed, 7
,
xps_queue_show, to improve maintenance.
While the rtnl lock could be held in the new xps_queue_show, it is still
held in xps_cpus_show and xps_rxqs_show as this is an important
information when looking at those two functions. This does not add
complexity.
Signed-off-by: Antoine Tenart
---
net/core/net
Use bitmap_zalloc instead if zalloc_cpumask_var in xps_cpus_show to
align with xps_rxqs_show. This will improve maintenance and allow us to
factorize the two functions. The function should behave the same.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 12 ++--
1 file changed
Quoting Alexander Duyck (2021-01-06 20:54:11)
> On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart wrote:
> > +/* Should be called with the rtnl lock held. */
> > +static int xps_queue_show(struct net_device *dev, unsigned long **mask,
> > + uns
Quoting Alexander Duyck (2021-01-07 17:38:35)
> On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart wrote:
> >
> > Quoting Alexander Duyck (2021-01-06 20:54:11)
> > > On Wed, Jan 6, 2021 at 10:04 AM Antoine Tenart wrote:
> >
> > That would require to hold rcu_rea
Quoting Alexander Duyck (2021-01-08 17:33:01)
> On Fri, Jan 8, 2021 at 1:07 AM Antoine Tenart wrote:
> >
> > Quoting Alexander Duyck (2021-01-07 17:38:35)
> > > On Thu, Jan 7, 2021 at 12:54 AM Antoine Tenart wrote:
> > > >
> > > > Quoting Alexan
Quoting Alexander Duyck (2021-01-08 23:04:57)
> On Fri, Jan 8, 2021 at 10:58 AM Antoine Tenart wrote:
> >
> > Quoting Alexander Duyck (2021-01-08 17:33:01)
> > > On Fri, Jan 8, 2021 at 1:07 AM Antoine Tenart wrote:
> > > >
> > > > Quoting Alexan
Use bitmap_zalloc instead if zalloc_cpumask_var in xps_cpus_show to
align with xps_rxqs_show. This will improve maintenance and allow us to
factorize the two functions. The function should behave the same.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 12 ++--
1 file changed
Thanks!
Antoine
[1] https://lore.kernel.org/netdev/20210106180428.722521-1-aten...@kernel.org/
Antoine Tenart (11):
net-sysfs: convert xps_cpus_show to bitmap_zalloc
net-sysfs: store the return of get_netdev_queue_index in an unsigned
int
net-sysfs: move the xps cpus/rxqs retrieval in a
- Checks can be made before accessing the maps so we know the values
retrieved will make sense.
We also update __netif_set_xps_queue to conditionally copy old maps from
dev_maps in the new one only if the number of traffic classes from both
maps match.
Signed-off-by: Antoine Tenart
--
In net-sysfs, get_netdev_queue_index returns an unsigned int. Some of
its callers use an unsigned long to store the returned value. Update the
code to be consistent, this should only be cosmetic.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 11 +++
1 file changed, 7
,
xps_queue_show, to improve maintenance.
While the rtnl lock could be held in the new xps_queue_show, it is still
held in xps_cpus_show and xps_rxqs_show as this is an important
information when looking at those two functions. This does not add
complexity.
Signed-off-by: Antoine Tenart
---
net/core/net
Remove the xps possible_mask. It was an optimization but we can just
loop from 0 to nr_ids now that it is embedded in the xps dev_maps. That
simplifies the code a bit.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 43
This patch adds an helper, xps_copy_dev_maps, to copy maps from dev_maps
to new_dev_maps at a given index. The logic should be the same, with an
improved code readability and maintenance.
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 45 +
1 file
.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
drivers/net/virtio_net.c | 2 +-
include/linux/netdevice.h | 17 +
net/core/dev.c| 73 +--
net/core/net-sysfs.c | 13 +++
4 files changed, 48 insertions(+), 57 deletions
Now that nr_ids and num_tc are stored in the xps dev_maps, which are RCU
protected, we do not have the need to protect the xps_queue_show
function with the rtnl lock.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 15 ---
1 file changed, 15 deletions(-)
diff --git a/net
Embed nr_ids (the number of cpu for the xps cpus map, and the number of
rxqs for the xps cpus map) in dev_maps. That will help not accessing out
of bound memory if those values change after dev_maps was allocated.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
include/linux
Add ASSERT_RTNL at the top of __netif_set_xps_queue and add a comment
about holding the rtnl lock before the function.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core
Improve the readability of the loop removing tx-queue from unused
CPUs/rx-queues in __netif_set_xps_queue. The change should only be
cosmetic.
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/net/core/dev.c b
tches to improve readability and avoid introducing
issues in between patches.
- Use dev_maps->nr_ids to allocate the mask in xps_queue_show but
still default to nr_cpu_ids/dev->num_rx_queues in xps_queue_show
when dev_maps hasn't been allocated yet for backward compati
- Checks can be made before accessing the maps so we know the values
retrieved will make sense.
We also update __netif_set_xps_queue to conditionally copy old maps from
dev_maps in the new one only if the number of traffic classes from both
maps match.
Signed-off-by: Antoine Tenart
--
In net-sysfs, get_netdev_queue_index returns an unsigned int. Some of
its callers use an unsigned long to store the returned value. Update the
code to be consistent, this should only be cosmetic.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 11 +++
1 file changed, 7
Use bitmap_zalloc instead of zalloc_cpumask_var in xps_cpus_show to
align with xps_rxqs_show. This will improve maintenance and allow us to
factorize the two functions. The function should behave the same.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 12 ++--
1 file changed
Add ASSERT_RTNL at the top of __netif_set_xps_queue and add a comment
about holding the rtnl lock before the function.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core
Embed nr_ids (the number of cpu for the xps cpus map, and the number of
rxqs for the xps cpus map) in dev_maps. That will help not accessing out
of bound memory if those values change after dev_maps was allocated.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
include/linux
Make the implementations of xps_cpus_show and xps_rxqs_show to converge,
as the two share the same logic but diverted over time. This should not
modify their behaviour but will help future changes and improve
maintenance.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 33
Remove the xps possible_mask. It was an optimization but we can just
loop from 0 to nr_ids now that it is embedded in the xps dev_maps. That
simplifies the code a bit.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 40
This patch adds an helper, xps_copy_dev_maps, to copy maps from dev_maps
to new_dev_maps at a given index. The logic should be the same, with an
improved code readability and maintenance.
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 45 +
1 file
Improve the readability of the loop removing tx-queue from unused
CPUs/rx-queues in __netif_set_xps_queue. The change should only be
cosmetic.
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/net/core/dev.c b
want this device to be freed while we use it (now that the
rtnl lock isn't protecting it in the whole function).
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/net/core/net-sysfs.c b/ne
.
Suggested-by: Alexander Duyck
Signed-off-by: Antoine Tenart
---
drivers/net/virtio_net.c | 2 +-
include/linux/netdevice.h | 17 +
net/core/dev.c| 73 +--
net/core/net-sysfs.c | 6 ++--
4 files changed, 46 insertions(+), 52 deletions
Most of the xps_cpus_show and xps_rxqs_show functions share the same
logic. Having it in two different functions does not help maintenance.
This patch moves their common logic into a new function, xps_queue_show,
to improve this.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 125
In __netif_set_xps_queue, old map entries from the old dev_maps are
freed but their corresponding entry in the old dev_maps aren't NULLed.
Fix this.
Signed-off-by: Antoine Tenart
---
net/core/dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/dev.c b/net/core/dev.c
1 - 100 of 791 matches
Mail list logo