Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-04-09 Thread Ferruh Yigit
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 > wrote: > > Hi Ferruh, > > Ok, no problem. Generally, it is needed for all applications using > packet(7) >

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-04-08 Thread Igor Ryzhov
Hi Ferruh, Can we proceed with this patch? Igor On Thu, Jan 24, 2019 at 9:05 PM Igor Ryzhov 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 FRR

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Igor Ryzhov
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 so

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Ferruh Yigit
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/la

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Igor Ryzhov
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

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Ferruh Yigit
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 thi

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2019-01-24 Thread Igor Ryzhov
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 wrote: > Hi Ferruh, > > header_ops.parse method is used by raw-socke

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-11-30 Thread Igor Ryzhov
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 bet

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-10-02 Thread Ferruh Yigit
On 9/27/2018 1:02 AM, Igor Ryzhov wrote: > Signed-off-by: Igor Ryzhov 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 rel

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-30 Thread Igor Ryzhov
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

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-29 Thread Igor Ryzhov
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 < step...@networkplumber.org> wrote: > On Thu, 27 Sep 2018 03:02:24 +0300 > Igor Ryzhov wrote: > > > +/* > > + * Extract hardwar

Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-29 Thread Stephen Hemminger
On Thu, 27 Sep 2018 03:02:24 +0300 Igor Ryzhov 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_

[dpdk-dev] [PATCH] kni: implement header_ops parse method

2018-09-26 Thread Igor Ryzhov
Signed-off-by: Igor Ryzhov --- 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,