All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] MAC address fail to be added shouldn't be stored
@ 2017-04-01  8:03 Wei Dai
  2017-04-01  8:03 ` [PATCH 1/2] ethdev: fix adding invalid MAC addr Wei Dai
  2017-04-01  8:03 ` [PATCH 2/2] app/testpmd: add a command to add many MAC addrs Wei Dai
  0 siblings, 2 replies; 6+ messages in thread
From: Wei Dai @ 2017-04-01  8:03 UTC (permalink / raw)
  To: dev, thomas.monjalon, harish.patil, rasesh.mody, stephen.hurd,
	ajit.khaparde, wenzhuo.lu, helin.zhang, konstantin.ananyev,
	jingjing.wu, jing.d.chen, adrien.mazarguil, nelio.laranjeiro,
	bruce.richardson, yuanhan.liu, maxime.coquelin
  Cc: Wei Dai

Current ethdev always stores MAC address even it fails to be added.
Other function may regard the failed MAC address valid and lead to
some errors. So There is a need to check if the addr is added
successfully or not and discard it if it fails.

In 2nd patch, add a command "add_more_mac_addr port_id base_mac_addr count"
to add more than one MAC address one time. It is also for testing this fix.

---
Changes
v2: fix warnings and erros from check-git-log.sh and checkpatch.pl

Wei Dai (2):
  ethdev: fix adding invalid MAC addr
  app/testpmd: add a command to add many MAC addrs

 app/test-pmd/cmdline.c             | 55 ++++++++++++++++++++++++++++++++++++++
 drivers/net/bnx2x/bnx2x_ethdev.c   |  7 +++--
 drivers/net/bnxt/bnxt_ethdev.c     | 12 ++++-----
 drivers/net/e1000/base/e1000_api.c |  2 +-
 drivers/net/e1000/em_ethdev.c      |  6 ++---
 drivers/net/e1000/igb_ethdev.c     |  5 ++--
 drivers/net/enic/enic.h            |  2 +-
 drivers/net/enic/enic_ethdev.c     |  4 +--
 drivers/net/enic/enic_main.c       |  6 ++---
 drivers/net/fm10k/fm10k_ethdev.c   |  3 ++-
 drivers/net/i40e/i40e_ethdev.c     | 11 ++++----
 drivers/net/i40e/i40e_ethdev_vf.c  |  8 +++---
 drivers/net/ixgbe/ixgbe_ethdev.c   | 27 ++++++++++++-------
 drivers/net/mlx4/mlx4.c            | 14 ++++++----
 drivers/net/mlx5/mlx5.h            |  4 +--
 drivers/net/mlx5/mlx5_mac.c        | 12 ++++++---
 drivers/net/qede/qede_ethdev.c     |  3 ++-
 drivers/net/ring/rte_eth_ring.c    |  3 ++-
 drivers/net/virtio/virtio_ethdev.c | 13 ++++-----
 lib/librte_ether/rte_ethdev.c      | 15 ++++++-----
 lib/librte_ether/rte_ethdev.h      |  2 +-
 21 files changed, 149 insertions(+), 65 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/2] mac addr fail to be added shouldn't be storeid
@ 2017-03-31 17:04 Wei Dai
  2017-03-31 17:04 ` [PATCH 1/2] ethdev: fix adding invalid mac addr Wei Dai
  0 siblings, 1 reply; 6+ messages in thread
From: Wei Dai @ 2017-03-31 17:04 UTC (permalink / raw)
  To: dev; +Cc: Wei Dai

current ethdev always store mac addr even it fail to be added.
Other function may regard the failed mac addr valid and lead to
some errors. So it is need to check if the addr is added successfully 
or not. And discard it if it fails.

In 2nd patch, add a command "add_more_mac_addr port_id base_mac_addr count"
to add more than one mac address one time. It is also
for testing this fix.

Wei Dai (2):
  ethdev: fix adding invalid mac addr
  app/testpmd: add a command to add many mac addrs

 app/test-pmd/cmdline.c             | 52 ++++++++++++++++++++++++++++++++++++++
 drivers/net/bnx2x/bnx2x_ethdev.c   |  7 +++--
 drivers/net/bnxt/bnxt_ethdev.c     | 12 ++++-----
 drivers/net/e1000/base/e1000_api.c |  2 +-
 drivers/net/e1000/em_ethdev.c      |  6 ++---
 drivers/net/e1000/igb_ethdev.c     |  5 ++--
 drivers/net/enic/enic.h            |  2 +-
 drivers/net/enic/enic_ethdev.c     |  4 +--
 drivers/net/enic/enic_main.c       |  6 ++---
 drivers/net/fm10k/fm10k_ethdev.c   |  3 ++-
 drivers/net/i40e/i40e_ethdev.c     | 11 ++++----
 drivers/net/i40e/i40e_ethdev_vf.c  |  8 +++---
 drivers/net/ixgbe/ixgbe_ethdev.c   | 26 ++++++++++++-------
 drivers/net/mlx4/mlx4.c            | 14 ++++++----
 drivers/net/mlx5/mlx5.h            |  2 +-
 drivers/net/mlx5/mlx5_mac.c        | 12 ++++++---
 drivers/net/qede/qede_ethdev.c     |  3 ++-
 drivers/net/ring/rte_eth_ring.c    |  3 ++-
 drivers/net/virtio/virtio_ethdev.c | 13 +++++-----
 lib/librte_ether/rte_ethdev.c      | 15 ++++++-----
 lib/librte_ether/rte_ethdev.h      |  2 +-
 21 files changed, 144 insertions(+), 64 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-07  1:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-01  8:03 [PATCH 0/2] MAC address fail to be added shouldn't be stored Wei Dai
2017-04-01  8:03 ` [PATCH 1/2] ethdev: fix adding invalid MAC addr Wei Dai
2017-04-03  9:18   ` Nélio Laranjeiro
2017-04-07  1:38     ` Dai, Wei
2017-04-01  8:03 ` [PATCH 2/2] app/testpmd: add a command to add many MAC addrs Wei Dai
  -- strict thread matches above, loose matches on Subject: below --
2017-03-31 17:04 [PATCH 0/2] mac addr fail to be added shouldn't be storeid Wei Dai
2017-03-31 17:04 ` [PATCH 1/2] ethdev: fix adding invalid mac addr Wei Dai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.