* Re: Fwd: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS [not found] ` <AM0PR05MB4642B7A28497C98DDE5338B0EC689@AM0PR05MB4642.eurprd05.prod.outlook.com> @ 2021-03-20 17:22 ` Oliver Hartkopp 0 siblings, 0 replies; 5+ messages in thread From: Oliver Hartkopp @ 2021-03-20 17:22 UTC (permalink / raw) To: Alejandro Colomar (man-pages), netdev Hi Alejandro, we added IFF_ECHO these days on suggestion of Dave Miller - and the IFF_LOWER_UP/IFF_DORMANT were already there at that time. I don't know if there ioctls are still used for retrieving these flags as I assume this is done via netlink interface today. At least there is enough space (in the union) in the ioctl structure for longer data structures: https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/if.h#L265 https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/if.h#L247 https://elixir.bootlin.com/linux/latest/source/net/core/dev_ioctl.c#L114 If you continue discussing about this topic, please remove the Volkswagen mail addresses from Urs and me. I'm still maintaining the CAN subsystem in the Linux kernel - but with a private mail address. And you should better add the netdev ML to your recipients netdev@vger.kernel.org where all the netdev guys (including Dave Miller) hang out. Best, Oliver > > ------------------------------------------------------------------------ > *Von:* Alejandro Colomar (man-pages) <alx.manpages@gmail.com> > *Gesendet:* Freitag, März 19, 2021 9:00 PM > *An:* Erik Flodin; mtk.manpages@gmail.com > *Cc:* linux-man@vger.kernel.org; Stefan Rompf; David S. Miller; Fredrik > Arnerup; John Dykstra; David S. Miller; Hartkopp, Oliver, Dr. (EESC/3); > Thuermann, Urs, Dr. (K-AERD/M) > *Betreff:* Re: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS > [CC += Fredrik, John, David S., Steven, Oliver, Urs] > > Hi, > > On 3/17/21 3:12 PM, Erik Flodin wrote: >> Hi, >> >> The documentation for SIOCGIFFLAGS/SIOCSIFFLAGS in netdevice.7 lists >> IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, but those can't be set in >> ifr_flags as it is only a short and the flags start at 1<<16. >> >> See also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c> >> > > I don't know what's the history of that. > I researched a bit, and while the struct member is indeed a 'short' [1], > the flags were added to the kernel for some reason. > I added a few people to the thread that may know better what to do.Let's > see if they can comment. > > Links to relevant commits: > > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c>> > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b00055aacdb172c05067612278ba27265fcd05ce > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b00055aacdb172c05067612278ba27265fcd05ce>> > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd05acfe65ed2cf2db683fa9a6adb8d35635263b > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd05acfe65ed2cf2db683fa9a6adb8d35635263b>> > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=6ecda4d14604d250d385346f4fe9de707f281759 > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=6ecda4d14604d250d385346f4fe9de707f281759>> > > Thanks, > > Alex > > [1]: > > .../linux$ sed -n '/struct ifreq {/,/};/p' include/uapi/linux/if.h > struct ifreq { > #define IFHWADDRLEN 6 > union > { > char ifrn_name[IFNAMSIZ]; /* if name, > e.g. "en0" */ > } ifr_ifrn; > > union { > struct sockaddr ifru_addr; > struct sockaddr ifru_dstaddr; > struct sockaddr ifru_broadaddr; > struct sockaddr ifru_netmask; > struct sockaddr ifru_hwaddr; > short ifru_flags; > int ifru_ivalue; > int ifru_mtu; > struct ifmap ifru_map; > char ifru_slave[IFNAMSIZ]; /* Just fits the size */ > char ifru_newname[IFNAMSIZ]; > void __user * ifru_data; > struct if_settings ifru_settings; > } ifr_ifru; > }; > .../linux$ grep 'define\sifr_flags' include/uapi/linux/if.h > #define ifr_flags ifr_ifru.ifru_flags /* flags */ > .../linux$ > > -- > Alejandro Colomar > Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ > <https://www.kernel.org/doc/man-pages/> > http://www.alejandro-colomar.es/ <http://www.alejandro-colomar.es/> ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAAMKmodhSsckMxH9jLKKwXN_B76RoLmDttbq5X9apE-eCo0hag@mail.gmail.com>]
* Re: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS [not found] ` <CAAMKmodhSsckMxH9jLKKwXN_B76RoLmDttbq5X9apE-eCo0hag@mail.gmail.com> @ 2021-04-14 19:56 ` Alejandro Colomar (man-pages) 2021-04-29 19:45 ` Erik Flodin 0 siblings, 1 reply; 5+ messages in thread From: Alejandro Colomar (man-pages) @ 2021-04-14 19:56 UTC (permalink / raw) To: Erik Flodin Cc: mtk.manpages, linux-man, Stefan Rompf, David S. Miller, Fredrik Arnerup, John Dykstra, Oliver Hartkopp, Urs Thuermann, netdev [CC += netdev] Hi Erik, On 4/14/21 8:52 PM, Erik Flodin wrote: > Hi, > > On Fri, 19 Mar 2021 at 20:53, Alejandro Colomar (man-pages) > <alx.manpages@gmail.com> wrote: >> On 3/17/21 3:12 PM, Erik Flodin wrote: >>> The documentation for SIOCGIFFLAGS/SIOCSIFFLAGS in netdevice.7 lists >>> IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, but those can't be set in >>> ifr_flags as it is only a short and the flags start at 1<<16. >>> >>> See also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c >>> >> >> I don't know what's the history of that. > > Judging from commit message in the commit linked above it was added by > mistake. As noted the flags are accessible via netlink, just not via > SIOCGIFFLAGS. > > // Erik > I should have CCd netdev@ before. Thanks for the update. Let's see if anyone there can comment. Thanks, Alex -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS 2021-04-14 19:56 ` Alejandro Colomar (man-pages) @ 2021-04-29 19:45 ` Erik Flodin 2021-04-30 19:32 ` Alejandro Colomar (man-pages) 0 siblings, 1 reply; 5+ messages in thread From: Erik Flodin @ 2021-04-29 19:45 UTC (permalink / raw) To: Alejandro Colomar (man-pages) Cc: mtk.manpages, linux-man, Stefan Rompf, David S. Miller, John Dykstra, netdev Hi again, Have there been any updates on this one? // Erik On Wed, 14 Apr 2021 at 21:56, Alejandro Colomar (man-pages) <alx.manpages@gmail.com> wrote: > > [CC += netdev] > > Hi Erik, > > On 4/14/21 8:52 PM, Erik Flodin wrote: > > Hi, > > > > On Fri, 19 Mar 2021 at 20:53, Alejandro Colomar (man-pages) > > <alx.manpages@gmail.com> wrote: > >> On 3/17/21 3:12 PM, Erik Flodin wrote: > >>> The documentation for SIOCGIFFLAGS/SIOCSIFFLAGS in netdevice.7 lists > >>> IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, but those can't be set in > >>> ifr_flags as it is only a short and the flags start at 1<<16. > >>> > >>> See also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c > >>> > >> > >> I don't know what's the history of that. > > > > Judging from commit message in the commit linked above it was added by > > mistake. As noted the flags are accessible via netlink, just not via > > SIOCGIFFLAGS. > > > > // Erik > > > > I should have CCd netdev@ before. Thanks for the update. Let's see if > anyone there can comment. > > Thanks, > > Alex > > > -- > Alejandro Colomar > Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ > http://www.alejandro-colomar.es/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS 2021-04-29 19:45 ` Erik Flodin @ 2021-04-30 19:32 ` Alejandro Colomar (man-pages) [not found] ` <CAAMKmocBEr05EfidF9CfqJQw4uj1YcYwmkJPR=c0eCCYgsAHwg@mail.gmail.com> 0 siblings, 1 reply; 5+ messages in thread From: Alejandro Colomar (man-pages) @ 2021-04-30 19:32 UTC (permalink / raw) To: Erik Flodin, mtk.manpages Cc: linux-man, Stefan Rompf, David S. Miller, John Dykstra, netdev, linux-kernel [PING mtk, netdev@] [CC += linux-kernel] Hi Erik, On 4/29/21 9:45 PM, Erik Flodin wrote: > On Wed, 14 Apr 2021 at 21:56, Alejandro Colomar (man-pages) > <alx.manpages@gmail.com> wrote: >> >> [CC += netdev] >> >> Hi Erik, >> >> On 4/14/21 8:52 PM, Erik Flodin wrote: >>> Hi, >>> >>> On Fri, 19 Mar 2021 at 20:53, Alejandro Colomar (man-pages) >>> <alx.manpages@gmail.com> wrote: >>>> On 3/17/21 3:12 PM, Erik Flodin wrote: >>>>> The documentation for SIOCGIFFLAGS/SIOCSIFFLAGS in netdevice.7 lists >>>>> IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, but those can't be set in >>>>> ifr_flags as it is only a short and the flags start at 1<<16. >>>>> >>>>> See also https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c >>>>> >>>> >>>> I don't know what's the history of that. >>> >>> Judging from commit message in the commit linked above it was added by >>> mistake. As noted the flags are accessible via netlink, just not via >>> SIOCGIFFLAGS. >>> >>> // Erik >>> >> >> I should have CCd netdev@ before. Thanks for the update. Let's see if >> anyone there can comment. >> >> Thanks, >> >> Alex >> > Hi again, > > Have there been any updates on this one? No, Noone from the kernel answered. And I'm sorry, but I'm not sure what is going on in the code, so I don't want to close this here by just removing those flags from the manual page, because I worry that the actual code may be wrong or something. So I prefer that when Michael has some time he can maybe review this and say something. Ideally, someone from the kernel would also respond, but they haven't. I've CCd the LKML; let's see if someone reads this and can help. Thanks, Alex P.S.: Please, if we haven't responded in a month from now, ping us again. Thanks again. > > // Erik > >> >> -- >> Alejandro Colomar >> Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ >> http://www.alejandro-colomar.es/ -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/ ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAAMKmocBEr05EfidF9CfqJQw4uj1YcYwmkJPR=c0eCCYgsAHwg@mail.gmail.com>]
* Re: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS [not found] ` <CAAMKmocBEr05EfidF9CfqJQw4uj1YcYwmkJPR=c0eCCYgsAHwg@mail.gmail.com> @ 2021-11-12 21:01 ` Alejandro Colomar (man-pages) 0 siblings, 0 replies; 5+ messages in thread From: Alejandro Colomar (man-pages) @ 2021-11-12 21:01 UTC (permalink / raw) To: Erik Flodin Cc: mtk.manpages, linux-man, Stefan Rompf, David S. Miller, John Dykstra, netdev, linux-kernel Hi Erik, On 10/2/21 18:35, Erik Flodin wrote: > A bit more than a month has passed so here's a ping :) > > // Erik Thanks for the ping. alarm(3600 * 24 * 30); // :) > > On Fri, 30 Apr 2021 at 21:32, Alejandro Colomar (man-pages) > <alx.manpages@gmail.com <mailto:alx.manpages@gmail.com>> wrote: > > [PING mtk, netdev@] > [CC += linux-kernel] > > Hi Erik, > > On 4/29/21 9:45 PM, Erik Flodin wrote: > > On Wed, 14 Apr 2021 at 21:56, Alejandro Colomar (man-pages) > > <alx.manpages@gmail.com <mailto:alx.manpages@gmail.com>> wrote: > >> > >> [CC += netdev] > >> > >> Hi Erik, > >> > >> On 4/14/21 8:52 PM, Erik Flodin wrote: > >>> Hi, > >>> > >>> On Fri, 19 Mar 2021 at 20:53, Alejandro Colomar (man-pages) > >>> <alx.manpages@gmail.com <mailto:alx.manpages@gmail.com>> wrote: > >>>> On 3/17/21 3:12 PM, Erik Flodin wrote: > >>>>> The documentation for SIOCGIFFLAGS/SIOCSIFFLAGS in > netdevice.7 lists > >>>>> IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO, but those can't be set in > >>>>> ifr_flags as it is only a short and the flags start at 1<<16. > >>>>> > >>>>> See also > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=746e6ad23cd6fec2edce056e014a0eabeffa838c> > >>>>> > >>>> > >>>> I don't know what's the history of that. > >>> > >>> Judging from commit message in the commit linked above it was > added by > >>> mistake. As noted the flags are accessible via netlink, just > not via > >>> SIOCGIFFLAGS. > >>> > >>> // Erik > >>> > >> > >> I should have CCd netdev@ before. Thanks for the update. Let's > see if > >> anyone there can comment. > >> > >> Thanks, > >> > >> Alex > >> > > > Hi again, > > > > Have there been any updates on this one? > > No, Noone from the kernel answered. And I'm sorry, but I'm not sure > what is going on in the code, so I don't want to close this here by just > removing those flags from the manual page, because I worry that the > actual code may be wrong or something. So I prefer that when Michael > has some time he can maybe review this and say something. Ideally, > someone from the kernel would also respond, but they haven't. I've CCd > the LKML; let's see if someone reads this and can help. > > Thanks, > > Alex > > P.S.: Please, if we haven't responded in a month from now, ping us > again. Thanks again. > > > > > // Erik > > > >> > >> -- > >> Alejandro Colomar > >> Linux man-pages comaintainer; > https://www.kernel.org/doc/man-pages/ > <https://www.kernel.org/doc/man-pages/> > >> http://www.alejandro-colomar.es/ <http://www.alejandro-colomar.es/> > > -- > Alejandro Colomar > Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ > <https://www.kernel.org/doc/man-pages/> > http://www.alejandro-colomar.es/ <http://www.alejandro-colomar.es/> > -- Alejandro Colomar Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/ ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-12 21:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAAMKmof+Y+qrro7Ohd9FSw1bf+-tLMPzaTba-tVniAMY0zwTOQ@mail.gmail.com> [not found] ` <b0a534b3-9bdf-868e-1f28-8e32d31013a2@gmail.com> [not found] ` <AM0PR05MB4642B7A28497C98DDE5338B0EC689@AM0PR05MB4642.eurprd05.prod.outlook.com> 2021-03-20 17:22 ` Fwd: netdevice.7 SIOCGIFFLAGS/SIOCSIFFLAGS Oliver Hartkopp [not found] ` <CAAMKmodhSsckMxH9jLKKwXN_B76RoLmDttbq5X9apE-eCo0hag@mail.gmail.com> 2021-04-14 19:56 ` Alejandro Colomar (man-pages) 2021-04-29 19:45 ` Erik Flodin 2021-04-30 19:32 ` Alejandro Colomar (man-pages) [not found] ` <CAAMKmocBEr05EfidF9CfqJQw4uj1YcYwmkJPR=c0eCCYgsAHwg@mail.gmail.com> 2021-11-12 21:01 ` Alejandro Colomar (man-pages)
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).