* [dpdk-dev] [PATCH] test/virtual_pmd: add set MAC address dev op
@ 2018-01-29 14:23 Radu Nicolau
2018-01-31 19:32 ` Ferruh Yigit
2018-02-01 10:48 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
0 siblings, 2 replies; 5+ messages in thread
From: Radu Nicolau @ 2018-01-29 14:23 UTC (permalink / raw)
To: dev; +Cc: thomas, ferruh.yigit, declan.doherty, Radu Nicolau
Needed if used with net/bonding
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
test/test/virtual_pmd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
index 7a7adbb..2b5383a 100644
--- a/test/test/virtual_pmd.c
+++ b/test/test/virtual_pmd.c
@@ -216,6 +216,11 @@ static void
virtual_ethdev_promiscuous_mode_disable(struct rte_eth_dev *dev __rte_unused)
{}
+static void
+virtual_ethdev_mac_address_set(struct rte_eth_dev *dev, struct ether_addr *addr)
+{
+ memcpy(dev->data->mac_addrs, addr, sizeof(struct ether_addr));
+}
static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
.dev_configure = virtual_ethdev_configure_success,
@@ -228,13 +233,13 @@ static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
.rx_queue_release = virtual_ethdev_rx_queue_release,
.tx_queue_release = virtual_ethdev_tx_queue_release,
.link_update = virtual_ethdev_link_update_success,
+ .mac_addr_set = virtual_ethdev_mac_address_set,
.stats_get = virtual_ethdev_stats_get,
.stats_reset = virtual_ethdev_stats_reset,
.promiscuous_enable = virtual_ethdev_promiscuous_mode_enable,
.promiscuous_disable = virtual_ethdev_promiscuous_mode_disable
};
-
void
virtual_ethdev_start_fn_set_success(uint16_t port_id, uint8_t success)
{
--
2.7.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] test/virtual_pmd: add set MAC address dev op
2018-01-29 14:23 [dpdk-dev] [PATCH] test/virtual_pmd: add set MAC address dev op Radu Nicolau
@ 2018-01-31 19:32 ` Ferruh Yigit
2018-02-01 10:48 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
1 sibling, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-01-31 19:32 UTC (permalink / raw)
To: Radu Nicolau, dev; +Cc: thomas, declan.doherty
On 1/29/2018 2:23 PM, Radu Nicolau wrote:
> Needed if used with net/bonding
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> ---
> test/test/virtual_pmd.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
> index 7a7adbb..2b5383a 100644
> --- a/test/test/virtual_pmd.c
> +++ b/test/test/virtual_pmd.c
> @@ -216,6 +216,11 @@ static void
> virtual_ethdev_promiscuous_mode_disable(struct rte_eth_dev *dev __rte_unused)
> {}
>
> +static void
> +virtual_ethdev_mac_address_set(struct rte_eth_dev *dev, struct ether_addr *addr)
> +{
> + memcpy(dev->data->mac_addrs, addr, sizeof(struct ether_addr));
Same comment here, memcpy not required.
> +}
>
> static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
> .dev_configure = virtual_ethdev_configure_success,
> @@ -228,13 +233,13 @@ static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
> .rx_queue_release = virtual_ethdev_rx_queue_release,
> .tx_queue_release = virtual_ethdev_tx_queue_release,
> .link_update = virtual_ethdev_link_update_success,
> + .mac_addr_set = virtual_ethdev_mac_address_set,
> .stats_get = virtual_ethdev_stats_get,
> .stats_reset = virtual_ethdev_stats_reset,
> .promiscuous_enable = virtual_ethdev_promiscuous_mode_enable,
> .promiscuous_disable = virtual_ethdev_promiscuous_mode_disable
> };
>
> -
> void
> virtual_ethdev_start_fn_set_success(uint16_t port_id, uint8_t success)
> {
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] test/virtual_pmd: add set MAC address dev op
2018-01-29 14:23 [dpdk-dev] [PATCH] test/virtual_pmd: add set MAC address dev op Radu Nicolau
2018-01-31 19:32 ` Ferruh Yigit
@ 2018-02-01 10:48 ` Radu Nicolau
2018-02-05 14:59 ` Ferruh Yigit
1 sibling, 1 reply; 5+ messages in thread
From: Radu Nicolau @ 2018-02-01 10:48 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit, declan.doherty, thomas, Radu Nicolau
Needed if used with net/bonding
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
v2: remove redundant memcpy
test/test/virtual_pmd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
index 7a7adbb..2f5b31d 100644
--- a/test/test/virtual_pmd.c
+++ b/test/test/virtual_pmd.c
@@ -216,6 +216,11 @@ static void
virtual_ethdev_promiscuous_mode_disable(struct rte_eth_dev *dev __rte_unused)
{}
+static void
+virtual_ethdev_mac_address_set(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused struct ether_addr *addr)
+{
+}
static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
.dev_configure = virtual_ethdev_configure_success,
@@ -228,13 +233,13 @@ static const struct eth_dev_ops virtual_ethdev_default_dev_ops = {
.rx_queue_release = virtual_ethdev_rx_queue_release,
.tx_queue_release = virtual_ethdev_tx_queue_release,
.link_update = virtual_ethdev_link_update_success,
+ .mac_addr_set = virtual_ethdev_mac_address_set,
.stats_get = virtual_ethdev_stats_get,
.stats_reset = virtual_ethdev_stats_reset,
.promiscuous_enable = virtual_ethdev_promiscuous_mode_enable,
.promiscuous_disable = virtual_ethdev_promiscuous_mode_disable
};
-
void
virtual_ethdev_start_fn_set_success(uint16_t port_id, uint8_t success)
{
--
2.7.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/virtual_pmd: add set MAC address dev op
2018-02-01 10:48 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
@ 2018-02-05 14:59 ` Ferruh Yigit
2018-02-05 15:00 ` Ferruh Yigit
0 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2018-02-05 14:59 UTC (permalink / raw)
To: Radu Nicolau, dev; +Cc: declan.doherty, thomas
On 2/1/2018 10:48 AM, Radu Nicolau wrote:
> Needed if used with net/bonding
>
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/virtual_pmd: add set MAC address dev op
2018-02-05 14:59 ` Ferruh Yigit
@ 2018-02-05 15:00 ` Ferruh Yigit
0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2018-02-05 15:00 UTC (permalink / raw)
To: Radu Nicolau, dev; +Cc: declan.doherty, thomas
On 2/5/2018 2:59 PM, Ferruh Yigit wrote:
> On 2/1/2018 10:48 AM, Radu Nicolau wrote:
>> Needed if used with net/bonding
>>
>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-05 15:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 14:23 [dpdk-dev] [PATCH] test/virtual_pmd: add set MAC address dev op Radu Nicolau
2018-01-31 19:32 ` Ferruh Yigit
2018-02-01 10:48 ` [dpdk-dev] [PATCH v2] " Radu Nicolau
2018-02-05 14:59 ` Ferruh Yigit
2018-02-05 15:00 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).