DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: implement header_ops parse method
@ 2018-09-27  0:02 Igor Ryzhov
  2018-09-29  7:21 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Igor Ryzhov @ 2018-09-27  0:02 UTC (permalink / raw)
  To: dev

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
---
 kernel/linux/kni/kni_net.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 7fcfa106c..128a5477c 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct net_device *dev,
 	return dev->hard_header_len;
 }
 
+/*
+ *  Extract hardware address from packet
+ */
+static int
+kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
+{
+	const struct ethhdr *eth = eth_hdr(skb);
+
+	memcpy(haddr, eth->h_source, ETH_ALEN);
+
+	return ETH_ALEN;
+}
+
 /*
  * Re-fill the eth header
  */
@@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device *dev, bool new_carrier)
 
 static const struct header_ops kni_net_header_ops = {
 	.create  = kni_net_header,
+	.parse   = kni_net_header_parse,
 #ifdef HAVE_REBUILD_HEADER
 	.rebuild = kni_net_rebuild_header,
 #endif /* < 4.1.0  */
-- 
2.19.0

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2018-09-27  0:02 [dpdk-dev] [PATCH] kni: implement header_ops parse method Igor Ryzhov
@ 2018-09-29  7:21 ` Stephen Hemminger
  2018-09-29 19:19   ` Igor Ryzhov
  2018-10-02 16:58 ` Ferruh Yigit
  2019-04-10 10:30 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
  2 siblings, 1 reply; 31+ messages in thread
From: Stephen Hemminger @ 2018-09-29  7:21 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev

On Thu, 27 Sep 2018 03:02:24 +0300
Igor Ryzhov <iryzhov@nfware.com> wrote:

> +/*
> + *  Extract hardware address from packet
> + */
> +static int
> +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
> +{
> +	const struct ethhdr *eth = eth_hdr(skb);
> +
> +	memcpy(haddr, eth->h_source, ETH_ALEN);
> +
> +	return ETH_ALEN;
> +}

Kernel has function ether_addr_copy which is marginally faster and
commonly used.

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2018-09-29  7:21 ` Stephen Hemminger
@ 2018-09-29 19:19   ` Igor Ryzhov
  2018-09-30  8:22     ` Igor Ryzhov
  0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2018-09-29 19:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

It's just exact copy of eth_header_parse function from Linux kernel.

No problem, can do that with ether_addr_copy.

On Sat, Sep 29, 2018 at 10:22 AM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> On Thu, 27 Sep 2018 03:02:24 +0300
> Igor Ryzhov <iryzhov@nfware.com> wrote:
>
> > +/*
> > + *  Extract hardware address from packet
> > + */
> > +static int
> > +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
> > +{
> > +     const struct ethhdr *eth = eth_hdr(skb);
> > +
> > +     memcpy(haddr, eth->h_source, ETH_ALEN);
> > +
> > +     return ETH_ALEN;
> > +}
>
> Kernel has function ether_addr_copy which is marginally faster and
> commonly used.
>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2018-09-29 19:19   ` Igor Ryzhov
@ 2018-09-30  8:22     ` Igor Ryzhov
  0 siblings, 0 replies; 31+ messages in thread
From: Igor Ryzhov @ 2018-09-30  8:22 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

Hello Stephen,

I looked at KNI code again, memcpy is already used everywhere
(kni_net_header, kni_net_rebuild_header) for MAC address copy.
So I propose to accept the patch as it is.

memcpy can be replaced by ether_addr_copy in all functions at once in
separate patch.

Igor

On Sat, Sep 29, 2018 at 10:19 PM Igor Ryzhov <iryzhov@nfware.com> wrote:

> It's just exact copy of eth_header_parse function from Linux kernel.
>
> No problem, can do that with ether_addr_copy.
>
> On Sat, Sep 29, 2018 at 10:22 AM Stephen Hemminger <
> stephen@networkplumber.org> wrote:
>
>> On Thu, 27 Sep 2018 03:02:24 +0300
>> Igor Ryzhov <iryzhov@nfware.com> wrote:
>>
>> > +/*
>> > + *  Extract hardware address from packet
>> > + */
>> > +static int
>> > +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
>> > +{
>> > +     const struct ethhdr *eth = eth_hdr(skb);
>> > +
>> > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>> > +
>> > +     return ETH_ALEN;
>> > +}
>>
>> Kernel has function ether_addr_copy which is marginally faster and
>> commonly used.
>>
>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2018-09-27  0:02 [dpdk-dev] [PATCH] kni: implement header_ops parse method Igor Ryzhov
  2018-09-29  7:21 ` Stephen Hemminger
@ 2018-10-02 16:58 ` Ferruh Yigit
  2018-11-30 19:07   ` Igor Ryzhov
  2019-04-10 10:30 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
  2 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2018-10-02 16:58 UTC (permalink / raw)
  To: Igor Ryzhov, dev, Stephen Hemminger

On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>

Hi Igor,

What is the motivation to add this support? What is enabled by this?


Meanwhile, why we are not using eth_header_ops, which is already set by
ether_setup().
To disable .cache & .cache_update?

If so why not using relevant eth_header_ops (eth_header, eth_header_parse ..)
instead of implementing ours?

> ---
>  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
> index 7fcfa106c..128a5477c 100644
> --- a/kernel/linux/kni/kni_net.c
> +++ b/kernel/linux/kni/kni_net.c
> @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct net_device *dev,
>  	return dev->hard_header_len;
>  }
>  
> +/*
> + *  Extract hardware address from packet
> + */
> +static int
> +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
> +{
> +	const struct ethhdr *eth = eth_hdr(skb);
> +
> +	memcpy(haddr, eth->h_source, ETH_ALEN);
> +
> +	return ETH_ALEN;
> +}
> +
>  /*
>   * Re-fill the eth header
>   */
> @@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device *dev, bool new_carrier)
>  
>  static const struct header_ops kni_net_header_ops = {
>  	.create  = kni_net_header,
> +	.parse   = kni_net_header_parse,
>  #ifdef HAVE_REBUILD_HEADER
>  	.rebuild = kni_net_rebuild_header,
>  #endif /* < 4.1.0  */
> 

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2018-10-02 16:58 ` Ferruh Yigit
@ 2018-11-30 19:07   ` Igor Ryzhov
  2019-01-24  9:18     ` Igor Ryzhov
  0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2018-11-30 19:07 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

Hi Ferruh,

header_ops.parse method is used by raw-sockets to fill sockaddr_ll
structure.
It is used, for example, in isisd for frrouting.

Regarding your question about eth_header_ops – I, unfortunately, don't know
why .cache and .cache_update are disabled for KNI.
I also think that it will be better to use default eth_header_ops.

Best regards,
Igor

On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
> > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
>
> Hi Igor,
>
> What is the motivation to add this support? What is enabled by this?
>
>
> Meanwhile, why we are not using eth_header_ops, which is already set by
> ether_setup().
> To disable .cache & .cache_update?
>
> If so why not using relevant eth_header_ops (eth_header, eth_header_parse
> ..)
> instead of implementing ours?
>
> > ---
> >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
> > index 7fcfa106c..128a5477c 100644
> > --- a/kernel/linux/kni/kni_net.c
> > +++ b/kernel/linux/kni/kni_net.c
> > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct
> net_device *dev,
> >       return dev->hard_header_len;
> >  }
> >
> > +/*
> > + *  Extract hardware address from packet
> > + */
> > +static int
> > +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
> > +{
> > +     const struct ethhdr *eth = eth_hdr(skb);
> > +
> > +     memcpy(haddr, eth->h_source, ETH_ALEN);
> > +
> > +     return ETH_ALEN;
> > +}
> > +
> >  /*
> >   * Re-fill the eth header
> >   */
> > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device *dev, bool
> new_carrier)
> >
> >  static const struct header_ops kni_net_header_ops = {
> >       .create  = kni_net_header,
> > +     .parse   = kni_net_header_parse,
> >  #ifdef HAVE_REBUILD_HEADER
> >       .rebuild = kni_net_rebuild_header,
> >  #endif /* < 4.1.0  */
> >
>
>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2018-11-30 19:07   ` Igor Ryzhov
@ 2019-01-24  9:18     ` Igor Ryzhov
  2019-01-24 14:10       ` Ferruh Yigit
  0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2019-01-24  9:18 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

Hi Ferruh,

What about this patch?
Can you merge it as-is, or should I change it to use relevant
eth_header_ops functions? Or maybe completely use eth_header_ops?

Best regards,
Igor

On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com> wrote:

> Hi Ferruh,
>
> header_ops.parse method is used by raw-sockets to fill sockaddr_ll
> structure.
> It is used, for example, in isisd for frrouting.
>
> Regarding your question about eth_header_ops – I, unfortunately, don't
> know why .cache and .cache_update are disabled for KNI.
> I also think that it will be better to use default eth_header_ops.
>
> Best regards,
> Igor
>
> On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <ferruh.yigit@intel.com>
> wrote:
>
>> On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>> > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
>>
>> Hi Igor,
>>
>> What is the motivation to add this support? What is enabled by this?
>>
>>
>> Meanwhile, why we are not using eth_header_ops, which is already set by
>> ether_setup().
>> To disable .cache & .cache_update?
>>
>> If so why not using relevant eth_header_ops (eth_header, eth_header_parse
>> ..)
>> instead of implementing ours?
>>
>> > ---
>> >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>> >  1 file changed, 14 insertions(+)
>> >
>> > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
>> > index 7fcfa106c..128a5477c 100644
>> > --- a/kernel/linux/kni/kni_net.c
>> > +++ b/kernel/linux/kni/kni_net.c
>> > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct
>> net_device *dev,
>> >       return dev->hard_header_len;
>> >  }
>> >
>> > +/*
>> > + *  Extract hardware address from packet
>> > + */
>> > +static int
>> > +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
>> > +{
>> > +     const struct ethhdr *eth = eth_hdr(skb);
>> > +
>> > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>> > +
>> > +     return ETH_ALEN;
>> > +}
>> > +
>> >  /*
>> >   * Re-fill the eth header
>> >   */
>> > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device *dev, bool
>> new_carrier)
>> >
>> >  static const struct header_ops kni_net_header_ops = {
>> >       .create  = kni_net_header,
>> > +     .parse   = kni_net_header_parse,
>> >  #ifdef HAVE_REBUILD_HEADER
>> >       .rebuild = kni_net_rebuild_header,
>> >  #endif /* < 4.1.0  */
>> >
>>
>>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-01-24  9:18     ` Igor Ryzhov
@ 2019-01-24 14:10       ` Ferruh Yigit
  2019-01-24 16:35         ` Igor Ryzhov
  0 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-01-24 14:10 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Stephen Hemminger

On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> What about this patch?
> Can you merge it as-is, or should I change it to use relevant eth_header_ops
> functions? Or maybe completely use eth_header_ops?

Hi Igor,

I am not clear about motivation of the patch, what use case enabled by this
patch? What is not working with current code?
I am for rejecting the patch without need justified.

And if the need is justified, still there is a question that why not use
'eth_header_parse()' directly but implement our copy?


And an extended question/investigation about why not use 'eth_header_ops', which
seems done intentionally but I am missing the reasoning.

> 
> Best regards,
> Igor
> 
> On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
> <mailto:iryzhov@nfware.com>> wrote:
> 
>     Hi Ferruh,
> 
>     header_ops.parse method is used by raw-sockets to fill sockaddr_ll structure.
>     It is used, for example, in isisd for frrouting.
> 
>     Regarding your question about eth_header_ops – I, unfortunately, don't know
>     why .cache and .cache_update are disabled for KNI.
>     I also think that it will be better to use default eth_header_ops.
> 
>     Best regards,
>     Igor
> 
>     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>> wrote:
> 
>         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
>         <mailto:iryzhov@nfware.com>>
> 
>         Hi Igor,
> 
>         What is the motivation to add this support? What is enabled by this?
> 
> 
>         Meanwhile, why we are not using eth_header_ops, which is already set by
>         ether_setup().
>         To disable .cache & .cache_update?
> 
>         If so why not using relevant eth_header_ops (eth_header,
>         eth_header_parse ..)
>         instead of implementing ours?
> 
>         > ---
>         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>         >  1 file changed, 14 insertions(+)
>         >
>         > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
>         > index 7fcfa106c..128a5477c 100644
>         > --- a/kernel/linux/kni/kni_net.c
>         > +++ b/kernel/linux/kni/kni_net.c
>         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct
>         net_device *dev,
>         >       return dev->hard_header_len;
>         >  }
>         > 
>         > +/*
>         > + *  Extract hardware address from packet
>         > + */
>         > +static int
>         > +kni_net_header_parse(const struct sk_buff *skb, unsigned char *haddr)
>         > +{
>         > +     const struct ethhdr *eth = eth_hdr(skb);
>         > +
>         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>         > +
>         > +     return ETH_ALEN;
>         > +}
>         > +
>         >  /*
>         >   * Re-fill the eth header
>         >   */
>         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device *dev,
>         bool new_carrier)
>         > 
>         >  static const struct header_ops kni_net_header_ops = {
>         >       .create  = kni_net_header,
>         > +     .parse   = kni_net_header_parse,
>         >  #ifdef HAVE_REBUILD_HEADER
>         >       .rebuild = kni_net_rebuild_header,
>         >  #endif /* < 4.1.0  */
>         >
> 

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-01-24 14:10       ` Ferruh Yigit
@ 2019-01-24 16:35         ` Igor Ryzhov
  2019-01-24 17:15           ` Ferruh Yigit
  0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2019-01-24 16:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

Hi Ferruh,

I already answered your question in my previous email, header_ops.parse
method is used by packet(7) interface for packet parsing and filling
sockaddr_ll structure.
Here is the link on the usage –
https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100

Regarding the question about eth_header_ops usage:
Right now both already existing functions, kni_net_header and
kni_net_rebuild_header, are implemented as copies, not using eth_header_ops
functions.
That's why I think my patch should be accepted as is, and the problem of
eth_header_ops usage should be investigated separately, and possibly
resolved by a separate patch.

Best regards,
Igor

On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
> > Hi Ferruh,
> >
> > What about this patch?
> > Can you merge it as-is, or should I change it to use relevant
> eth_header_ops
> > functions? Or maybe completely use eth_header_ops?
>
> Hi Igor,
>
> I am not clear about motivation of the patch, what use case enabled by this
> patch? What is not working with current code?
> I am for rejecting the patch without need justified.
>
> And if the need is justified, still there is a question that why not use
> 'eth_header_parse()' directly but implement our copy?
>
>
> And an extended question/investigation about why not use 'eth_header_ops',
> which
> seems done intentionally but I am missing the reasoning.
>
> >
> > Best regards,
> > Igor
> >
> > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
> > <mailto:iryzhov@nfware.com>> wrote:
> >
> >     Hi Ferruh,
> >
> >     header_ops.parse method is used by raw-sockets to fill sockaddr_ll
> structure.
> >     It is used, for example, in isisd for frrouting.
> >
> >     Regarding your question about eth_header_ops – I, unfortunately,
> don't know
> >     why .cache and .cache_update are disabled for KNI.
> >     I also think that it will be better to use default eth_header_ops.
> >
> >     Best regards,
> >     Igor
> >
> >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <ferruh.yigit@intel.com
> >     <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
> >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
> >         <mailto:iryzhov@nfware.com>>
> >
> >         Hi Igor,
> >
> >         What is the motivation to add this support? What is enabled by
> this?
> >
> >
> >         Meanwhile, why we are not using eth_header_ops, which is already
> set by
> >         ether_setup().
> >         To disable .cache & .cache_update?
> >
> >         If so why not using relevant eth_header_ops (eth_header,
> >         eth_header_parse ..)
> >         instead of implementing ours?
> >
> >         > ---
> >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
> >         >  1 file changed, 14 insertions(+)
> >         >
> >         > diff --git a/kernel/linux/kni/kni_net.c
> b/kernel/linux/kni/kni_net.c
> >         > index 7fcfa106c..128a5477c 100644
> >         > --- a/kernel/linux/kni/kni_net.c
> >         > +++ b/kernel/linux/kni/kni_net.c
> >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct
> >         net_device *dev,
> >         >       return dev->hard_header_len;
> >         >  }
> >         >
> >         > +/*
> >         > + *  Extract hardware address from packet
> >         > + */
> >         > +static int
> >         > +kni_net_header_parse(const struct sk_buff *skb, unsigned char
> *haddr)
> >         > +{
> >         > +     const struct ethhdr *eth = eth_hdr(skb);
> >         > +
> >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
> >         > +
> >         > +     return ETH_ALEN;
> >         > +}
> >         > +
> >         >  /*
> >         >   * Re-fill the eth header
> >         >   */
> >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device
> *dev,
> >         bool new_carrier)
> >         >
> >         >  static const struct header_ops kni_net_header_ops = {
> >         >       .create  = kni_net_header,
> >         > +     .parse   = kni_net_header_parse,
> >         >  #ifdef HAVE_REBUILD_HEADER
> >         >       .rebuild = kni_net_rebuild_header,
> >         >  #endif /* < 4.1.0  */
> >         >
> >
>
>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-01-24 16:35         ` Igor Ryzhov
@ 2019-01-24 17:15           ` Ferruh Yigit
  2019-01-24 18:05             ` Igor Ryzhov
  0 siblings, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-01-24 17:15 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Stephen Hemminger

On 1/24/2019 4:35 PM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> I already answered your question in my previous email, header_ops.parse method
> is used by packet(7) interface for packet parsing and filling sockaddr_ll structure.
> Here is the link on the usage –
> https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100

I saw your previous reply. That is why changed the question slightly, from 'what
it does' to 'what is the use case'.
Trying to understand do we need it, please help me understand.

> 
> Regarding the question about eth_header_ops usage:
> Right now both already existing functions, kni_net_header and
> kni_net_rebuild_header, are implemented as copies, not using eth_header_ops
> functions.

OK, I see your reasoning, but if there is an already Linux API that does what we
want, I suggest calling it instead of re-implementing it, unless there is a good
reason to not do so.

> That's why I think my patch should be accepted as is, and the problem of
> eth_header_ops usage should be investigated separately, and possibly resolved by
> a separate patch.

Agreed, eth_header_ops usage should be investigated separately.

> 
> Best regards,
> Igor
> 
> On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
>     > Hi Ferruh,
>     >
>     > What about this patch?
>     > Can you merge it as-is, or should I change it to use relevant eth_header_ops
>     > functions? Or maybe completely use eth_header_ops?
> 
>     Hi Igor,
> 
>     I am not clear about motivation of the patch, what use case enabled by this
>     patch? What is not working with current code?
>     I am for rejecting the patch without need justified.
> 
>     And if the need is justified, still there is a question that why not use
>     'eth_header_parse()' directly but implement our copy?
> 
> 
>     And an extended question/investigation about why not use 'eth_header_ops', which
>     seems done intentionally but I am missing the reasoning.
> 
>     >
>     > Best regards,
>     > Igor
>     >
>     > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
>     <mailto:iryzhov@nfware.com>
>     > <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>> wrote:
>     >
>     >     Hi Ferruh,
>     >
>     >     header_ops.parse method is used by raw-sockets to fill sockaddr_ll
>     structure.
>     >     It is used, for example, in isisd for frrouting.
>     >
>     >     Regarding your question about eth_header_ops – I, unfortunately, don't
>     know
>     >     why .cache and .cache_update are disabled for KNI.
>     >     I also think that it will be better to use default eth_header_ops.
>     >
>     >     Best regards,
>     >     Igor
>     >
>     >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>
>     >     <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>> wrote:
>     >
>     >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>     >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
>     <mailto:iryzhov@nfware.com>
>     >         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>
>     >
>     >         Hi Igor,
>     >
>     >         What is the motivation to add this support? What is enabled by this?
>     >
>     >
>     >         Meanwhile, why we are not using eth_header_ops, which is already
>     set by
>     >         ether_setup().
>     >         To disable .cache & .cache_update?
>     >
>     >         If so why not using relevant eth_header_ops (eth_header,
>     >         eth_header_parse ..)
>     >         instead of implementing ours?
>     >
>     >         > ---
>     >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>     >         >  1 file changed, 14 insertions(+)
>     >         >
>     >         > diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
>     >         > index 7fcfa106c..128a5477c 100644
>     >         > --- a/kernel/linux/kni/kni_net.c
>     >         > +++ b/kernel/linux/kni/kni_net.c
>     >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb, struct
>     >         net_device *dev,
>     >         >       return dev->hard_header_len;
>     >         >  }
>     >         > 
>     >         > +/*
>     >         > + *  Extract hardware address from packet
>     >         > + */
>     >         > +static int
>     >         > +kni_net_header_parse(const struct sk_buff *skb, unsigned char
>     *haddr)
>     >         > +{
>     >         > +     const struct ethhdr *eth = eth_hdr(skb);
>     >         > +
>     >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>     >         > +
>     >         > +     return ETH_ALEN;
>     >         > +}
>     >         > +
>     >         >  /*
>     >         >   * Re-fill the eth header
>     >         >   */
>     >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct net_device *dev,
>     >         bool new_carrier)
>     >         > 
>     >         >  static const struct header_ops kni_net_header_ops = {
>     >         >       .create  = kni_net_header,
>     >         > +     .parse   = kni_net_header_parse,
>     >         >  #ifdef HAVE_REBUILD_HEADER
>     >         >       .rebuild = kni_net_rebuild_header,
>     >         >  #endif /* < 4.1.0  */
>     >         >
>     >
> 

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-01-24 17:15           ` Ferruh Yigit
@ 2019-01-24 18:05             ` Igor Ryzhov
  2019-04-08 16:59               ` Igor Ryzhov
  0 siblings, 1 reply; 31+ messages in thread
From: Igor Ryzhov @ 2019-01-24 18:05 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

Hi Ferruh,

Ok, no problem. Generally, it is needed for all applications using
packet(7) interface, running over KNI interfaces.
More specifically, one example of such application is FRRouting, I suppose
you are familiar with it.
FRR's ISIS daemon is using AF_PACKET sockets and checking received
sockaddr_ll.
Here is the link on one of the usages –
https://github.com/FRRouting/frr/blob/master/isisd/isis_pfpacket.c#L294

When we are good with motivation, I'll send v2 using eth_header_parse.

Best regards,
Igor

On Thu, Jan 24, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 1/24/2019 4:35 PM, Igor Ryzhov wrote:
> > Hi Ferruh,
> >
> > I already answered your question in my previous email, header_ops.parse
> method
> > is used by packet(7) interface for packet parsing and filling
> sockaddr_ll structure.
> > Here is the link on the usage –
> >
> https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100
>
> I saw your previous reply. That is why changed the question slightly, from
> 'what
> it does' to 'what is the use case'.
> Trying to understand do we need it, please help me understand.
>
> >
> > Regarding the question about eth_header_ops usage:
> > Right now both already existing functions, kni_net_header and
> > kni_net_rebuild_header, are implemented as copies, not using
> eth_header_ops
> > functions.
>
> OK, I see your reasoning, but if there is an already Linux API that does
> what we
> want, I suggest calling it instead of re-implementing it, unless there is
> a good
> reason to not do so.
>
> > That's why I think my patch should be accepted as is, and the problem of
> > eth_header_ops usage should be investigated separately, and possibly
> resolved by
> > a separate patch.
>
> Agreed, eth_header_ops usage should be investigated separately.
>
> >
> > Best regards,
> > Igor
> >
> > On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >     On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
> >     > Hi Ferruh,
> >     >
> >     > What about this patch?
> >     > Can you merge it as-is, or should I change it to use relevant
> eth_header_ops
> >     > functions? Or maybe completely use eth_header_ops?
> >
> >     Hi Igor,
> >
> >     I am not clear about motivation of the patch, what use case enabled
> by this
> >     patch? What is not working with current code?
> >     I am for rejecting the patch without need justified.
> >
> >     And if the need is justified, still there is a question that why not
> use
> >     'eth_header_parse()' directly but implement our copy?
> >
> >
> >     And an extended question/investigation about why not use
> 'eth_header_ops', which
> >     seems done intentionally but I am missing the reasoning.
> >
> >     >
> >     > Best regards,
> >     > Igor
> >     >
> >     > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
> >     <mailto:iryzhov@nfware.com>
> >     > <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>> wrote:
> >     >
> >     >     Hi Ferruh,
> >     >
> >     >     header_ops.parse method is used by raw-sockets to
> fill sockaddr_ll
> >     structure.
> >     >     It is used, for example, in isisd for frrouting.
> >     >
> >     >     Regarding your question about eth_header_ops – I,
> unfortunately, don't
> >     know
> >     >     why .cache and .cache_update are disabled for KNI.
> >     >     I also think that it will be better to use default
> eth_header_ops.
> >     >
> >     >     Best regards,
> >     >     Igor
> >     >
> >     >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <
> ferruh.yigit@intel.com
> >     <mailto:ferruh.yigit@intel.com>
> >     >     <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>>
> wrote:
> >     >
> >     >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
> >     >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
> >     <mailto:iryzhov@nfware.com>
> >     >         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>
> >     >
> >     >         Hi Igor,
> >     >
> >     >         What is the motivation to add this support? What is
> enabled by this?
> >     >
> >     >
> >     >         Meanwhile, why we are not using eth_header_ops, which is
> already
> >     set by
> >     >         ether_setup().
> >     >         To disable .cache & .cache_update?
> >     >
> >     >         If so why not using relevant eth_header_ops (eth_header,
> >     >         eth_header_parse ..)
> >     >         instead of implementing ours?
> >     >
> >     >         > ---
> >     >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
> >     >         >  1 file changed, 14 insertions(+)
> >     >         >
> >     >         > diff --git a/kernel/linux/kni/kni_net.c
> b/kernel/linux/kni/kni_net.c
> >     >         > index 7fcfa106c..128a5477c 100644
> >     >         > --- a/kernel/linux/kni/kni_net.c
> >     >         > +++ b/kernel/linux/kni/kni_net.c
> >     >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff *skb,
> struct
> >     >         net_device *dev,
> >     >         >       return dev->hard_header_len;
> >     >         >  }
> >     >         >
> >     >         > +/*
> >     >         > + *  Extract hardware address from packet
> >     >         > + */
> >     >         > +static int
> >     >         > +kni_net_header_parse(const struct sk_buff *skb,
> unsigned char
> >     *haddr)
> >     >         > +{
> >     >         > +     const struct ethhdr *eth = eth_hdr(skb);
> >     >         > +
> >     >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
> >     >         > +
> >     >         > +     return ETH_ALEN;
> >     >         > +}
> >     >         > +
> >     >         >  /*
> >     >         >   * Re-fill the eth header
> >     >         >   */
> >     >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct
> net_device *dev,
> >     >         bool new_carrier)
> >     >         >
> >     >         >  static const struct header_ops kni_net_header_ops = {
> >     >         >       .create  = kni_net_header,
> >     >         > +     .parse   = kni_net_header_parse,
> >     >         >  #ifdef HAVE_REBUILD_HEADER
> >     >         >       .rebuild = kni_net_rebuild_header,
> >     >         >  #endif /* < 4.1.0  */
> >     >         >
> >     >
> >
>
>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-01-24 18:05             ` Igor Ryzhov
@ 2019-04-08 16:59               ` Igor Ryzhov
  2019-04-08 16:59                 ` Igor Ryzhov
  2019-04-09 20:30                 ` Ferruh Yigit
  0 siblings, 2 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-08 16:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

Hi Ferruh,

Can we proceed with this patch?

Igor

On Thu, Jan 24, 2019 at 9:05 PM Igor Ryzhov <iryzhov@nfware.com> wrote:

> Hi Ferruh,
>
> Ok, no problem. Generally, it is needed for all applications using
> packet(7) interface, running over KNI interfaces.
> More specifically, one example of such application is FRRouting, I suppose
> you are familiar with it.
> FRR's ISIS daemon is using AF_PACKET sockets and checking received
> sockaddr_ll.
> Here is the link on one of the usages –
> https://github.com/FRRouting/frr/blob/master/isisd/isis_pfpacket.c#L294
>
> When we are good with motivation, I'll send v2 using eth_header_parse.
>
> Best regards,
> Igor
>
> On Thu, Jan 24, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com>
> wrote:
>
>> On 1/24/2019 4:35 PM, Igor Ryzhov wrote:
>> > Hi Ferruh,
>> >
>> > I already answered your question in my previous email, header_ops.parse
>> method
>> > is used by packet(7) interface for packet parsing and filling
>> sockaddr_ll structure.
>> > Here is the link on the usage –
>> >
>> https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100
>>
>> I saw your previous reply. That is why changed the question slightly,
>> from 'what
>> it does' to 'what is the use case'.
>> Trying to understand do we need it, please help me understand.
>>
>> >
>> > Regarding the question about eth_header_ops usage:
>> > Right now both already existing functions, kni_net_header and
>> > kni_net_rebuild_header, are implemented as copies, not using
>> eth_header_ops
>> > functions.
>>
>> OK, I see your reasoning, but if there is an already Linux API that does
>> what we
>> want, I suggest calling it instead of re-implementing it, unless there is
>> a good
>> reason to not do so.
>>
>> > That's why I think my patch should be accepted as is, and the problem of
>> > eth_header_ops usage should be investigated separately, and possibly
>> resolved by
>> > a separate patch.
>>
>> Agreed, eth_header_ops usage should be investigated separately.
>>
>> >
>> > Best regards,
>> > Igor
>> >
>> > On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com
>> > <mailto:ferruh.yigit@intel.com>> wrote:
>> >
>> >     On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
>> >     > Hi Ferruh,
>> >     >
>> >     > What about this patch?
>> >     > Can you merge it as-is, or should I change it to use relevant
>> eth_header_ops
>> >     > functions? Or maybe completely use eth_header_ops?
>> >
>> >     Hi Igor,
>> >
>> >     I am not clear about motivation of the patch, what use case enabled
>> by this
>> >     patch? What is not working with current code?
>> >     I am for rejecting the patch without need justified.
>> >
>> >     And if the need is justified, still there is a question that why
>> not use
>> >     'eth_header_parse()' directly but implement our copy?
>> >
>> >
>> >     And an extended question/investigation about why not use
>> 'eth_header_ops', which
>> >     seems done intentionally but I am missing the reasoning.
>> >
>> >     >
>> >     > Best regards,
>> >     > Igor
>> >     >
>> >     > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
>> >     <mailto:iryzhov@nfware.com>
>> >     > <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>> wrote:
>> >     >
>> >     >     Hi Ferruh,
>> >     >
>> >     >     header_ops.parse method is used by raw-sockets to
>> fill sockaddr_ll
>> >     structure.
>> >     >     It is used, for example, in isisd for frrouting.
>> >     >
>> >     >     Regarding your question about eth_header_ops – I,
>> unfortunately, don't
>> >     know
>> >     >     why .cache and .cache_update are disabled for KNI.
>> >     >     I also think that it will be better to use default
>> eth_header_ops.
>> >     >
>> >     >     Best regards,
>> >     >     Igor
>> >     >
>> >     >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <
>> ferruh.yigit@intel.com
>> >     <mailto:ferruh.yigit@intel.com>
>> >     >     <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>>
>> wrote:
>> >     >
>> >     >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>> >     >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
>> >     <mailto:iryzhov@nfware.com>
>> >     >         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>
>> >     >
>> >     >         Hi Igor,
>> >     >
>> >     >         What is the motivation to add this support? What is
>> enabled by this?
>> >     >
>> >     >
>> >     >         Meanwhile, why we are not using eth_header_ops, which is
>> already
>> >     set by
>> >     >         ether_setup().
>> >     >         To disable .cache & .cache_update?
>> >     >
>> >     >         If so why not using relevant eth_header_ops (eth_header,
>> >     >         eth_header_parse ..)
>> >     >         instead of implementing ours?
>> >     >
>> >     >         > ---
>> >     >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>> >     >         >  1 file changed, 14 insertions(+)
>> >     >         >
>> >     >         > diff --git a/kernel/linux/kni/kni_net.c
>> b/kernel/linux/kni/kni_net.c
>> >     >         > index 7fcfa106c..128a5477c 100644
>> >     >         > --- a/kernel/linux/kni/kni_net.c
>> >     >         > +++ b/kernel/linux/kni/kni_net.c
>> >     >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff
>> *skb, struct
>> >     >         net_device *dev,
>> >     >         >       return dev->hard_header_len;
>> >     >         >  }
>> >     >         >
>> >     >         > +/*
>> >     >         > + *  Extract hardware address from packet
>> >     >         > + */
>> >     >         > +static int
>> >     >         > +kni_net_header_parse(const struct sk_buff *skb,
>> unsigned char
>> >     *haddr)
>> >     >         > +{
>> >     >         > +     const struct ethhdr *eth = eth_hdr(skb);
>> >     >         > +
>> >     >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>> >     >         > +
>> >     >         > +     return ETH_ALEN;
>> >     >         > +}
>> >     >         > +
>> >     >         >  /*
>> >     >         >   * Re-fill the eth header
>> >     >         >   */
>> >     >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct
>> net_device *dev,
>> >     >         bool new_carrier)
>> >     >         >
>> >     >         >  static const struct header_ops kni_net_header_ops = {
>> >     >         >       .create  = kni_net_header,
>> >     >         > +     .parse   = kni_net_header_parse,
>> >     >         >  #ifdef HAVE_REBUILD_HEADER
>> >     >         >       .rebuild = kni_net_rebuild_header,
>> >     >         >  #endif /* < 4.1.0  */
>> >     >         >
>> >     >
>> >
>>
>>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-04-08 16:59               ` Igor Ryzhov
@ 2019-04-08 16:59                 ` Igor Ryzhov
  2019-04-09 20:30                 ` Ferruh Yigit
  1 sibling, 0 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-08 16:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Stephen Hemminger

Hi Ferruh,

Can we proceed with this patch?

Igor

On Thu, Jan 24, 2019 at 9:05 PM Igor Ryzhov <iryzhov@nfware.com> wrote:

> Hi Ferruh,
>
> Ok, no problem. Generally, it is needed for all applications using
> packet(7) interface, running over KNI interfaces.
> More specifically, one example of such application is FRRouting, I suppose
> you are familiar with it.
> FRR's ISIS daemon is using AF_PACKET sockets and checking received
> sockaddr_ll.
> Here is the link on one of the usages –
> https://github.com/FRRouting/frr/blob/master/isisd/isis_pfpacket.c#L294
>
> When we are good with motivation, I'll send v2 using eth_header_parse.
>
> Best regards,
> Igor
>
> On Thu, Jan 24, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com>
> wrote:
>
>> On 1/24/2019 4:35 PM, Igor Ryzhov wrote:
>> > Hi Ferruh,
>> >
>> > I already answered your question in my previous email, header_ops.parse
>> method
>> > is used by packet(7) interface for packet parsing and filling
>> sockaddr_ll structure.
>> > Here is the link on the usage –
>> >
>> https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100
>>
>> I saw your previous reply. That is why changed the question slightly,
>> from 'what
>> it does' to 'what is the use case'.
>> Trying to understand do we need it, please help me understand.
>>
>> >
>> > Regarding the question about eth_header_ops usage:
>> > Right now both already existing functions, kni_net_header and
>> > kni_net_rebuild_header, are implemented as copies, not using
>> eth_header_ops
>> > functions.
>>
>> OK, I see your reasoning, but if there is an already Linux API that does
>> what we
>> want, I suggest calling it instead of re-implementing it, unless there is
>> a good
>> reason to not do so.
>>
>> > That's why I think my patch should be accepted as is, and the problem of
>> > eth_header_ops usage should be investigated separately, and possibly
>> resolved by
>> > a separate patch.
>>
>> Agreed, eth_header_ops usage should be investigated separately.
>>
>> >
>> > Best regards,
>> > Igor
>> >
>> > On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com
>> > <mailto:ferruh.yigit@intel.com>> wrote:
>> >
>> >     On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
>> >     > Hi Ferruh,
>> >     >
>> >     > What about this patch?
>> >     > Can you merge it as-is, or should I change it to use relevant
>> eth_header_ops
>> >     > functions? Or maybe completely use eth_header_ops?
>> >
>> >     Hi Igor,
>> >
>> >     I am not clear about motivation of the patch, what use case enabled
>> by this
>> >     patch? What is not working with current code?
>> >     I am for rejecting the patch without need justified.
>> >
>> >     And if the need is justified, still there is a question that why
>> not use
>> >     'eth_header_parse()' directly but implement our copy?
>> >
>> >
>> >     And an extended question/investigation about why not use
>> 'eth_header_ops', which
>> >     seems done intentionally but I am missing the reasoning.
>> >
>> >     >
>> >     > Best regards,
>> >     > Igor
>> >     >
>> >     > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
>> >     <mailto:iryzhov@nfware.com>
>> >     > <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>> wrote:
>> >     >
>> >     >     Hi Ferruh,
>> >     >
>> >     >     header_ops.parse method is used by raw-sockets to
>> fill sockaddr_ll
>> >     structure.
>> >     >     It is used, for example, in isisd for frrouting.
>> >     >
>> >     >     Regarding your question about eth_header_ops – I,
>> unfortunately, don't
>> >     know
>> >     >     why .cache and .cache_update are disabled for KNI.
>> >     >     I also think that it will be better to use default
>> eth_header_ops.
>> >     >
>> >     >     Best regards,
>> >     >     Igor
>> >     >
>> >     >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit <
>> ferruh.yigit@intel.com
>> >     <mailto:ferruh.yigit@intel.com>
>> >     >     <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>>
>> wrote:
>> >     >
>> >     >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>> >     >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
>> >     <mailto:iryzhov@nfware.com>
>> >     >         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>
>> >     >
>> >     >         Hi Igor,
>> >     >
>> >     >         What is the motivation to add this support? What is
>> enabled by this?
>> >     >
>> >     >
>> >     >         Meanwhile, why we are not using eth_header_ops, which is
>> already
>> >     set by
>> >     >         ether_setup().
>> >     >         To disable .cache & .cache_update?
>> >     >
>> >     >         If so why not using relevant eth_header_ops (eth_header,
>> >     >         eth_header_parse ..)
>> >     >         instead of implementing ours?
>> >     >
>> >     >         > ---
>> >     >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>> >     >         >  1 file changed, 14 insertions(+)
>> >     >         >
>> >     >         > diff --git a/kernel/linux/kni/kni_net.c
>> b/kernel/linux/kni/kni_net.c
>> >     >         > index 7fcfa106c..128a5477c 100644
>> >     >         > --- a/kernel/linux/kni/kni_net.c
>> >     >         > +++ b/kernel/linux/kni/kni_net.c
>> >     >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff
>> *skb, struct
>> >     >         net_device *dev,
>> >     >         >       return dev->hard_header_len;
>> >     >         >  }
>> >     >         >
>> >     >         > +/*
>> >     >         > + *  Extract hardware address from packet
>> >     >         > + */
>> >     >         > +static int
>> >     >         > +kni_net_header_parse(const struct sk_buff *skb,
>> unsigned char
>> >     *haddr)
>> >     >         > +{
>> >     >         > +     const struct ethhdr *eth = eth_hdr(skb);
>> >     >         > +
>> >     >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>> >     >         > +
>> >     >         > +     return ETH_ALEN;
>> >     >         > +}
>> >     >         > +
>> >     >         >  /*
>> >     >         >   * Re-fill the eth header
>> >     >         >   */
>> >     >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct
>> net_device *dev,
>> >     >         bool new_carrier)
>> >     >         >
>> >     >         >  static const struct header_ops kni_net_header_ops = {
>> >     >         >       .create  = kni_net_header,
>> >     >         > +     .parse   = kni_net_header_parse,
>> >     >         >  #ifdef HAVE_REBUILD_HEADER
>> >     >         >       .rebuild = kni_net_rebuild_header,
>> >     >         >  #endif /* < 4.1.0  */
>> >     >         >
>> >     >
>> >
>>
>>

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-04-08 16:59               ` Igor Ryzhov
  2019-04-08 16:59                 ` Igor Ryzhov
@ 2019-04-09 20:30                 ` Ferruh Yigit
  2019-04-09 20:30                   ` Ferruh Yigit
  1 sibling, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-09 20:30 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Stephen Hemminger

On 4/8/2019 5:59 PM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> Can we proceed with this patch?
> 
> Igor
> 
> On Thu, Jan 24, 2019 at 9:05 PM Igor Ryzhov <iryzhov@nfware.com
> <mailto:iryzhov@nfware.com>> wrote:
> 
>     Hi Ferruh,
> 
>     Ok, no problem. Generally, it is needed for all applications using packet(7)
>     interface, running over KNI interfaces.
>     More specifically, one example of such application is FRRouting, I suppose
>     you are familiar with it.
>     FRR's ISIS daemon is using AF_PACKET sockets and checking received sockaddr_ll.
>     Here is the link on one of the usages
>     – https://github.com/FRRouting/frr/blob/master/isisd/isis_pfpacket.c#L294
> 
>     When we are good with motivation, I'll send v2 using eth_header_parse.

Hi Igor,

Sorry for the delay, thanks for the clarification on patch.
Can you please send v2 with 'eth_header_parse'? And please include above
information in commit log.

Thanks,
ferruh

> 
>     Best regards,
>     Igor
> 
>     On Thu, Jan 24, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>> wrote:
> 
>         On 1/24/2019 4:35 PM, Igor Ryzhov wrote:
>         > Hi Ferruh,
>         >
>         > I already answered your question in my previous email,
>         header_ops.parse method
>         > is used by packet(7) interface for packet parsing and filling
>         sockaddr_ll structure.
>         > Here is the link on the usage –
>         >
>         https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100
> 
>         I saw your previous reply. That is why changed the question slightly,
>         from 'what
>         it does' to 'what is the use case'.
>         Trying to understand do we need it, please help me understand.
> 
>         >
>         > Regarding the question about eth_header_ops usage:
>         > Right now both already existing functions, kni_net_header and
>         > kni_net_rebuild_header, are implemented as copies, not using
>         eth_header_ops
>         > functions.
> 
>         OK, I see your reasoning, but if there is an already Linux API that does
>         what we
>         want, I suggest calling it instead of re-implementing it, unless there
>         is a good
>         reason to not do so.
> 
>         > That's why I think my patch should be accepted as is, and the problem of
>         > eth_header_ops usage should be investigated separately, and possibly
>         resolved by
>         > a separate patch.
> 
>         Agreed, eth_header_ops usage should be investigated separately.
> 
>         >
>         > Best regards,
>         > Igor
>         >
>         > On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com
>         <mailto:ferruh.yigit@intel.com>
>         > <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>> wrote:
>         >
>         >     On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
>         >     > Hi Ferruh,
>         >     >
>         >     > What about this patch?
>         >     > Can you merge it as-is, or should I change it to use relevant
>         eth_header_ops
>         >     > functions? Or maybe completely use eth_header_ops?
>         >
>         >     Hi Igor,
>         >
>         >     I am not clear about motivation of the patch, what use case
>         enabled by this
>         >     patch? What is not working with current code?
>         >     I am for rejecting the patch without need justified.
>         >
>         >     And if the need is justified, still there is a question that why
>         not use
>         >     'eth_header_parse()' directly but implement our copy?
>         >
>         >
>         >     And an extended question/investigation about why not use
>         'eth_header_ops', which
>         >     seems done intentionally but I am missing the reasoning.
>         >
>         >     >
>         >     > Best regards,
>         >     > Igor
>         >     >
>         >     > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
>         <mailto:iryzhov@nfware.com>
>         >     <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>
>         >     > <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>
>         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>> wrote:
>         >     >
>         >     >     Hi Ferruh,
>         >     >
>         >     >     header_ops.parse method is used by raw-sockets to
>         fill sockaddr_ll
>         >     structure.
>         >     >     It is used, for example, in isisd for frrouting.
>         >     >
>         >     >     Regarding your question about eth_header_ops – I,
>         unfortunately, don't
>         >     know
>         >     >     why .cache and .cache_update are disabled for KNI.
>         >     >     I also think that it will be better to use default
>         eth_header_ops.
>         >     >
>         >     >     Best regards,
>         >     >     Igor
>         >     >
>         >     >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit
>         <ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>
>         >     <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>
>         >     >     <mailto:ferruh.yigit@intel.com
>         <mailto:ferruh.yigit@intel.com> <mailto:ferruh.yigit@intel.com
>         <mailto:ferruh.yigit@intel.com>>>> wrote:
>         >     >
>         >     >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>         >     >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
>         <mailto:iryzhov@nfware.com>
>         >     <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>
>         >     >         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>
>         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>>
>         >     >
>         >     >         Hi Igor,
>         >     >
>         >     >         What is the motivation to add this support? What is
>         enabled by this?
>         >     >
>         >     >
>         >     >         Meanwhile, why we are not using eth_header_ops, which is
>         already
>         >     set by
>         >     >         ether_setup().
>         >     >         To disable .cache & .cache_update?
>         >     >
>         >     >         If so why not using relevant eth_header_ops (eth_header,
>         >     >         eth_header_parse ..)
>         >     >         instead of implementing ours?
>         >     >
>         >     >         > ---
>         >     >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>         >     >         >  1 file changed, 14 insertions(+)
>         >     >         >
>         >     >         > diff --git a/kernel/linux/kni/kni_net.c
>         b/kernel/linux/kni/kni_net.c
>         >     >         > index 7fcfa106c..128a5477c 100644
>         >     >         > --- a/kernel/linux/kni/kni_net.c
>         >     >         > +++ b/kernel/linux/kni/kni_net.c
>         >     >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff
>         *skb, struct
>         >     >         net_device *dev,
>         >     >         >       return dev->hard_header_len;
>         >     >         >  }
>         >     >         > 
>         >     >         > +/*
>         >     >         > + *  Extract hardware address from packet
>         >     >         > + */
>         >     >         > +static int
>         >     >         > +kni_net_header_parse(const struct sk_buff *skb,
>         unsigned char
>         >     *haddr)
>         >     >         > +{
>         >     >         > +     const struct ethhdr *eth = eth_hdr(skb);
>         >     >         > +
>         >     >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>         >     >         > +
>         >     >         > +     return ETH_ALEN;
>         >     >         > +}
>         >     >         > +
>         >     >         >  /*
>         >     >         >   * Re-fill the eth header
>         >     >         >   */
>         >     >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct
>         net_device *dev,
>         >     >         bool new_carrier)
>         >     >         > 
>         >     >         >  static const struct header_ops kni_net_header_ops = {
>         >     >         >       .create  = kni_net_header,
>         >     >         > +     .parse   = kni_net_header_parse,
>         >     >         >  #ifdef HAVE_REBUILD_HEADER
>         >     >         >       .rebuild = kni_net_rebuild_header,
>         >     >         >  #endif /* < 4.1.0  */
>         >     >         >
>         >     >
>         >
> 

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

* Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
  2019-04-09 20:30                 ` Ferruh Yigit
@ 2019-04-09 20:30                   ` Ferruh Yigit
  0 siblings, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-09 20:30 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Stephen Hemminger

On 4/8/2019 5:59 PM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> Can we proceed with this patch?
> 
> Igor
> 
> On Thu, Jan 24, 2019 at 9:05 PM Igor Ryzhov <iryzhov@nfware.com
> <mailto:iryzhov@nfware.com>> wrote:
> 
>     Hi Ferruh,
> 
>     Ok, no problem. Generally, it is needed for all applications using packet(7)
>     interface, running over KNI interfaces.
>     More specifically, one example of such application is FRRouting, I suppose
>     you are familiar with it.
>     FRR's ISIS daemon is using AF_PACKET sockets and checking received sockaddr_ll.
>     Here is the link on one of the usages
>     – https://github.com/FRRouting/frr/blob/master/isisd/isis_pfpacket.c#L294
> 
>     When we are good with motivation, I'll send v2 using eth_header_parse.

Hi Igor,

Sorry for the delay, thanks for the clarification on patch.
Can you please send v2 with 'eth_header_parse'? And please include above
information in commit log.

Thanks,
ferruh

> 
>     Best regards,
>     Igor
> 
>     On Thu, Jan 24, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>> wrote:
> 
>         On 1/24/2019 4:35 PM, Igor Ryzhov wrote:
>         > Hi Ferruh,
>         >
>         > I already answered your question in my previous email,
>         header_ops.parse method
>         > is used by packet(7) interface for packet parsing and filling
>         sockaddr_ll structure.
>         > Here is the link on the usage –
>         >
>         https://elixir.bootlin.com/linux/latest/source/net/packet/af_packet.c#L2100
> 
>         I saw your previous reply. That is why changed the question slightly,
>         from 'what
>         it does' to 'what is the use case'.
>         Trying to understand do we need it, please help me understand.
> 
>         >
>         > Regarding the question about eth_header_ops usage:
>         > Right now both already existing functions, kni_net_header and
>         > kni_net_rebuild_header, are implemented as copies, not using
>         eth_header_ops
>         > functions.
> 
>         OK, I see your reasoning, but if there is an already Linux API that does
>         what we
>         want, I suggest calling it instead of re-implementing it, unless there
>         is a good
>         reason to not do so.
> 
>         > That's why I think my patch should be accepted as is, and the problem of
>         > eth_header_ops usage should be investigated separately, and possibly
>         resolved by
>         > a separate patch.
> 
>         Agreed, eth_header_ops usage should be investigated separately.
> 
>         >
>         > Best regards,
>         > Igor
>         >
>         > On Thu, Jan 24, 2019 at 5:10 PM Ferruh Yigit <ferruh.yigit@intel.com
>         <mailto:ferruh.yigit@intel.com>
>         > <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>> wrote:
>         >
>         >     On 1/24/2019 9:18 AM, Igor Ryzhov wrote:
>         >     > Hi Ferruh,
>         >     >
>         >     > What about this patch?
>         >     > Can you merge it as-is, or should I change it to use relevant
>         eth_header_ops
>         >     > functions? Or maybe completely use eth_header_ops?
>         >
>         >     Hi Igor,
>         >
>         >     I am not clear about motivation of the patch, what use case
>         enabled by this
>         >     patch? What is not working with current code?
>         >     I am for rejecting the patch without need justified.
>         >
>         >     And if the need is justified, still there is a question that why
>         not use
>         >     'eth_header_parse()' directly but implement our copy?
>         >
>         >
>         >     And an extended question/investigation about why not use
>         'eth_header_ops', which
>         >     seems done intentionally but I am missing the reasoning.
>         >
>         >     >
>         >     > Best regards,
>         >     > Igor
>         >     >
>         >     > On Fri, Nov 30, 2018 at 10:07 PM Igor Ryzhov <iryzhov@nfware.com
>         <mailto:iryzhov@nfware.com>
>         >     <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>
>         >     > <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>
>         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>> wrote:
>         >     >
>         >     >     Hi Ferruh,
>         >     >
>         >     >     header_ops.parse method is used by raw-sockets to
>         fill sockaddr_ll
>         >     structure.
>         >     >     It is used, for example, in isisd for frrouting.
>         >     >
>         >     >     Regarding your question about eth_header_ops – I,
>         unfortunately, don't
>         >     know
>         >     >     why .cache and .cache_update are disabled for KNI.
>         >     >     I also think that it will be better to use default
>         eth_header_ops.
>         >     >
>         >     >     Best regards,
>         >     >     Igor
>         >     >
>         >     >     On Tue, Oct 2, 2018 at 7:58 PM Ferruh Yigit
>         <ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>
>         >     <mailto:ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>>
>         >     >     <mailto:ferruh.yigit@intel.com
>         <mailto:ferruh.yigit@intel.com> <mailto:ferruh.yigit@intel.com
>         <mailto:ferruh.yigit@intel.com>>>> wrote:
>         >     >
>         >     >         On 9/27/2018 1:02 AM, Igor Ryzhov wrote:
>         >     >         > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com
>         <mailto:iryzhov@nfware.com>
>         >     <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>
>         >     >         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>
>         <mailto:iryzhov@nfware.com <mailto:iryzhov@nfware.com>>>>
>         >     >
>         >     >         Hi Igor,
>         >     >
>         >     >         What is the motivation to add this support? What is
>         enabled by this?
>         >     >
>         >     >
>         >     >         Meanwhile, why we are not using eth_header_ops, which is
>         already
>         >     set by
>         >     >         ether_setup().
>         >     >         To disable .cache & .cache_update?
>         >     >
>         >     >         If so why not using relevant eth_header_ops (eth_header,
>         >     >         eth_header_parse ..)
>         >     >         instead of implementing ours?
>         >     >
>         >     >         > ---
>         >     >         >  kernel/linux/kni/kni_net.c | 14 ++++++++++++++
>         >     >         >  1 file changed, 14 insertions(+)
>         >     >         >
>         >     >         > diff --git a/kernel/linux/kni/kni_net.c
>         b/kernel/linux/kni/kni_net.c
>         >     >         > index 7fcfa106c..128a5477c 100644
>         >     >         > --- a/kernel/linux/kni/kni_net.c
>         >     >         > +++ b/kernel/linux/kni/kni_net.c
>         >     >         > @@ -678,6 +678,19 @@ kni_net_header(struct sk_buff
>         *skb, struct
>         >     >         net_device *dev,
>         >     >         >       return dev->hard_header_len;
>         >     >         >  }
>         >     >         > 
>         >     >         > +/*
>         >     >         > + *  Extract hardware address from packet
>         >     >         > + */
>         >     >         > +static int
>         >     >         > +kni_net_header_parse(const struct sk_buff *skb,
>         unsigned char
>         >     *haddr)
>         >     >         > +{
>         >     >         > +     const struct ethhdr *eth = eth_hdr(skb);
>         >     >         > +
>         >     >         > +     memcpy(haddr, eth->h_source, ETH_ALEN);
>         >     >         > +
>         >     >         > +     return ETH_ALEN;
>         >     >         > +}
>         >     >         > +
>         >     >         >  /*
>         >     >         >   * Re-fill the eth header
>         >     >         >   */
>         >     >         > @@ -739,6 +752,7 @@ kni_net_change_carrier(struct
>         net_device *dev,
>         >     >         bool new_carrier)
>         >     >         > 
>         >     >         >  static const struct header_ops kni_net_header_ops = {
>         >     >         >       .create  = kni_net_header,
>         >     >         > +     .parse   = kni_net_header_parse,
>         >     >         >  #ifdef HAVE_REBUILD_HEADER
>         >     >         >       .rebuild = kni_net_rebuild_header,
>         >     >         >  #endif /* < 4.1.0  */
>         >     >         >
>         >     >
>         >
> 


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

* [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2018-09-27  0:02 [dpdk-dev] [PATCH] kni: implement header_ops parse method Igor Ryzhov
  2018-09-29  7:21 ` Stephen Hemminger
  2018-10-02 16:58 ` Ferruh Yigit
@ 2019-04-10 10:30 ` Igor Ryzhov
  2019-04-10 10:30   ` Igor Ryzhov
  2019-04-12 14:52   ` Ferruh Yigit
  2 siblings, 2 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-10 10:30 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

It allows applications running packet sockets over KNI interfaces to get
source Ethernet addresses of packets received using recvfrom function.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
---
v2:
Use eth_header_parse instead of own implementation.
---
 kernel/linux/kni/kni_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index be9e6b0b9..ad8365877 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -744,6 +744,7 @@ kni_net_change_carrier(struct net_device *dev, bool new_carrier)
 
 static const struct header_ops kni_net_header_ops = {
 	.create  = kni_net_header,
+	.parse   = eth_header_parse,
 #ifdef HAVE_REBUILD_HEADER
 	.rebuild = kni_net_rebuild_header,
 #endif /* < 4.1.0  */
-- 
2.21.0

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

* [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-10 10:30 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
@ 2019-04-10 10:30   ` Igor Ryzhov
  2019-04-12 14:52   ` Ferruh Yigit
  1 sibling, 0 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-10 10:30 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

It allows applications running packet sockets over KNI interfaces to get
source Ethernet addresses of packets received using recvfrom function.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
---
v2:
Use eth_header_parse instead of own implementation.
---
 kernel/linux/kni/kni_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index be9e6b0b9..ad8365877 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -744,6 +744,7 @@ kni_net_change_carrier(struct net_device *dev, bool new_carrier)
 
 static const struct header_ops kni_net_header_ops = {
 	.create  = kni_net_header,
+	.parse   = eth_header_parse,
 #ifdef HAVE_REBUILD_HEADER
 	.rebuild = kni_net_rebuild_header,
 #endif /* < 4.1.0  */
-- 
2.21.0


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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-10 10:30 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
  2019-04-10 10:30   ` Igor Ryzhov
@ 2019-04-12 14:52   ` Ferruh Yigit
  2019-04-12 14:52     ` Ferruh Yigit
                       ` (2 more replies)
  1 sibling, 3 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-12 14:52 UTC (permalink / raw)
  To: Igor Ryzhov, dev

On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> It allows applications running packet sockets over KNI interfaces to get
> source Ethernet addresses of packets received using recvfrom function.
> 
> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>


Hi Igor,

I tested this with a quick application on top of kni interfaces, that reads and
prints the 'sll_halen', but the last two bytes of the mac address are always
zero, it is quite possible that something is not right in the test app, but
before spending any time on it, can you please confirm this is working fine for you?

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 14:52   ` Ferruh Yigit
@ 2019-04-12 14:52     ` Ferruh Yigit
  2019-04-12 14:53     ` Ferruh Yigit
  2019-04-19 10:36     ` Thomas Monjalon
  2 siblings, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-12 14:52 UTC (permalink / raw)
  To: Igor Ryzhov, dev

On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> It allows applications running packet sockets over KNI interfaces to get
> source Ethernet addresses of packets received using recvfrom function.
> 
> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>


Hi Igor,

I tested this with a quick application on top of kni interfaces, that reads and
prints the 'sll_halen', but the last two bytes of the mac address are always
zero, it is quite possible that something is not right in the test app, but
before spending any time on it, can you please confirm this is working fine for you?

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 14:52   ` Ferruh Yigit
  2019-04-12 14:52     ` Ferruh Yigit
@ 2019-04-12 14:53     ` Ferruh Yigit
  2019-04-12 14:53       ` Ferruh Yigit
  2019-04-12 17:12       ` Igor Ryzhov
  2019-04-19 10:36     ` Thomas Monjalon
  2 siblings, 2 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-12 14:53 UTC (permalink / raw)
  To: Igor Ryzhov, dev

On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
> On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
>> It allows applications running packet sockets over KNI interfaces to get
>> source Ethernet addresses of packets received using recvfrom function.
>>
>> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> 
> Hi Igor,
> 
> I tested this with a quick application on top of kni interfaces, that reads and
> prints the 'sll_halen', but the last two bytes of the mac address are always

I mean 'sll_addr', 'sll_halen' is right (6).

> zero, it is quite possible that something is not right in the test app, but
> before spending any time on it, can you please confirm this is working fine for you?
> 

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 14:53     ` Ferruh Yigit
@ 2019-04-12 14:53       ` Ferruh Yigit
  2019-04-12 17:12       ` Igor Ryzhov
  1 sibling, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-12 14:53 UTC (permalink / raw)
  To: Igor Ryzhov, dev

On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
> On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
>> It allows applications running packet sockets over KNI interfaces to get
>> source Ethernet addresses of packets received using recvfrom function.
>>
>> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> 
> Hi Igor,
> 
> I tested this with a quick application on top of kni interfaces, that reads and
> prints the 'sll_halen', but the last two bytes of the mac address are always

I mean 'sll_addr', 'sll_halen' is right (6).

> zero, it is quite possible that something is not right in the test app, but
> before spending any time on it, can you please confirm this is working fine for you?
> 


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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 14:53     ` Ferruh Yigit
  2019-04-12 14:53       ` Ferruh Yigit
@ 2019-04-12 17:12       ` Igor Ryzhov
  2019-04-12 17:12         ` Igor Ryzhov
  2019-04-12 17:15         ` Ferruh Yigit
  1 sibling, 2 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-12 17:12 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

Hi Ferruh,

I didn't test it with any special application, but FRR's ISIS works for me
after the patch, and it didn't work before.

Igor

On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
> > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> >> It allows applications running packet sockets over KNI interfaces to get
> >> source Ethernet addresses of packets received using recvfrom function.
> >>
> >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> >
> > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >
> >
> > Hi Igor,
> >
> > I tested this with a quick application on top of kni interfaces, that
> reads and
> > prints the 'sll_halen', but the last two bytes of the mac address are
> always
>
> I mean 'sll_addr', 'sll_halen' is right (6).
>
> > zero, it is quite possible that something is not right in the test app,
> but
> > before spending any time on it, can you please confirm this is working
> fine for you?
> >
>
>

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 17:12       ` Igor Ryzhov
@ 2019-04-12 17:12         ` Igor Ryzhov
  2019-04-12 17:15         ` Ferruh Yigit
  1 sibling, 0 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-12 17:12 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

Hi Ferruh,

I didn't test it with any special application, but FRR's ISIS works for me
after the patch, and it didn't work before.

Igor

On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
> > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> >> It allows applications running packet sockets over KNI interfaces to get
> >> source Ethernet addresses of packets received using recvfrom function.
> >>
> >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> >
> > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >
> >
> > Hi Igor,
> >
> > I tested this with a quick application on top of kni interfaces, that
> reads and
> > prints the 'sll_halen', but the last two bytes of the mac address are
> always
>
> I mean 'sll_addr', 'sll_halen' is right (6).
>
> > zero, it is quite possible that something is not right in the test app,
> but
> > before spending any time on it, can you please confirm this is working
> fine for you?
> >
>
>

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 17:12       ` Igor Ryzhov
  2019-04-12 17:12         ` Igor Ryzhov
@ 2019-04-12 17:15         ` Ferruh Yigit
  2019-04-12 17:15           ` Ferruh Yigit
  2019-04-15  8:37           ` Igor Ryzhov
  1 sibling, 2 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-12 17:15 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev

On 4/12/2019 6:12 PM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> I didn't test it with any special application, but FRR's ISIS works for me after
> the patch, and it didn't work before.

That is good enough, and by work you mean that you are able to get correct value
on 'sll_addr', right?

> 
> Igor
> 
> On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
>     > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
>     >> It allows applications running packet sockets over KNI interfaces to get
>     >> source Ethernet addresses of packets received using recvfrom function.
>     >>
>     >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com <mailto:iryzhov@nfware.com>>
>     >
>     > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>>
>     >
>     >
>     > Hi Igor,
>     >
>     > I tested this with a quick application on top of kni interfaces, that
>     reads and
>     > prints the 'sll_halen', but the last two bytes of the mac address are always
> 
>     I mean 'sll_addr', 'sll_halen' is right (6).
> 
>     > zero, it is quite possible that something is not right in the test app, but
>     > before spending any time on it, can you please confirm this is working
>     fine for you?
>     >
> 

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 17:15         ` Ferruh Yigit
@ 2019-04-12 17:15           ` Ferruh Yigit
  2019-04-15  8:37           ` Igor Ryzhov
  1 sibling, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-12 17:15 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev

On 4/12/2019 6:12 PM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> I didn't test it with any special application, but FRR's ISIS works for me after
> the patch, and it didn't work before.

That is good enough, and by work you mean that you are able to get correct value
on 'sll_addr', right?

> 
> Igor
> 
> On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
>     > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
>     >> It allows applications running packet sockets over KNI interfaces to get
>     >> source Ethernet addresses of packets received using recvfrom function.
>     >>
>     >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com <mailto:iryzhov@nfware.com>>
>     >
>     > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>>
>     >
>     >
>     > Hi Igor,
>     >
>     > I tested this with a quick application on top of kni interfaces, that
>     reads and
>     > prints the 'sll_halen', but the last two bytes of the mac address are always
> 
>     I mean 'sll_addr', 'sll_halen' is right (6).
> 
>     > zero, it is quite possible that something is not right in the test app, but
>     > before spending any time on it, can you please confirm this is working
>     fine for you?
>     >
> 


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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 17:15         ` Ferruh Yigit
  2019-04-12 17:15           ` Ferruh Yigit
@ 2019-04-15  8:37           ` Igor Ryzhov
  2019-04-15  8:37             ` Igor Ryzhov
  2019-04-15 15:49             ` Ferruh Yigit
  1 sibling, 2 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-15  8:37 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

Hi Ferruh,

To be absolutely sure, I performed a test using the test application.

When I send pings from an interface:
3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:c8:79:c6 brd ff:ff:ff:ff:ff:ff

Here is what's in sockaddr_ll:
$2 = {sll_family = 0x11, sll_protocol = 0x8, sll_ifindex = 0x2, sll_hatype
= 0x1, sll_pkttype = 0x0, sll_halen = 0x6, sll_addr = {
    0x52, 0x54, 0x0, 0xc8, 0x79, 0xc6, 0x0, 0x0}}

So everything works as expected – the address in sll_addr is correct.
Last two bytes are zero because the length of sll_addr is 8, however,
Ethernet length is 6.

Igor

On Fri, Apr 12, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/12/2019 6:12 PM, Igor Ryzhov wrote:
> > Hi Ferruh,
> >
> > I didn't test it with any special application, but FRR's ISIS works for
> me after
> > the patch, and it didn't work before.
>
> That is good enough, and by work you mean that you are able to get correct
> value
> on 'sll_addr', right?
>
> >
> > Igor
> >
> > On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >     On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
> >     > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> >     >> It allows applications running packet sockets over KNI interfaces
> to get
> >     >> source Ethernet addresses of packets received using recvfrom
> function.
> >     >>
> >     >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com <mailto:
> iryzhov@nfware.com>>
> >     >
> >     > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com
> >     <mailto:ferruh.yigit@intel.com>>
> >     >
> >     >
> >     > Hi Igor,
> >     >
> >     > I tested this with a quick application on top of kni interfaces,
> that
> >     reads and
> >     > prints the 'sll_halen', but the last two bytes of the mac address
> are always
> >
> >     I mean 'sll_addr', 'sll_halen' is right (6).
> >
> >     > zero, it is quite possible that something is not right in the test
> app, but
> >     > before spending any time on it, can you please confirm this is
> working
> >     fine for you?
> >     >
> >
>
>

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-15  8:37           ` Igor Ryzhov
@ 2019-04-15  8:37             ` Igor Ryzhov
  2019-04-15 15:49             ` Ferruh Yigit
  1 sibling, 0 replies; 31+ messages in thread
From: Igor Ryzhov @ 2019-04-15  8:37 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

Hi Ferruh,

To be absolutely sure, I performed a test using the test application.

When I send pings from an interface:
3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:c8:79:c6 brd ff:ff:ff:ff:ff:ff

Here is what's in sockaddr_ll:
$2 = {sll_family = 0x11, sll_protocol = 0x8, sll_ifindex = 0x2, sll_hatype
= 0x1, sll_pkttype = 0x0, sll_halen = 0x6, sll_addr = {
    0x52, 0x54, 0x0, 0xc8, 0x79, 0xc6, 0x0, 0x0}}

So everything works as expected – the address in sll_addr is correct.
Last two bytes are zero because the length of sll_addr is 8, however,
Ethernet length is 6.

Igor

On Fri, Apr 12, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:

> On 4/12/2019 6:12 PM, Igor Ryzhov wrote:
> > Hi Ferruh,
> >
> > I didn't test it with any special application, but FRR's ISIS works for
> me after
> > the patch, and it didn't work before.
>
> That is good enough, and by work you mean that you are able to get correct
> value
> on 'sll_addr', right?
>
> >
> > Igor
> >
> > On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >     On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
> >     > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> >     >> It allows applications running packet sockets over KNI interfaces
> to get
> >     >> source Ethernet addresses of packets received using recvfrom
> function.
> >     >>
> >     >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com <mailto:
> iryzhov@nfware.com>>
> >     >
> >     > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com
> >     <mailto:ferruh.yigit@intel.com>>
> >     >
> >     >
> >     > Hi Igor,
> >     >
> >     > I tested this with a quick application on top of kni interfaces,
> that
> >     reads and
> >     > prints the 'sll_halen', but the last two bytes of the mac address
> are always
> >
> >     I mean 'sll_addr', 'sll_halen' is right (6).
> >
> >     > zero, it is quite possible that something is not right in the test
> app, but
> >     > before spending any time on it, can you please confirm this is
> working
> >     fine for you?
> >     >
> >
>
>

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-15  8:37           ` Igor Ryzhov
  2019-04-15  8:37             ` Igor Ryzhov
@ 2019-04-15 15:49             ` Ferruh Yigit
  2019-04-15 15:49               ` Ferruh Yigit
  1 sibling, 1 reply; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-15 15:49 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev

On 4/15/2019 9:37 AM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> To be absolutely sure, I performed a test using the test application.
> 
> When I send pings from an interface:
> 3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
> UP mode DEFAULT group default qlen 1000
>     link/ether 52:54:00:c8:79:c6 brd ff:ff:ff:ff:ff:ff
> 
> Here is what's in sockaddr_ll:
> $2 = {sll_family = 0x11, sll_protocol = 0x8, sll_ifindex = 0x2, sll_hatype
> = 0x1, sll_pkttype = 0x0, sll_halen = 0x6, sll_addr = {
>     0x52, 0x54, 0x0, 0xc8, 0x79, 0xc6, 0x0, 0x0}}
> 
> So everything works as expected – the address in sll_addr is correct.
> Last two bytes are zero because the length of sll_addr is 8, however,
> Ethernet length is 6.

Perfect, thanks for confirming, I am OK with the patch.


For my case sll_halen = 0x6 but only first 4 byte of the sll_addr was the valid,
so it was not the issue of size of sll_addr being 8, anyway it was quick dirty
app, something should be wrong, I believe not need to dig it more.

> 
> Igor
> 
> On Fri, Apr 12, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> On 4/12/2019 6:12 PM, Igor Ryzhov wrote:
>>> Hi Ferruh,
>>>
>>> I didn't test it with any special application, but FRR's ISIS works for
>> me after
>>> the patch, and it didn't work before.
>>
>> That is good enough, and by work you mean that you are able to get correct
>> value
>> on 'sll_addr', right?
>>
>>>
>>> Igor
>>>
>>> On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com
>>> <mailto:ferruh.yigit@intel.com>> wrote:
>>>
>>>     On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
>>>     > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
>>>     >> It allows applications running packet sockets over KNI interfaces
>> to get
>>>     >> source Ethernet addresses of packets received using recvfrom
>> function.
>>>     >>
>>>     >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com <mailto:
>> iryzhov@nfware.com>>
>>>     >
>>>     > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com
>>>     <mailto:ferruh.yigit@intel.com>>
>>>     >
>>>     >
>>>     > Hi Igor,
>>>     >
>>>     > I tested this with a quick application on top of kni interfaces,
>> that
>>>     reads and
>>>     > prints the 'sll_halen', but the last two bytes of the mac address
>> are always
>>>
>>>     I mean 'sll_addr', 'sll_halen' is right (6).
>>>
>>>     > zero, it is quite possible that something is not right in the test
>> app, but
>>>     > before spending any time on it, can you please confirm this is
>> working
>>>     fine for you?
>>>     >
>>>
>>
>>

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-15 15:49             ` Ferruh Yigit
@ 2019-04-15 15:49               ` Ferruh Yigit
  0 siblings, 0 replies; 31+ messages in thread
From: Ferruh Yigit @ 2019-04-15 15:49 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev

On 4/15/2019 9:37 AM, Igor Ryzhov wrote:
> Hi Ferruh,
> 
> To be absolutely sure, I performed a test using the test application.
> 
> When I send pings from an interface:
> 3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
> UP mode DEFAULT group default qlen 1000
>     link/ether 52:54:00:c8:79:c6 brd ff:ff:ff:ff:ff:ff
> 
> Here is what's in sockaddr_ll:
> $2 = {sll_family = 0x11, sll_protocol = 0x8, sll_ifindex = 0x2, sll_hatype
> = 0x1, sll_pkttype = 0x0, sll_halen = 0x6, sll_addr = {
>     0x52, 0x54, 0x0, 0xc8, 0x79, 0xc6, 0x0, 0x0}}
> 
> So everything works as expected – the address in sll_addr is correct.
> Last two bytes are zero because the length of sll_addr is 8, however,
> Ethernet length is 6.

Perfect, thanks for confirming, I am OK with the patch.


For my case sll_halen = 0x6 but only first 4 byte of the sll_addr was the valid,
so it was not the issue of size of sll_addr being 8, anyway it was quick dirty
app, something should be wrong, I believe not need to dig it more.

> 
> Igor
> 
> On Fri, Apr 12, 2019 at 8:15 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
>> On 4/12/2019 6:12 PM, Igor Ryzhov wrote:
>>> Hi Ferruh,
>>>
>>> I didn't test it with any special application, but FRR's ISIS works for
>> me after
>>> the patch, and it didn't work before.
>>
>> That is good enough, and by work you mean that you are able to get correct
>> value
>> on 'sll_addr', right?
>>
>>>
>>> Igor
>>>
>>> On Fri, Apr 12, 2019 at 5:53 PM Ferruh Yigit <ferruh.yigit@intel.com
>>> <mailto:ferruh.yigit@intel.com>> wrote:
>>>
>>>     On 4/12/2019 3:52 PM, Ferruh Yigit wrote:
>>>     > On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
>>>     >> It allows applications running packet sockets over KNI interfaces
>> to get
>>>     >> source Ethernet addresses of packets received using recvfrom
>> function.
>>>     >>
>>>     >> Signed-off-by: Igor Ryzhov <iryzhov@nfware.com <mailto:
>> iryzhov@nfware.com>>
>>>     >
>>>     > Acked-by: Ferruh Yigit <ferruh.yigit@intel.com
>>>     <mailto:ferruh.yigit@intel.com>>
>>>     >
>>>     >
>>>     > Hi Igor,
>>>     >
>>>     > I tested this with a quick application on top of kni interfaces,
>> that
>>>     reads and
>>>     > prints the 'sll_halen', but the last two bytes of the mac address
>> are always
>>>
>>>     I mean 'sll_addr', 'sll_halen' is right (6).
>>>
>>>     > zero, it is quite possible that something is not right in the test
>> app, but
>>>     > before spending any time on it, can you please confirm this is
>> working
>>>     fine for you?
>>>     >
>>>
>>
>>


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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-12 14:52   ` Ferruh Yigit
  2019-04-12 14:52     ` Ferruh Yigit
  2019-04-12 14:53     ` Ferruh Yigit
@ 2019-04-19 10:36     ` Thomas Monjalon
  2019-04-19 10:36       ` Thomas Monjalon
  2 siblings, 1 reply; 31+ messages in thread
From: Thomas Monjalon @ 2019-04-19 10:36 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Ferruh Yigit

12/04/2019 16:52, Ferruh Yigit:
> On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> > It allows applications running packet sockets over KNI interfaces to get
> > source Ethernet addresses of packets received using recvfrom function.
> > 
> > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

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

* Re: [dpdk-dev] [PATCH v2] kni: implement header_ops parse method
  2019-04-19 10:36     ` Thomas Monjalon
@ 2019-04-19 10:36       ` Thomas Monjalon
  0 siblings, 0 replies; 31+ messages in thread
From: Thomas Monjalon @ 2019-04-19 10:36 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: dev, Ferruh Yigit

12/04/2019 16:52, Ferruh Yigit:
> On 4/10/2019 11:30 AM, Igor Ryzhov wrote:
> > It allows applications running packet sockets over KNI interfaces to get
> > source Ethernet addresses of packets received using recvfrom function.
> > 
> > Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks



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

end of thread, other threads:[~2019-04-19 10:36 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-27  0:02 [dpdk-dev] [PATCH] kni: implement header_ops parse method Igor Ryzhov
2018-09-29  7:21 ` Stephen Hemminger
2018-09-29 19:19   ` Igor Ryzhov
2018-09-30  8:22     ` Igor Ryzhov
2018-10-02 16:58 ` Ferruh Yigit
2018-11-30 19:07   ` Igor Ryzhov
2019-01-24  9:18     ` Igor Ryzhov
2019-01-24 14:10       ` Ferruh Yigit
2019-01-24 16:35         ` Igor Ryzhov
2019-01-24 17:15           ` Ferruh Yigit
2019-01-24 18:05             ` Igor Ryzhov
2019-04-08 16:59               ` Igor Ryzhov
2019-04-08 16:59                 ` Igor Ryzhov
2019-04-09 20:30                 ` Ferruh Yigit
2019-04-09 20:30                   ` Ferruh Yigit
2019-04-10 10:30 ` [dpdk-dev] [PATCH v2] " Igor Ryzhov
2019-04-10 10:30   ` Igor Ryzhov
2019-04-12 14:52   ` Ferruh Yigit
2019-04-12 14:52     ` Ferruh Yigit
2019-04-12 14:53     ` Ferruh Yigit
2019-04-12 14:53       ` Ferruh Yigit
2019-04-12 17:12       ` Igor Ryzhov
2019-04-12 17:12         ` Igor Ryzhov
2019-04-12 17:15         ` Ferruh Yigit
2019-04-12 17:15           ` Ferruh Yigit
2019-04-15  8:37           ` Igor Ryzhov
2019-04-15  8:37             ` Igor Ryzhov
2019-04-15 15:49             ` Ferruh Yigit
2019-04-15 15:49               ` Ferruh Yigit
2019-04-19 10:36     ` Thomas Monjalon
2019-04-19 10:36       ` Thomas Monjalon

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).