Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread Johannes Berg
On Tue, 2017-04-11 at 13:42 -0400, David Miller wrote: > > Then, the library needs to be extended to enable this handling to > > modify the way it needs to handle errors, together with the > > setsockopt(). So I'd tend to agree, but * it was easy to solve this, with the flags I added * the

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread David Ahern
On 4/11/17 1:05 PM, David Miller wrote: > From: David Ahern > Date: Tue, 11 Apr 2017 12:57:59 -0600 > >> On 4/11/17 11:42 AM, David Miller wrote: >>> David, if you have a specific case where it's absolutely impossible >>> to resolve this when the library is converted to

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread David Miller
From: David Ahern Date: Tue, 11 Apr 2017 12:57:59 -0600 > On 4/11/17 11:42 AM, David Miller wrote: >> David, if you have a specific case where it's absolutely impossible >> to resolve this when the library is converted to support extended >> ACKs, please mention it. >

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread David Ahern
On 4/11/17 11:42 AM, David Miller wrote: > David, if you have a specific case where it's absolutely impossible > to resolve this when the library is converted to support extended > ACKs, please mention it. I don't have a specific library in mind. It is more the disjoint nature of a socket option

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread David Miller
From: Pablo Neira Ayuso Date: Tue, 11 Apr 2017 19:31:43 +0200 > On Tue, Apr 11, 2017 at 08:25:57AM -0600, David Ahern wrote: >> On 4/11/17 1:02 AM, Johannes Berg wrote: >> > On Tue, 2017-04-11 at 08:59 +0200, Pablo Neira Ayuso wrote: >> >> CAP_ACK means: trim off the payload

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread Pablo Neira Ayuso
On Tue, Apr 11, 2017 at 08:25:57AM -0600, David Ahern wrote: > On 4/11/17 1:02 AM, Johannes Berg wrote: > > On Tue, 2017-04-11 at 08:59 +0200, Pablo Neira Ayuso wrote: > >> CAP_ACK means: trim off the payload that the netlink error message > >> is embedding, just like ICMP error does. > >> > >>

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread David Ahern
On 4/11/17 1:02 AM, Johannes Berg wrote: > On Tue, 2017-04-11 at 08:59 +0200, Pablo Neira Ayuso wrote: >> CAP_ACK means: trim off the payload that the netlink error message >> is embedding, just like ICMP error does. >> >> What is exactly your concern? If the user explicitly requests this >> via

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread Johannes Berg
On Tue, 2017-04-11 at 08:59 +0200, Pablo Neira Ayuso wrote: > CAP_ACK means: trim off the payload that the netlink error message > is embedding, just like ICMP error does. > > What is exactly your concern? If the user explicitly requests this > via socket option for this socket, then we're

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-11 Thread Pablo Neira Ayuso
On Mon, Apr 10, 2017 at 09:35:27AM -0600, David Ahern wrote: > On 4/10/17 9:30 AM, Johannes Berg wrote: > > On Mon, 2017-04-10 at 09:26 -0600, David Ahern wrote: > >> On 4/8/17 2:24 PM, Johannes Berg wrote: > >>> @@ -2300,14 +2332,35 @@ void netlink_ack(struct sk_buff *in_skb, > >>> struct

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread Johannes Berg
On Mon, 2017-04-10 at 17:40 +0200, Johannes Berg wrote: > > Another thought: if we add a new flag that indicates "message has > been capped", which we introduce in this same patch, then we can > disentangle this more easily, right? > > Adding a new flag for "TLVs present" won't really help, but

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread Johannes Berg
On Mon, 2017-04-10 at 09:35 -0600, David Ahern wrote: > > Do you have any better ideas? > > NETLINK_F_CAP_ACK and NETLINK_F_EXT_ACK should be incompatible -- if > one is set the other can not be set. CAP_ACK means abbreviate the > response and EXT_ACK means give me more data. So you mean if I

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread David Ahern
On 4/10/17 9:30 AM, Johannes Berg wrote: > On Mon, 2017-04-10 at 09:26 -0600, David Ahern wrote: >> On 4/8/17 2:24 PM, Johannes Berg wrote: >>> @@ -2300,14 +2332,35 @@ void netlink_ack(struct sk_buff *in_skb, >>> struct nlmsghdr *nlh, int err) >>> NLMSG_ERROR, payload, 0);

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread Johannes Berg
On Mon, 2017-04-10 at 09:26 -0600, David Ahern wrote: > On 4/8/17 2:24 PM, Johannes Berg wrote: > > @@ -2300,14 +2332,35 @@ void netlink_ack(struct sk_buff *in_skb, > > struct nlmsghdr *nlh, int err) > >     NLMSG_ERROR, payload, 0); > >   errmsg = nlmsg_data(rep); > >  

Re: [PATCH v3 1/5] netlink: extended ACK reporting

2017-04-10 Thread David Ahern
On 4/8/17 2:24 PM, Johannes Berg wrote: > @@ -2300,14 +2332,35 @@ void netlink_ack(struct sk_buff *in_skb, struct > nlmsghdr *nlh, int err) > NLMSG_ERROR, payload, 0); > errmsg = nlmsg_data(rep); > errmsg->error = err; > - memcpy(>msg, nlh, payload >