From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Neale Ranns
Sent: Saturday, April 17, 2021 8:57 AM
To: hem...@mnkcg.com; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] dst mac-address look up?

 

 

 

From: hem...@mnkcg.com <mailto:hem...@mnkcg.com>  <hem...@mnkcg.com
<mailto:hem...@mnkcg.com> >
Date: Friday, 16 April 2021 at 21:07
To: Neale Ranns <ne...@graphiant.com <mailto:ne...@graphiant.com> >,
vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  <vpp-dev@lists.fd.io
<mailto:vpp-dev@lists.fd.io> >
Subject: RE: [vpp-dev] dst mac-address look up?

this is the definition of changing the semantics; there was an API that
returned the mac address of the ip_neighbor object passed, now it uses the
neighbor object passed as a key to find another neighbour object and return
that address. Clients that use that API would be in for a shock.

 

<hs>  I don't see anything shocking.  The ip-neighbor passed in has only the
key setup to find any entry. A new API could just pass in a key to lookup an
entry and then ip_neighbor_get_mac() is used to get the mac-address.

 

My goal is simple:  I have an IP/IP6 address and sw_index for use to find an
entry in ARP/ND cache.  On finding the entry, the mac-address of the entry
is returned.  This way if I know IP and egress interface for next-hop, I get
the mac-address for next-hop to forward a packet.

 

Then you're also missing the source mac and the vlan tags. 

 

<hs> No.  Routing has already found the egress interface and thus interface
link-type (vlan, mpls, native)  and mac rewrite string is known.

 

Retrieving these from the local interface and finding the ip-neighbor
per-packet in the data-path is a considerable cost - the information is
distributed across various memory locations, stored in tables that are not
optimised. You should instead build in the control plane an
address+interface lookup table and link the result to the appropriate
adjacency. 

 

<hs> Agree on control-plane.  ARP/ND are protocols with interface scope and
routing found the egress interface.   I just need to find the ARP/ND entry
on the interface  Further, I am using device-input and interface-output for
a plugin -  it is simpler for me to lookup ARP/ND table and not bother with
any adjacency and ARP/ND link.

 

Hemant

 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19238): https://lists.fd.io/g/vpp-dev/message/19238
Mute This Topic: https://lists.fd.io/mt/82127329/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to