linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Štefan Gula" <steweg@ynet.sk>
To: David Miller <davem@davemloft.net>
Cc: kaber@trash.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch v3, kernel version 3.2.1] Source mode for macvlan interface
Date: Wed, 25 Jan 2012 07:22:43 +0100	[thread overview]
Message-ID: <CAGsizzLHT6jK8zJn+5eJkTUt5NBdpK9uNHJTzDCPrbCcPBvBNA@mail.gmail.com> (raw)
In-Reply-To: <20120124.230354.1696063062900108959.davem@davemloft.net>

2012/1/25 David Miller <davem@davemloft.net>:
> From: Stefan Gula <steweg@ynet.sk>
> Date: Tue, 24 Jan 2012 15:55:53 +0100 (CET)
>
>> diff -uprN -X linux/Documentation/dontdiff linux-3.2.1-orig/net/core/rtnetlink.c linux/net/core/rtnetlink.c
>> --- linux-3.2.1-orig/net/core/rtnetlink.c     2012-01-12 20:42:45.000000000 +0100
>> +++ linux/net/core/rtnetlink.c        2012-01-24 14:26:58.083219352 +0100
>> @@ -1506,6 +1506,9 @@ errout:
>>
>>       if (send_addr_notify)
>>               call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
>> +     min_ifinfo_dump_size = max_t(u16, if_nlmsg_size(dev),
>> +                                     min_ifinfo_dump_size);
>> +
>
> What is this?  And whatever it is why isn't it 1) described in the
> commit message and why isn't it 2) in a seperate patch if it's
> unrelated to this macvlan change?
>
> I'm not apply this patch as it is right now, it needs some sort of
> change.
>
It's a result of need to have enough space allocated for sk_buff
struct before called macvlan_fill_info. I know that it looks somehow
messy. BUt before the macvlan_fill_info is called there is only one
procedure calcit. The problem of calcit is that it doesn't have access
to struct net_device *dev int it. It has only access to struct sk_buff
*skb, so from that point it cannot be called directly (whole parsing
code had to be copied there to get the *dev a calling
if_nlmsg_size(dev) from it. On the other hand calcit returns global
static value of min_ifinfo_dump_size and that is shared among all
interfaces and modifying like this do the job properly. There was
another different way and that was creating and registering a whole
new PF_MACLVAN netlink group resulting in copying almost 95% percent
of given code and modified it somehow to do the same.

If it should be result of separate commitment than ok, but it was
result apparently of need only for use of macvlan that's why it was
included in my patch.

So how should I proceed with it?

  reply	other threads:[~2012-01-25  6:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <12446987.2261327416407141.JavaMail.root@5-MeO-DMT.ynet.sk>
2012-01-24 14:55 ` [patch v3, kernel version 3.2.1] Source mode for macvlan interface Stefan Gula
2012-01-25  4:03   ` David Miller
2012-01-25  6:22     ` Štefan Gula [this message]
2012-01-25  6:29       ` Eric Dumazet
2012-01-25  6:56         ` Štefan Gula

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=CAGsizzLHT6jK8zJn+5eJkTUt5NBdpK9uNHJTzDCPrbCcPBvBNA@mail.gmail.com \
    --to=steweg@ynet.sk \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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).