search for: tx_max_coalesced_frames

Displaying 20 results from an estimated 24 matches for "tx_max_coalesced_frames".

2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...t/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -145,6 +145,11 @@ struct virtnet_info { > > /* Budget for polling tx completion */ > u32 tx_work_limit; > + > + __u32 rx_coalesce_usecs; > + __u32 rx_max_coalesced_frames; > + __u32 tx_coalesce_usecs; > + __u32 tx_max_coalesced_frames; > }; > > struct padded_vnet_hdr { > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > channels->other_count = 0; > } > > +static int virtnet_set_coalesce(struct net_device *dev, > + struct ethtool_coalesce *ec) > +{ >...
2015 Feb 10
4
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...t/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -145,6 +145,11 @@ struct virtnet_info { > > /* Budget for polling tx completion */ > u32 tx_work_limit; > + > + __u32 rx_coalesce_usecs; > + __u32 rx_max_coalesced_frames; > + __u32 tx_coalesce_usecs; > + __u32 tx_max_coalesced_frames; > }; > > struct padded_vnet_hdr { > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > channels->other_count = 0; > } > > +static int virtnet_set_coalesce(struct net_device *dev, > + struct ethtool_coalesce *ec) > +{ >...
2018 Sep 13
5
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...return 0; } +static int virtnet_set_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct ethtool_coalesce ec_default = { + .cmd = ETHTOOL_SCOALESCE, + .rx_max_coalesced_frames = 1, + }; + struct virtnet_info *vi = netdev_priv(dev); + int i, napi_weight; + + if (ec->tx_max_coalesced_frames > 1) + return -EINVAL; + + ec_default.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; + napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0; + + /* disallow changes to fields not explicitly tested above */ + if (memcmp(ec, &ec_default, sizeof(ec_default))) + retur...
2018 Sep 13
5
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...return 0; } +static int virtnet_set_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct ethtool_coalesce ec_default = { + .cmd = ETHTOOL_SCOALESCE, + .rx_max_coalesced_frames = 1, + }; + struct virtnet_info *vi = netdev_priv(dev); + int i, napi_weight; + + if (ec->tx_max_coalesced_frames > 1) + return -EINVAL; + + ec_default.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; + napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0; + + /* disallow changes to fields not explicitly tested above */ + if (memcmp(ec, &ec_default, sizeof(ec_default))) + retur...
2015 Feb 09
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...t.c index cc5f5de..2b958fb 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -145,6 +145,11 @@ struct virtnet_info { /* Budget for polling tx completion */ u32 tx_work_limit; + + __u32 rx_coalesce_usecs; + __u32 rx_max_coalesced_frames; + __u32 tx_coalesce_usecs; + __u32 tx_max_coalesced_frames; }; struct padded_vnet_hdr { @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static int virtnet_set_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct virtnet_info *vi = netdev_priv(dev); + struct...
2015 Feb 09
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...t.c index cc5f5de..2b958fb 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -145,6 +145,11 @@ struct virtnet_info { /* Budget for polling tx completion */ u32 tx_work_limit; + + __u32 rx_coalesce_usecs; + __u32 rx_max_coalesced_frames; + __u32 tx_coalesce_usecs; + __u32 tx_max_coalesced_frames; }; struct padded_vnet_hdr { @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, channels->other_count = 0; } +static int virtnet_set_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct virtnet_info *vi = netdev_priv(dev); + struct...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...net.c > > @@ -145,6 +145,11 @@ struct virtnet_info { > > > > /* Budget for polling tx completion */ > > u32 tx_work_limit; > > + > > + __u32 rx_coalesce_usecs; > > + __u32 rx_max_coalesced_frames; > > + __u32 tx_coalesce_usecs; > > + __u32 tx_max_coalesced_frames; > > }; > > > > struct padded_vnet_hdr { > > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > > channels->other_count = 0; > > } > > > > +static int virtnet_set_coalesce(struct net_device *dev, > > +...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...net.c > > @@ -145,6 +145,11 @@ struct virtnet_info { > > > > /* Budget for polling tx completion */ > > u32 tx_work_limit; > > + > > + __u32 rx_coalesce_usecs; > > + __u32 rx_max_coalesced_frames; > > + __u32 tx_coalesce_usecs; > > + __u32 tx_max_coalesced_frames; > > }; > > > > struct padded_vnet_hdr { > > @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct net_device *dev, > > channels->other_count = 0; > > } > > > > +static int virtnet_set_coalesce(struct net_device *dev, > > +...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...net.c >> @@ -145,6 +145,11 @@ struct virtnet_info { >> >> /* Budget for polling tx completion */ >> u32 tx_work_limit; >> + >> + __u32 rx_coalesce_usecs; >> + __u32 rx_max_coalesced_frames; >> + __u32 tx_coalesce_usecs; >> + __u32 tx_max_coalesced_frames; >> }; >> >> struct padded_vnet_hdr { >> @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct >> net_device *dev, >> channels->other_count = 0; >> } >> >> +static int virtnet_set_coalesce(struct net_device *dev, &...
2015 Feb 10
0
[PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support
...net.c >> @@ -145,6 +145,11 @@ struct virtnet_info { >> >> /* Budget for polling tx completion */ >> u32 tx_work_limit; >> + >> + __u32 rx_coalesce_usecs; >> + __u32 rx_max_coalesced_frames; >> + __u32 tx_coalesce_usecs; >> + __u32 tx_max_coalesced_frames; >> }; >> >> struct padded_vnet_hdr { >> @@ -1404,12 +1409,73 @@ static void virtnet_get_channels(struct >> net_device *dev, >> channels->other_count = 0; >> } >> >> +static int virtnet_set_coalesce(struct net_device *dev, &...
2018 Sep 13
0
[PATCH net-next V2] virtio_net: ethtool tx napi configuration
...*ec) > +{ > + struct ethtool_coalesce ec_default = { > + .cmd = ETHTOOL_SCOALESCE, > + .rx_max_coalesced_frames = 1, > + }; > + struct virtnet_info *vi = netdev_priv(dev); > + int i, napi_weight; > + > + if (ec->tx_max_coalesced_frames > 1) > + return -EINVAL; > + > + ec_default.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; > + napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0; > + > + /* disallow changes to fields not explicitly tested above */ &g...
2023 Mar 05
1
[PATCH net] virtio-net: unify notifications coalescing structs
...ct ethtool_coalesce *ec) { struct scatterlist sgs_tx, sgs_rx; - struct virtio_net_ctrl_coal_tx coal_tx; - struct virtio_net_ctrl_coal_rx coal_rx; + struct virtio_net_ctrl_coal coal_params; - coal_tx.tx_usecs = cpu_to_le32(ec->tx_coalesce_usecs); - coal_tx.tx_max_packets = cpu_to_le32(ec->tx_max_coalesced_frames); - sg_init_one(&sgs_tx, &coal_tx, sizeof(coal_tx)); + coal_params.max_usecs = cpu_to_le32(ec->tx_coalesce_usecs); + coal_params.max_packets = cpu_to_le32(ec->tx_max_coalesced_frames); + sg_init_one(&sgs_tx, &coal_params, sizeof(coal_params)); if (!virtnet_send_command(vi,...
2018 Oct 09
2
[PATCH net-next V3] virtio_net: ethtool tx napi configuration
...t_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct ethtool_coalesce ec_default = { + .cmd = ETHTOOL_SCOALESCE, + .rx_max_coalesced_frames = 1, + }; + struct virtnet_info *vi = netdev_priv(dev); + int i, napi_weight; + bool running = netif_running(dev); + + if (ec->tx_max_coalesced_frames > 1) + return -EINVAL; + + ec_default.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; + napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0; + + /* disallow changes to fields not explicitly tested above */ + if (memcmp(ec, &ec_default, sizeof(ec_default))) + retur...
2018 Oct 09
2
[PATCH net-next V3] virtio_net: ethtool tx napi configuration
...t_coalesce(struct net_device *dev, + struct ethtool_coalesce *ec) +{ + struct ethtool_coalesce ec_default = { + .cmd = ETHTOOL_SCOALESCE, + .rx_max_coalesced_frames = 1, + }; + struct virtnet_info *vi = netdev_priv(dev); + int i, napi_weight; + bool running = netif_running(dev); + + if (ec->tx_max_coalesced_frames > 1) + return -EINVAL; + + ec_default.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; + napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0; + + /* disallow changes to fields not explicitly tested above */ + if (memcmp(ec, &ec_default, sizeof(ec_default))) + retur...
2015 Feb 09
10
[PATCH RFC v5 net-next 0/6] enable tx interrupts for virtio-net
Hi: This is a new version of trying to enable tx interrupts for virtio-net. We used to try to avoid tx interrupts and orphan packets before transmission for virtio-net. This breaks socket accounting and can lead serveral other side effects e.g: - Several other functions which depends on socket accounting can not work correctly (e.g TCP Small Queue) - No tx completion which make BQL or
2015 Feb 09
10
[PATCH RFC v5 net-next 0/6] enable tx interrupts for virtio-net
Hi: This is a new version of trying to enable tx interrupts for virtio-net. We used to try to avoid tx interrupts and orphan packets before transmission for virtio-net. This breaks socket accounting and can lead serveral other side effects e.g: - Several other functions which depends on socket accounting can not work correctly (e.g TCP Small Queue) - No tx completion which make BQL or
2023 Jun 06
0
[PATCH net] virtio_net: use control_buf for coalesce params
...struct ethtool_coalesce *ec) > { > struct scatterlist sgs_tx, sgs_rx; > - struct virtio_net_ctrl_coal_tx coal_tx; > - struct virtio_net_ctrl_coal_rx coal_rx; > > - coal_tx.tx_usecs = cpu_to_le32(ec->tx_coalesce_usecs); > - coal_tx.tx_max_packets = cpu_to_le32(ec->tx_max_coalesced_frames); > - sg_init_one(&sgs_tx, &coal_tx, sizeof(coal_tx)); > + vi->ctrl->coal_tx.tx_usecs = cpu_to_le32(ec->tx_coalesce_usecs); > + vi->ctrl->coal_tx.tx_max_packets = cpu_to_le32(ec->tx_max_coalesced_frames); > + sg_init_one(&sgs_tx, &vi->ctrl->coal_t...
2023 Mar 06
1
[PATCH net] virtio-net: unify notifications coalescing structs
...gs_rx; > - struct virtio_net_ctrl_coal_tx coal_tx; > - struct virtio_net_ctrl_coal_rx coal_rx; > + struct virtio_net_ctrl_coal coal_params; > > - coal_tx.tx_usecs = cpu_to_le32(ec->tx_coalesce_usecs); > - coal_tx.tx_max_packets = cpu_to_le32(ec->tx_max_coalesced_frames); > - sg_init_one(&sgs_tx, &coal_tx, sizeof(coal_tx)); > + coal_params.max_usecs = cpu_to_le32(ec->tx_coalesce_usecs); > + coal_params.max_packets = cpu_to_le32(ec->tx_max_coalesced_frames); > + sg_init_one(&sgs_tx, &coal_params, sizeof(coal...
2023 Jul 27
2
[PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command
...struct netlink_ext_ack *extack) > { > struct virtnet_info *vi = netdev_priv(dev); > - int ret, i, napi_weight; > + int ret, queue_number, napi_weight; > bool update_napi = false; > > /* Can't change NAPI weight if the link is up */ > napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_WEIGHT : 0; > - if (napi_weight ^ vi->sq[0].napi.weight) { > - if (dev->flags & IFF_UP) > - return -EBUSY; > - else > - update_napi = true; > + for (queue_number = 0; queue_number < vi->max_queue_pairs; queue_number++) { > + ret = virtnet_shou...
2015 May 25
8
[RFC V7 PATCH 0/7] enable tx interrupts for virtio-net
Hi: This is a new version of trying to enable tx interrupts for virtio-net. We used to try to avoid tx interrupts and orphan packets before transmission for virtio-net. This breaks socket accounting and can lead serveral other side effects e.g: - Several other functions which depends on socket accounting can not work correctly (e.g TCP Small Queue) - No tx completion which make BQL or packet