DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"John Daley (johndale)" <johndale@cisco.com>
Subject: RE: [PATCH v2 3/3] net/enic: allow multicast in MAC address add callback
Date: Fri, 9 Aug 2024 06:49:20 +0000	[thread overview]
Message-ID: <SJ0PR11MB58674F3391E2D6C84687C0B2BFBA2@SJ0PR11MB5867.namprd11.prod.outlook.com> (raw)
In-Reply-To: <31184b17-5abd-4ac0-9266-b98bf1e42419@amd.com>



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@amd.com>
> Sent: Thursday, August 8, 2024 5:51 PM
> To: Hyong Youb Kim (hyonkim) <hyonkim@cisco.com>
> Cc: dev@dpdk.org; John Daley (johndale) <johndale@cisco.com>
> Subject: Re: [PATCH v2 3/3] net/enic: allow multicast in MAC address add
> callback
> 
> On 8/8/2024 7:14 AM, Hyong Youb Kim wrote:
> > enic_set_mac_address() (mac_addr_add callback) currently allows only
> > non-zero, unicast address to be added. It is overly restrictive.
> > rte_eth_dev_mac_addr_add() itself allows multicast addresses. And,
> > some applications do use rte_eth_dev_mac_addr_add() to accept
> > multicast addresses. So, remove the unicast check in
> > enic_set_mac_address().
> >
> 
> What is the usecase to set Multicast MAC address as device default MAC
> address?
> 
> Also, just a reminder that we have 'rte_eth_dev_set_mc_addr_list()' API
> to set multicast MAC addresses.

I am aware of mc_addr_list().. Some people seem to use mac_addr_add()
as 'add a MAC filter'.

For the VIC adapter, there is no difference between the default MAC and
other MAC addresses added to allow/accept. They are all MAC filters in HW. 
I believe some other NICs also do not distinguish 'default' vs. additional
allowed MAC addresses (can be unicast or multicast).

The app in question is VPP. There might be others. It uses
rte_eth_dev_mac_addr_add() to add multicast MAC filters like all-hosts
address. I am not defending such usage. But given that (1)
rte_eth_dev_mac_addr_add() accepts multicast, and (2) adding
multicast works fine on multiple NICs, such usage is probably acceptable.

I am guessing some app developers find it easier to use mac_addr_add()
than mc_addr_list()..

We could tighten the semantics of rte_eth_dev_mac_addr_add() and
check if the given MAC is a valid unicast address in that API function.

Thanks.
-Hyong


  reply	other threads:[~2024-08-09  6:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  4:18 [PATCH 0/3] net/enic: support VF and fix minor issues Hyong Youb Kim
2024-08-08  4:18 ` [PATCH 1/3] net/enic: support SR-IOV VF using admin channel Hyong Youb Kim
2024-08-08  4:18 ` [PATCH 2/3] net/enic: add speed capabilities for newer models Hyong Youb Kim
2024-08-08  4:18 ` [PATCH 3/3] net/enic: allow multicast in MAC address add callback Hyong Youb Kim
2024-08-08  6:14   ` [PATCH v2 0/3] net/enic: support VF and fix minor issues Hyong Youb Kim
2024-08-08  6:14     ` [PATCH v2 1/3] net/enic: support SR-IOV VF using admin channel Hyong Youb Kim
2024-08-08  8:50       ` Ferruh Yigit
2024-08-09  6:27         ` Hyong Youb Kim (hyonkim)
2024-08-08  6:14     ` [PATCH v2 2/3] net/enic: add speed capabilities for newer models Hyong Youb Kim
2024-08-08  8:50       ` Ferruh Yigit
2024-08-09  6:28         ` Hyong Youb Kim (hyonkim)
2024-08-08  6:14     ` [PATCH v2 3/3] net/enic: allow multicast in MAC address add callback Hyong Youb Kim
2024-08-08  8:50       ` Ferruh Yigit
2024-08-09  6:49         ` Hyong Youb Kim (hyonkim) [this message]
2024-08-09  7:07     ` [PATCH v3 0/3] net/enic: support VF and fix minor issues Hyong Youb Kim
2024-08-09  7:07       ` [PATCH v3 1/3] net/enic: support SR-IOV VF using admin channel Hyong Youb Kim
2024-08-09  7:07       ` [PATCH v3 2/3] net/enic: add speed capabilities for newer models Hyong Youb Kim
2024-08-09  7:07       ` [PATCH v3 3/3] net/enic: allow multicast in MAC address add callback Hyong Youb Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR11MB58674F3391E2D6C84687C0B2BFBA2@SJ0PR11MB5867.namprd11.prod.outlook.com \
    --to=hyonkim@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=johndale@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).