search for: declare_ewma

Displaying 20 results from an estimated 36 matches for "declare_ewma".

2017 Feb 15
1
[PATCH] average: change to declare precision, not factor
From: Johannes Berg <johannes.berg at intel.com> Declaring the factor is counter-intuitive, and people are prone to using small(-ish) values even when that makes no sense. Change the DECLARE_EWMA() macro to take the fractional precision, in bits, rather than a factor, and update all users. While at it, add some more documentation. Signed-off-by: Johannes Berg <johannes.berg at intel.com> --- Unless I hear any objections, I will take this through my tree. --- drivers/net/virtio_net....
2017 Feb 15
1
[PATCH] average: change to declare precision, not factor
From: Johannes Berg <johannes.berg at intel.com> Declaring the factor is counter-intuitive, and people are prone to using small(-ish) values even when that makes no sense. Change the DECLARE_EWMA() macro to take the fractional precision, in bits, rather than a factor, and update all users. While at it, add some more documentation. Signed-off-by: Johannes Berg <johannes.berg at intel.com> --- Unless I hear any objections, I will take this through my tree. --- drivers/net/virtio_net....
2015 Aug 19
0
[PATCH 1/4] virtio_net: use DECLARE_EWMA
Sorry, forgot to Cc Michael and the virt list - patch reproduced below in full. johannes >From 22500fbcf722748fe3471b2e4c6156db47aade15 Mon Sep 17 00:00:00 2001 From: Johannes Berg <johannes.berg at intel.com> Date: Wed, 19 Aug 2015 09:25:18 +0200 Subject: [PATCH] virtio_net: use DECLARE_EWMA Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA() to create static inlines. On x86/64 this results in no change in code size for me, but reduces the struct receive_queue size by the two unsigned long values that store the parameters. Signed-off-by: Johannes Berg <johannes.b...
2015 Aug 19
0
[PATCH 1/4] virtio_net: use DECLARE_EWMA
Sorry, forgot to Cc Michael and the virt list - patch reproduced below in full. johannes >From 22500fbcf722748fe3471b2e4c6156db47aade15 Mon Sep 17 00:00:00 2001 From: Johannes Berg <johannes.berg at intel.com> Date: Wed, 19 Aug 2015 09:25:18 +0200 Subject: [PATCH] virtio_net: use DECLARE_EWMA Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA() to create static inlines. On x86/64 this results in no change in code size for me, but reduces the struct receive_queue size by the two unsigned long values that store the parameters. Signed-off-by: Johannes Berg <johannes.b...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...l S. Tsirkin wrote: > I'll need to look at this more, in particular the feature > bit is missing here. For now one question: > > On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: >> @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); >> */ >> DECLARE_EWMA(pkt_len, 0, 64) >> >> +#define VF_TAKEOVER_INT (HZ / 10) >> + >> #define VIRTNET_DRIVER_VERSION "1.0.0" >> >> static const unsigned long guest_offloads[] = { > Why is this delay necessary? And why by 100ms? This is based on netvsc implemen...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...l S. Tsirkin wrote: > I'll need to look at this more, in particular the feature > bit is missing here. For now one question: > > On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: >> @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); >> */ >> DECLARE_EWMA(pkt_len, 0, 64) >> >> +#define VF_TAKEOVER_INT (HZ / 10) >> + >> #define VIRTNET_DRIVER_VERSION "1.0.0" >> >> static const unsigned long guest_offloads[] = { > Why is this delay necessary? And why by 100ms? This is based on netvsc implemen...
2017 Dec 19
1
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...n particular the feature > > > bit is missing here. For now one question: > > > > > > On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: > > >> @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); > > >> */ > > >> DECLARE_EWMA(pkt_len, 0, 64) > > >> > > >> +#define VF_TAKEOVER_INT (HZ / 10) > > >> + > > >> #define VIRTNET_DRIVER_VERSION "1.0.0" > > >> > > >> static const unsigned long guest_offloads[] = { > > > Why is t...
2017 Dec 19
1
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...n particular the feature > > > bit is missing here. For now one question: > > > > > > On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: > > >> @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); > > >> */ > > >> DECLARE_EWMA(pkt_len, 0, 64) > > >> > > >> +#define VF_TAKEOVER_INT (HZ / 10) > > >> + > > >> #define VIRTNET_DRIVER_VERSION "1.0.0" > > >> > > >> static const unsigned long guest_offloads[] = { > > > Why is t...
2018 Sep 13
5
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...s/net/virtio_net.c | 64 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 765920905226..6e70864f5899 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -66,6 +66,8 @@ DECLARE_EWMA(pkt_len, 0, 64) #define VIRTNET_DRIVER_VERSION "1.0.0" +static const u32 ethtool_coalesce_napi_mask = (1UL << 10); + static const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, @@ -1444,7 +1446,10 @@ static int virtnet_poll_tx(struct n...
2018 Sep 13
5
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...s/net/virtio_net.c | 64 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 765920905226..6e70864f5899 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -66,6 +66,8 @@ DECLARE_EWMA(pkt_len, 0, 64) #define VIRTNET_DRIVER_VERSION "1.0.0" +static const u32 ethtool_coalesce_napi_mask = (1UL << 10); + static const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, @@ -1444,7 +1446,10 @@ static int virtnet_poll_tx(struct n...
2020 May 06
4
performance bug in virtio net xdp
So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen to have before we attach XDP, will mostly stay around. The fix is probably to update ewma unconditionally. -- MST
2020 May 06
4
performance bug in virtio net xdp
So for mergeable bufs, we use ewma machinery to guess the correct buffer size. If we don't guess correctly, XDP has to do aggressive copies. Problem is, xdp paths do not update the ewma at all, except sometimes with XDP_PASS. So whatever we happen to have before we attach XDP, will mostly stay around. The fix is probably to update ewma unconditionally. -- MST
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+++++++++++++++++++++++++++++++++---- > 1 file changed, 65 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index e732bd6..d970c2d 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -57,6 +57,11 @@ DECLARE_EWMA(pkt_len, 0, 64) > > #define VIRTNET_DRIVER_VERSION "1.0.0" > > +const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, > + VIRTIO_NET_F_GUEST_TSO6, > + VIRTIO_NET_F_GUEST_ECN, > + VIRTIO_NET_F_GUEST_UFO }; > + > struct virtnet_sta...
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+++++++++++++++++++++++++++++++++---- > 1 file changed, 65 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index e732bd6..d970c2d 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -57,6 +57,11 @@ DECLARE_EWMA(pkt_len, 0, 64) > > #define VIRTNET_DRIVER_VERSION "1.0.0" > > +const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, > + VIRTIO_NET_F_GUEST_TSO6, > + VIRTIO_NET_F_GUEST_ECN, > + VIRTIO_NET_F_GUEST_UFO }; > + > struct virtnet_sta...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+++++++++++++++++++++++++++++++++---- > 1 file changed, 65 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index b3fc01d..5fbd15e 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -57,6 +57,11 @@ DECLARE_EWMA(pkt_len, 0, 64) > > #define VIRTNET_DRIVER_VERSION "1.0.0" > > +const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, > + VIRTIO_NET_F_GUEST_TSO6, > + VIRTIO_NET_F_GUEST_ECN, > + VIRTIO_NET_F_GUEST_UFO }; > + > struct virtnet_sta...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...+++++++++++++++++++++++++++++++++---- > 1 file changed, 65 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index b3fc01d..5fbd15e 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -57,6 +57,11 @@ DECLARE_EWMA(pkt_len, 0, 64) > > #define VIRTNET_DRIVER_VERSION "1.0.0" > > +const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4, > + VIRTIO_NET_F_GUEST_TSO6, > + VIRTIO_NET_F_GUEST_ECN, > + VIRTIO_NET_F_GUEST_UFO }; > + > struct virtnet_sta...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...lt;linux/average.h> #include <linux/filter.h> #include <net/route.h> +#include <linux/netdevice.h> +#include <linux/netpoll.h> static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); */ DECLARE_EWMA(pkt_len, 0, 64) +#define VF_TAKEOVER_INT (HZ / 10) + #define VIRTNET_DRIVER_VERSION "1.0.0" static const unsigned long guest_offloads[] = { @@ -117,6 +121,15 @@ struct receive_queue { char name[40]; }; +struct virtnet_vf_pcpu_stats { + u64 rx_packets; + u64 rx_bytes; + u64 tx_p...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...lt;linux/average.h> #include <linux/filter.h> #include <net/route.h> +#include <linux/netdevice.h> +#include <linux/netpoll.h> static int napi_weight = NAPI_POLL_WEIGHT; module_param(napi_weight, int, 0444); @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); */ DECLARE_EWMA(pkt_len, 0, 64) +#define VF_TAKEOVER_INT (HZ / 10) + #define VIRTNET_DRIVER_VERSION "1.0.0" static const unsigned long guest_offloads[] = { @@ -117,6 +121,15 @@ struct receive_queue { char name[40]; }; +struct virtnet_vf_pcpu_stats { + u64 rx_packets; + u64 rx_bytes; + u64 tx_p...
2017 Mar 29
0
[PATCH 6/6] virtio_net: reduce alignment for buffers
.../net/virtio_net.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 94f94f3..824dd95 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -53,17 +53,6 @@ module_param(gso, bool, 0444); */ DECLARE_EWMA(pkt_len, 0, 64) -/* With mergeable buffers we align buffer address and use the low bits to - * encode its true size. Buffer size is up to 1 page so we need to align to - * square root of page size to ensure we reserve enough bits to encode the true - * size. - */ -#define MERGEABLE_BUFFER_MIN_ALI...
2017 Dec 19
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
I'll need to look at this more, in particular the feature bit is missing here. For now one question: On Mon, Dec 18, 2017 at 04:40:36PM -0800, Sridhar Samudrala wrote: > @@ -56,6 +58,8 @@ module_param(napi_tx, bool, 0644); > */ > DECLARE_EWMA(pkt_len, 0, 64) > > +#define VF_TAKEOVER_INT (HZ / 10) > + > #define VIRTNET_DRIVER_VERSION "1.0.0" > > static const unsigned long guest_offloads[] = { Why is this delay necessary? And why by 100ms?