From: Igor Ryzhov <iryzhov@nfware.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] kni: implement header_ops parse method
Date: Sun, 30 Sep 2018 11:22:40 +0300 [thread overview]
Message-ID: <CAF+s_Fx+VmO7D2JYLX1aQoCQHR6gCqSvWWK0VamR8TxoyR4ONQ@mail.gmail.com> (raw)
In-Reply-To: <CAF+s_FwqhOt0kc7uGd5Eaodj1LavWoVS1owEFdFxoYfwXWe0vg@mail.gmail.com>
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.
>>
>
next prev parent reply other threads:[~2018-09-30 8:22 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 0:02 Igor Ryzhov
2018-09-29 7:21 ` Stephen Hemminger
2018-09-29 19:19 ` Igor Ryzhov
2018-09-30 8:22 ` Igor Ryzhov [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAF+s_Fx+VmO7D2JYLX1aQoCQHR6gCqSvWWK0VamR8TxoyR4ONQ@mail.gmail.com \
--to=iryzhov@nfware.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).