t;)
Tested-by: Eelco Chaudron
Reviewed-by: Eelco Chaudron
Signed-off-by: Antoine Tenart
---
drivers/net/vxlan.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 666dd201c3d5..53dbc67e8a34 100644
--- a/drivers/net/v
t;)
Tested-by: Eelco Chaudron
Reviewed-by: Eelco Chaudron
Signed-off-by: Antoine Tenart
---
drivers/net/geneve.c | 24
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 4ac0373326ef..d5b1e48e0c09 100644
--- a/driver
s was tested manually with OVS and I ran the PTMU selftests with
kmemleak enabled (all OK, none was skipped).
Thanks!
Antoine
Antoine Tenart (2):
vxlan: do not modify the shared tunnel info when PMTU triggers an ICMP
reply
geneve: do not modify the shared tunnel info when PMTU trigge
Quoting Matthew Wilcox (2021-03-22 18:44:21)
> On Mon, Mar 22, 2021 at 06:41:30PM +0100, Antoine Tenart wrote:
> > Quoting Matthew Wilcox (2021-03-22 17:54:39)
> > > - rcu_read_lock();
> > > - dev_maps = rcu_dereference(dev->xps_maps[type]);
> >
Quoting Antoine Tenart (2021-03-22 18:41:30)
> Quoting Matthew Wilcox (2021-03-22 17:54:39)
> > On Mon, Mar 22, 2021 at 04:43:29PM +0100, Antoine Tenart wrote:
> > > xps_queue_show is mostly made of an RCU read-side critical section and
> > > calls bitmap_zalloc with GFP
Quoting Matthew Wilcox (2021-03-22 17:54:39)
> On Mon, Mar 22, 2021 at 04:43:29PM +0100, Antoine Tenart wrote:
> > xps_queue_show is mostly made of an RCU read-side critical section and
> > calls bitmap_zalloc with GFP_KERNEL in the middle of it. That is not
> > allowed as th
Fixes: 5478fcd0f483 ("net: embed nr_ids in the xps maps")
Reported-by: kernel test robot
Suggested-by: Matthew Wilcox
Signed-off-by: Antoine Tenart
---
Fix sent to net-next as it fixes an issue only in net-next.
net/core/net-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -
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
that happens, a map can be freed while its corresponding entry in
the old dev_maps table isn't NULLed, leading to: "BUG: KASAN:
use-after-free" in different places.
This fixes the map freeing logic for unused CPUs/rx-queues, to also NULL
the map entries from the old dev_maps table.
Si
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
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
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
- 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
se 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
compatibility.:w
Antoine Tenart (13):
net-sysfs: convert xps_cpus_show to bitmap_zalloc
net-sysf
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
.
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
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
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
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
Quoting Saeed Mahameed (2021-03-12 21:54:18)
> On Fri, 2021-03-12 at 16:04 +0100, Antoine Tenart wrote:
> > netif_set_xps_queue must be called with the rtnl lock taken, and this
> > is
> > now enforced using ASSERT_RTNL(). mlx5e_attach_netdev was taking the
> > lock
Quoting Maxim Mikityanskiy (2021-03-15 15:53:02)
> On 2021-03-15 10:38, Antoine Tenart wrote:
> > Quoting Saeed Mahameed (2021-03-12 21:54:18)
> >> There is a reason why it is conditional:
> >> we had a bug in the past of double locking here:
> >>
> >>
Quoting Saeed Mahameed (2021-03-12 21:54:18)
> On Fri, 2021-03-12 at 16:04 +0100, Antoine Tenart wrote:
> > netif_set_xps_queue must be called with the rtnl lock taken, and this
> > is
> > now enforced using ASSERT_RTNL(). mlx5e_attach_netdev was taking the
> > lock
netif_set_xps_queue must be called with the rtnl lock taken, and this is
now enforced using ASSERT_RTNL(). mlx5e_attach_netdev was taking the
lock conditionally, fix this by taking the rtnl lock all the time.
Signed-off-by: Antoine Tenart
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
e the rtnl lock when calling virtnet_set_affinity when the rtnl lock
isn't taken already.
Signed-off-by: Antoine Tenart
---
drivers/net/virtio_net.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index dde9bbcc5ff0..54d2277f6c98 10
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
ned-off-by: Antoine Tenart
---
net/core/dev.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 052797ca65f6..748e377c7fe3 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2460,7 +2460,7 @@ static DEFINE_MUTEX(xps
.
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
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
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
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
- 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
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
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
Quoting Antoine Tenart (2021-02-09 10:12:11)
>
> As the sb_dev pointer is protected by the rtnl lock, we'll have to keep
> the lock. I'll move that patch at the end of the series (it'll be easier
> to add the get_device/put_device logic with the xps_queue_show
Quoting Alexander Duyck (2021-02-08 23:20:58)
> On Mon, Feb 8, 2021 at 9:19 AM Antoine Tenart wrote:
> > @@ -1328,17 +1328,12 @@ static ssize_t xps_cpus_show(struct netdev_queue
> > *queue,
> >
> > index = get_netdev_queue_index(queue);
> &
Quoting Alexander Duyck (2021-02-08 22:43:39)
> On Mon, Feb 8, 2021 at 9:19 AM Antoine Tenart wrote:
> >
> > -static void clean_xps_maps(struct net_device *dev, const unsigned long
> > *mask,
> > +static void clean_xps_maps(struct net_device *dev,
> >
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 | 98
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
- 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
--
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
.
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
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
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_cpus_show and
xps_rxqs_show functions with the rtnl lock.
Signed-off-by: Antoine Tenart
---
net/core/net-sysfs.c | 26 --
1 file changed, 4
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
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
r_cpu_ids/dev->num_rx_queues in xps_queue_show
when dev_maps hasn't been allocated yet for backward compatibility.
Antoine Tenart (12):
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: make
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
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
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
,
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
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
- 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
--
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
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-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
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-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-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
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
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
_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,
_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
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/
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
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
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
> > >
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
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
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
. 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 -
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
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
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
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
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
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
("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
1 - 100 of 791 matches
Mail list logo