Fill speed_capa for virtio
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Fill speed_capa for virtio
From: Ido Barnea <[email protected]>
--- drivers/net/virtio/virtio_ethdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/virtio/virtio_ethdev.c +1 -0
@@ -1869,6 +1869,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) (1ULL <<VIRTIO_NET_F_HOST_TSO6 );if ((hw->guest_features & tso_mask) == tso_mask) dev_info->tx_offload_capa |=DEV_TX_OFFLOAD_TCP_TSO ; + dev_info->speed_capa =ETH_LINK_SPEED_10G ; }/*
Signature · 1 line
2.8.3
2017-02-02 12:05, Ido Barnea:
Quoted 12 lines
From: Ido Barnea <[email protected]>
Signed-off-by Ido Barnea <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 1 + 1 file changed, 1 insertion(+)drivers/net/virtio/virtio_ethdev.c +0
-0
drivers/net/virtio/virtio_ethdev.c virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) · line 1872
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +1
-0@@ -1869,6 +1869,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) (1ULL <<VIRTIO_NET_F_HOST_TSO6 );if ((hw->guest_features & tso_mask) == tso_mask) dev_info->tx_offload_capa |=DEV_TX_OFFLOAD_TCP_TSO ; + dev_info->speed_capa =ETH_LINK_SPEED_10G ;
Why 10G ?
Yuanhan, any opinion?
Just wanted this to be consistent with below (From virtio_dev_link_update):
link.link_speed = SPEED_10G;
Need to put some value in speed_capa.
Ido
Quoted 20 lines · Thomas Monjalon
2017-02-02 12:05, Ido Barnea:
Quoted 12 lines
From: Ido Barnea <[email protected]>
Signed-off-by Ido Barnea <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 1 + 1 file changed, 1 insertion(+)drivers/net/virtio/virtio_ethdev.c +0
-0drivers/net/virtio/virtio_ethdev.c virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) · line 1872
Quoted 4 lines
drivers/net/virtio/virtio_ethdev.c +1
-0@@ -1869,6 +1869,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) (1ULL <<VIRTIO_NET_F_HOST_TSO6 );if ((hw->guest_features & tso_mask) == tso_mask) dev_info->tx_offload_capa |=DEV_TX_OFFLOAD_TCP_TSO ; + dev_info->speed_capa =ETH_LINK_SPEED_10G ;Why 10G ?
Yuanhan, any opinion?
2017-02-10 07:49, Ido Barnea:
Quoted 22 lines · Thomas Monjalon
Quoted 8 lines
2017-02-02 12:05, Ido Barnea:
Quoted 7 lines
From: Ido Barnea <[email protected]>
Signed-off-by Ido Barnea <[email protected]>--- drivers/net/virtio/virtio_ethdev.c | 1 + 1 file changed, 1 insertion(+)Quoted 12 lines
drivers/net/virtio/virtio_ethdev.c virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) · line 1872
Quoted 9 lines
drivers/net/virtio/virtio_ethdev.c +1
-0@@ -1869,6 +1869,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) (1ULL <<VIRTIO_NET_F_HOST_TSO6 );if ((hw->guest_features & tso_mask) == tso_mask) dev_info->tx_offload_capa |=DEV_TX_OFFLOAD_TCP_TSO ; + dev_info->speed_capa =ETH_LINK_SPEED_10G ;Why 10G ?
Yuanhan, any opinion?
Quoted 2 lines
Just wanted this to be consistent with below (From
virtio_dev_link_update):
link.link_speed =SPEED_10G;
OK, that's the kind of justification which are good to have in the commit message.
PATCH v2 1/1 net/virtio: add speed capability
From: Ido Barnea <[email protected]>
The chosen fake capability (10G) is consistent with the reported link speed in virtio_dev_link_update():
link.link_speed = SPEED_10G;
The feature is not marked in doc/guides/nics/features/virtio.ini as it is only a fake value.
--- drivers/net/virtio/virtio_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/virtio/virtio_ethdev.c +2 -0
@@ -1835,6 +1835,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)uint64_t tso_mask, host_features;struct virtio_hw *hw = dev->data->dev_private; + dev_info->speed_capa =ETH_LINK_SPEED_10G ;/* fake value */ + dev_info->pci_dev = dev->device ?RTE_DEV_TO_PCI (dev->device) :NULL ; dev_info->max_rx_queues =RTE_MIN (hw->max_queue_pairs,VIRTIO_MAX_RX_QUEUES );
Signature · 1 line
2.7.0
Thomas Monjalon
AppliedRe: [PATCH v2] net/virtio: add speed capability
2017-02-10 12:05, Thomas Monjalon:
Quoted 4 lines
From: Ido Barnea <[email protected]>
The chosen fake capability (10G) is consistent with the reported link speed in
virtio_dev_link_update():
Quoted 8 lines
link.link_speed = SPEED_10G;The feature is not marked in doc/guides/nics/features/virtio.ini as it is only a fake value.
Signed-off-by Ido Barnea <[email protected]>[Thomas: comments added]Acked-by Thomas Monjalon <[email protected]>
Applied, thanks