Netdev List
 help / color / mirror / Atom feed
* Re: [patch net-next 2/2] net: sched: Move offload check till after dump call
From: Jiri Pirko @ 2017-12-27 11:52 UTC (permalink / raw)
  To: Nogah Frankel; +Cc: netdev, davem, jhs, xiyou.wangcong, mlxsw
In-Reply-To: <1514191902-53752-3-git-send-email-nogahf@mellanox.com>

Mon, Dec 25, 2017 at 09:51:42AM CET, nogahf@mellanox.com wrote:
>Move the check of the offload state to after the qdisc dump action was
>called, so the qdisc could update it if it was changed.
>
>Fixes: 7a4fa29106d9 ("net: sched: Add TCA_HW_OFFLOAD")
>Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
>Reviewed-by: Yuval Mintz <yuvalm@mellanox.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

^ permalink raw reply

* Re: [bpf-next V2 PATCH 05/14] xdp/qede: setup xdp_rxq_info and intro xdp_rxq_info_is_reg
From: Jesper Dangaard Brouer @ 2017-12-27 11:58 UTC (permalink / raw)
  To: Chopra, Manish
  Cc: Daniel Borkmann, Alexei Starovoitov, bjorn.topel@intel.com,
	netdev@vger.kernel.org, Elior, Ariel, dsahern@gmail.com,
	gospo@broadcom.com, Dept-Eng Everest Linux L2,
	michael.chan@broadcom.com, brouer
In-Reply-To: <BN3PR0701MB14125CF650672786CAA484BA89070@BN3PR0701MB1412.namprd07.prod.outlook.com>

On Wed, 27 Dec 2017 10:37:10 +0000
"Chopra, Manish" <Manish.Chopra@cavium.com> wrote:

> > -----Original Message-----
> > From: Jesper Dangaard Brouer [mailto:brouer@redhat.com]
> > Sent: Friday, December 22, 2017 10:42 PM
> > To: Daniel Borkmann <borkmann@iogearbox.net>; Alexei Starovoitov
> > <alexei.starovoitov@gmail.com>
> > Cc: bjorn.topel@intel.com; netdev@vger.kernel.org; Jesper Dangaard Brouer
> > <brouer@redhat.com>; Elior, Ariel <Ariel.Elior@cavium.com>;
> > dsahern@gmail.com; gospo@broadcom.com; Dept-Eng Everest Linux L2 <Dept-  
> > EngEverestLinuxL2@cavium.com>; michael.chan@broadcom.com  
> > Subject: [bpf-next V2 PATCH 05/14] xdp/qede: setup xdp_rxq_info and intro
> > xdp_rxq_info_is_reg
> > 
> > The driver code qede_free_fp_array() depend on kfree() can be called with a
> > NULL pointer. This stems from the qede_alloc_fp_array() function which either
> > (kz)alloc memory for fp->txq or fp->rxq.
> > This also simplifies error handling code in case of memory allocation failures,
> > but xdp_rxq_info_unreg need to know the difference.
> > 
> > Introduce xdp_rxq_info_is_reg() to handle if a memory allocation fails and
> > detect this is the failure path by seeing that xdp_rxq_info was not registred yet,
> > which first happens after successful alloaction in qede_init_fp().
> > 
> > Driver hook points for xdp_rxq_info:
> >  * reg  : qede_init_fp
> >  * unreg: qede_free_fp_array
> > 
> > Tested on actual hardware with samples/bpf program.
> > 
> > V2: Driver have no proper error path for failed XDP RX-queue info reg, as
> > qede_init_fp() is a void function.
> > 
> > Cc: everest-linux-l2@cavium.com
> > Cc: Ariel Elior <Ariel.Elior@cavium.com>
> > Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
> > ---
> >  drivers/net/ethernet/qlogic/qede/qede.h      |    2 ++
> >  drivers/net/ethernet/qlogic/qede/qede_fp.c   |    1 +
> >  drivers/net/ethernet/qlogic/qede/qede_main.c |   10 ++++++++++
> >  include/net/xdp.h                            |    1 +
> >  net/core/xdp.c                               |    6 ++++++
> >  5 files changed, 20 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/qlogic/qede/qede.h
> > b/drivers/net/ethernet/qlogic/qede/qede.h
> > index a3a70ade411f..62f47736511b 100644
> > --- a/drivers/net/ethernet/qlogic/qede/qede.h
> > +++ b/drivers/net/ethernet/qlogic/qede/qede.h
> > @@ -40,6 +40,7 @@
> >  #include <linux/kernel.h>
> >  #include <linux/mutex.h>
> >  #include <linux/bpf.h>
> > +#include <net/xdp.h>
> >  #include <linux/qed/qede_rdma.h>
> >  #include <linux/io.h>
> >  #ifdef CONFIG_RFS_ACCEL
> > @@ -345,6 +346,7 @@ struct qede_rx_queue {
> >  	u64 xdp_no_pass;
> > 
> >  	void *handle;
> > +	struct xdp_rxq_info xdp_rxq;
> >  };
> > 
> >  union db_prod {
> > diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c
> > b/drivers/net/ethernet/qlogic/qede/qede_fp.c
> > index 48ec4c56cddf..dafc079ab6b9 100644
> > --- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
> > +++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
> > @@ -1006,6 +1006,7 @@ static bool qede_rx_xdp(struct qede_dev *edev,
> >  	xdp.data = xdp.data_hard_start + *data_offset;
> >  	xdp_set_data_meta_invalid(&xdp);
> >  	xdp.data_end = xdp.data + *len;
> > +	xdp.rxq = &rxq->xdp_rxq;
> > 
> >  	/* Queues always have a full reset currently, so for the time
> >  	 * being until there's atomic program replace just mark read diff --git
> > a/drivers/net/ethernet/qlogic/qede/qede_main.c
> > b/drivers/net/ethernet/qlogic/qede/qede_main.c
> > index 57332b3e5e64..24160f1fd0e5 100644
> > --- a/drivers/net/ethernet/qlogic/qede/qede_main.c
> > +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
> > @@ -762,6 +762,12 @@ static void qede_free_fp_array(struct qede_dev *edev)
> >  			fp = &edev->fp_array[i];
> > 
> >  			kfree(fp->sb_info);
> > +			/* Handle mem alloc failure case where qede_init_fp
> > +			 * didn't register xdp_rxq_info yet.
> > +			 * Implicit only (fp->type & QEDE_FASTPATH_RX)
> > +			 */
> > +			if (fp->rxq && xdp_rxq_info_is_reg(&fp->rxq->xdp_rxq))
> > +				xdp_rxq_info_unreg(&fp->rxq->xdp_rxq);  
> 
> Isn't this sufficient just ?
> If (fp->rxq)
> 	xdp_rxq_info_unreg(&fp->rxq->xdp_rxq);

No, it is not sufficient.

Your driver have qede_alloc_fp_array() which for_each_queue (kz)alloc
memory.  If one of the memory allocations fail, then memory is
free'ed/"rolled-back" in qede_free_fp_array().  Thus, some of the
fp->rxq pointers will be allocated, but xdp_rxq_info_reg() have not
"registered" it yet.  Thus, this _is_ needed to correctly handle memory
failures.

> xdp_rxq_info_is_reg() API seems unnecessary to me,
> xdp_rxq_info_unreg() seems to be taking care of the case if it's not
> registered then WARN already, I think instead of adding these checks
> in individual drivers, better handle it properly in
> xdp_rxq_info_unreg() ?

The xdp_rxq_info_is_reg() API is needed in your driver, and I also found
a need for this in the Broadcom bnxt_en driver.


> >  			kfree(fp->rxq);
> >  			kfree(fp->xdp_tx);
> >  			kfree(fp->txq);
> > @@ -1498,6 +1504,10 @@ static void qede_init_fp(struct qede_dev *edev)
> >  			else
> >  				fp->rxq->data_direction =
> > DMA_FROM_DEVICE;
> >  			fp->rxq->dev = &edev->pdev->dev;
> > +
> > +			/* Driver have no error path from here */
> > +			WARN_ON(xdp_rxq_info_reg(&fp->rxq->xdp_rxq, edev-  
> > >ndev,  
> > +						 fp->rxq->rxq_id) < 0);
> >  		}  
> 
> We will reach to this point only when fp->rxq and edev are valid
> I don't think that xdp_rxq_info_reg() will fail ever in that case.

With the current implementation in xdp.c, I agree that this case will
never fail in your driver.  There is a clear expectation, that this API
will be extended (to support per RX-ring memory "return/free" API) and
that "will-never-fail" assumption will likely change...

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

^ permalink raw reply

* Re: [PATCH 1/3] staging: irda: fix type from "unsigned" to "unsigned int"
From: Greg KH @ 2017-12-27 12:45 UTC (permalink / raw)
  To: JI-HUN KIM
  Cc: samuel, devel, kernel-janitors, linux-kernel, shreeya.patel23498,
	netdev, davem
In-Reply-To: <20171227055250.GA32718@MacBook-Air>

On Tue, Dec 26, 2017 at 09:52:54PM -0800, JI-HUN KIM wrote:
> Clean up checkpatch warning:
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> 
> Signed-off-by: JI-HUN KIM <jihuun.k@gmail.com>
> ---
>  drivers/staging/irda/drivers/esi-sir.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Please read drivers/staging/irda/TODO

sorry.

greg k-h

^ permalink raw reply

* Re: BUG warnings in 4.14.9
From: Greg Kroah-Hartman @ 2017-12-27 12:57 UTC (permalink / raw)
  To: alexander.levin
  Cc: Ido Schimmel, Willy Tarreau, Wei Wang, Martin KaFai Lau,
	Eric Dumazet, David S. Miller, Chris Rankin,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	netdev@vger.kernel.org
In-Reply-To: <20171227042459.cm7hgti47rkmwf3d@sasha-lappy>

On Wed, Dec 27, 2017 at 04:25:00AM +0000, alexander.levin@verizon.com wrote:
> On Tue, Dec 26, 2017 at 10:54:37PM +0200, Ido Schimmel wrote:
> >On Tue, Dec 26, 2017 at 07:59:55PM +0100, Willy Tarreau wrote:
> >> Guys,
> >>
> >> Chris reported the bug below and confirmed that reverting commit
> >> 9704f81 (ipv6: grab rt->rt6i_ref before allocating pcpu rt) seems to
> >> have fixed the issue for him. This patch is a94b9367 in mainline.
> >>
> >> I personally have no opinion on the patch, just found it because it
> >> was the only one touching this area between 4.14.8 and 4.14.9 :-)
> >>
> >> Should this be reverted or maybe fixed differently ?
> >
> >Maybe I'm missing something, but how come this patch even made its way
> >into 4.14.y? It's part of a series to RCU-ify IPv6 FIB lookup that went
> >into 4.15.
> >
> >Anyway, the mentioned bug was already fixed by commit 951f788a80ff
> >("ipv6: fix a BUG in rt6_get_pcpu_route()") when the code was still in
> >net-next.
> 
> Uh, you're right. Greg, please just revert 9704f81. Thanks!

Now reverted, sorry about this.

greg k-h

^ permalink raw reply

* Re: [patch net-next v2 00/10] Add support for resource abstraction
From: Andrew Lunn @ 2017-12-27 13:08 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: David Ahern, netdev, davem, arkadis, mlxsw, vivien.didelot,
	f.fainelli, michael.chan, ganeshgr, saeedm, matanb, leonro,
	idosch, jakub.kicinski, ast, daniel, simon.horman,
	pieter.jansenvanvuuren, john.hurley, alexander.h.duyck, linville,
	gospo, steven.lin1, yuvalm, ogerlitz, roopa
In-Reply-To: <20171227093754.GB1997@nanopsycho>

> This is misunderstanding I believe. This is not about ABI. That is well
> defined by the netlink attributes. This is about meaning of particular
> ASIC-specific internal resources.

I would agree that the netlink attributed are clearly defined. But the
meta information, what this ASIC specific internal resource means when
you combine these attributes, is unclear. This meta information is
also part of the ABI, and documenting giving users a hit what it
means, and why they should change it, would be good practice.

Look at sysfs. open/read/write are clearly defined, which is the
equivalent of the netlink attributes. The meta information we document
in Documentation/ABI/, what a file name means, what a value means,
what other values it can take, etc.

     Andrew

^ permalink raw reply

* Re: [patch net-next v2 00/10] Add support for resource abstraction
From: Jiri Pirko @ 2017-12-27 13:15 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David Ahern, netdev, davem, arkadis, mlxsw, vivien.didelot,
	f.fainelli, michael.chan, ganeshgr, saeedm, matanb, leonro,
	idosch, jakub.kicinski, ast, daniel, simon.horman,
	pieter.jansenvanvuuren, john.hurley, alexander.h.duyck, linville,
	gospo, steven.lin1, yuvalm, ogerlitz, roopa
In-Reply-To: <20171227130803.GA31962@lunn.ch>

Wed, Dec 27, 2017 at 02:08:03PM CET, andrew@lunn.ch wrote:
>> This is misunderstanding I believe. This is not about ABI. That is well
>> defined by the netlink attributes. This is about meaning of particular
>> ASIC-specific internal resources.
>
>I would agree that the netlink attributed are clearly defined. But the
>meta information, what this ASIC specific internal resource means when
>you combine these attributes, is unclear. This meta information is
>also part of the ABI, and documenting giving users a hit what it
>means, and why they should change it, would be good practice.
>
>Look at sysfs. open/read/write are clearly defined, which is the
>equivalent of the netlink attributes. The meta information we document
>in Documentation/ABI/, what a file name means, what a value means,
>what other values it can take, etc.

Hmm. That documents mainly sysfs. No mention of Netlink at all. But
maybe I missed it. Also, that defines the interface as is. However we
are talking about the data exchanged over the interface, not the
interface itself. I don't see how ASIC/HW specific thing, like for
example KVD in our case could be part of kernel ABI. That makes 0 sense
to me, sorry.

^ permalink raw reply

* Re: [PATCH iproute2 net-next] erspan: add erspan usage description
From: David Ahern @ 2017-12-27 14:24 UTC (permalink / raw)
  To: William Tu, netdev
In-Reply-To: <1514313076-36470-1-git-send-email-u9012063@gmail.com>

On 12/26/17 12:31 PM, William Tu wrote:
> The patch adds erspan usage description, so 'ip link help erspan'
> and 'ip link help ip6erspan' shows the options.
> 
> Signed-off-by: William Tu <u9012063@gmail.com>
> ---
>  ip/link_gre.c  | 4 ++++
>  ip/link_gre6.c | 4 ++++
>  2 files changed, 8 insertions(+)

Applied to net-next. Thanks, William.

^ permalink raw reply

* Re: [patch iproute2 v3 1/4] lib/libnetlink: Add a function rtnl_talk_msg
From: David Ahern @ 2017-12-27 14:33 UTC (permalink / raw)
  To: Chris Mi, netdev; +Cc: gerlitz.or, stephen
In-Reply-To: <20171225084658.24076-2-chrism@mellanox.com>

On 12/25/17 2:46 AM, Chris Mi wrote:
> diff --git a/lib/libnetlink.c b/lib/libnetlink.c
> index 00e6ce0c..f5f675cf 100644
> --- a/lib/libnetlink.c
> +++ b/lib/libnetlink.c
> @@ -581,36 +581,21 @@ static void rtnl_talk_error(struct nlmsghdr *h, struct nlmsgerr *err,
>  		strerror(-err->error));
>  }
>  
> -static int __rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
> -		       struct nlmsghdr **answer,
> -		       bool show_rtnl_err, nl_ext_ack_fn_t errfn)
> +static int __rtnl_check_ack(struct rtnl_handle *rtnl, struct nlmsghdr **answer,

Make this function __rtnl_talk_msg. Include the assignment of nlmsg_seq
and ack setting using the for loop below and sendmsg() call. All of that
code can be common for both the single and multiple iov case.


> +		       bool show_rtnl_err, nl_ext_ack_fn_t errfn,
> +		       unsigned int seq)
>  {
>  	int status;
> -	unsigned int seq;
> -	struct nlmsghdr *h;
> +	char *buf;

Please order variables in the reverse xmas tree style used in the net code.

>  	struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK };
> -	struct iovec iov = {
> -		.iov_base = n,
> -		.iov_len = n->nlmsg_len
> -	};
> +	struct nlmsghdr *h;
> +	struct iovec iov;
>  	struct msghdr msg = {
>  		.msg_name = &nladdr,
>  		.msg_namelen = sizeof(nladdr),
>  		.msg_iov = &iov,
>  		.msg_iovlen = 1,
>  	};
> -	char *buf;
> -
> -	n->nlmsg_seq = seq = ++rtnl->seq;
> -
> -	if (answer == NULL)
> -		n->nlmsg_flags |= NLM_F_ACK;
> -
> -	status = sendmsg(rtnl->fd, &msg, 0);
> -	if (status < 0) {
> -		perror("Cannot talk to rtnetlink");
> -		return -1;
> -	}
>  
>  	while (1) {
>  		status = rtnl_recvmsg(rtnl->fd, &msg, &buf);

^ permalink raw reply

* Re: [patch iproute2 v3 2/4] utils: Add a function setcmdlinetotal
From: David Ahern @ 2017-12-27 14:34 UTC (permalink / raw)
  To: Chris Mi, netdev; +Cc: gerlitz.or, stephen
In-Reply-To: <20171225084658.24076-3-chrism@mellanox.com>

On 12/25/17 2:46 AM, Chris Mi wrote:
> This function calculates how many commands a batch file has and
> set it to global variable cmdlinetotal.
> 
> Signed-off-by: Chris Mi <chrism@mellanox.com>
> ---
>  include/utils.h |  4 ++++
>  lib/utils.c     | 20 ++++++++++++++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/include/utils.h b/include/utils.h
> index d3895d56..113a8c31 100644
> --- a/include/utils.h
> +++ b/include/utils.h
> @@ -235,6 +235,10 @@ void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n);
>  
>  extern int cmdlineno;
>  ssize_t getcmdline(char **line, size_t *len, FILE *in);
> +
> +extern int cmdlinetotal;
> +void setcmdlinetotal(const char *name);
> +
>  int makeargs(char *line, char *argv[], int maxargs);
>  int inet_get_addr(const char *src, __u32 *dst, struct in6_addr *dst6);
>  
> diff --git a/lib/utils.c b/lib/utils.c
> index 7ced8c06..53ca389f 100644
> --- a/lib/utils.c
> +++ b/lib/utils.c
> @@ -1202,6 +1202,26 @@ ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
>  	return cc;
>  }
>  
> +int cmdlinetotal;
> +
> +void setcmdlinetotal(const char *name)
> +{
> +	char *line = NULL;
> +	size_t len = 0;
> +
> +	if (name && strcmp(name, "-") != 0) {
> +		if (freopen(name, "r", stdin) == NULL) {
> +			fprintf(stderr, "Cannot open file \"%s\" for reading: %s\n",
> +				name, strerror(errno));
> +			return;
> +		}
> +	}
> +
> +	cmdlinetotal = 0;
> +	while (getcmdline(&line, &len, stdin) != -1)
> +		cmdlinetotal++;
> +}
> +
>  /* split command line into argument vector */
>  int makeargs(char *line, char *argv[], int maxargs)
>  {
> 

This helper should not be needed. There is no need to read what could be
a million+ line file multiple times.

^ permalink raw reply

* [PATCH 00/12] drop unneeded newline
From: Julia Lawall @ 2017-12-27 14:51 UTC (permalink / raw)
  To: dri-devel
  Cc: dev, linux-s390, linux-scsi, dccp, Alexander Shishkin, netdev,
	kernel-janitors, linux-kernel, amd-gfx, cluster-devel,
	esc.storagedev, Namhyung Kim, linux-ext4, Jiri Olsa,
	linux-arm-kernel, linux-media

Drop newline at the end of a message string when the printing function adds
a newline.

The complete semantic patch that detects this issue is as shown below
(http://coccinelle.lip6.fr/).  It works in two phases - the first phase
counts how many uses of a function involve a newline and how many don't,
and then the second phase removes newlines in the case of calls where a
newline is used one fourth of the times or less.

This approach is only moderately reliable, and all patches have been
checked to ensure that the newline is not needed.

This also converts some cases of string concatenation to single strings in
modified code, as this improves greppability.

// <smpl>
virtual after_start

@initialize:ocaml@
@@

let withnl = Hashtbl.create 101
let withoutnl = Hashtbl.create 101

let ignore =
  ["strcpy";"strlcpy";"strcat";"strlcat";"strcmp";"strncmp";"strcspn";
    "strsep";"sprintf";"printf";"strncasecmp";"seq_printf";"strstr";"strspn";
    "strlen";"strpbrk";"strtok_r";"memcmp";"memcpy"]

let dignore = ["tools";"samples"]

let inc tbl k =
  let cell =
    try Hashtbl.find tbl k
    with Not_found ->
      let cell = ref 0 in
      Hashtbl.add tbl k cell;
      cell in
  cell := 1 + !cell

let endnl c =
  let len = String.length c in
  try
    String.get c (len-3) = '\\' && String.get c (len-2) = 'n' &&
    String.get c (len-1) = '"'
  with _ -> false

let clean_string s extra =
  let pieces = Str.split (Str.regexp "\" \"") s in
  let nonempty s =
    not (s = "") && String.get s 0 = '"' && not (String.get s 1 = '"') in
  let rec loop = function
      [] -> []
    | [x] -> [x]
    | x::y::rest ->
	if nonempty x && nonempty y
	then
	  let xend = String.get x (String.length x - 2) = ' ' in
	  let yend = String.get y 1 = ' ' in
	  match (xend,yend) with
	    (true,false) | (false,true) -> x :: (loop (y::rest))
	  | (true,true) ->
	      x :: (loop (((String.sub y 0 (String.length y - 2))^"\"")::rest))
	  | (false,false) ->
	      ((String.sub x 0 (String.length x - 1)) ^ " \"") ::
	      (loop (y::rest))
	else x :: (loop (y::rest)) in
  (String.concat "" (loop pieces))^extra

@r depends on !after_start@
constant char[] c;
expression list[n] es;
identifier f;
position p;
@@

f@p(es,c,...)

@script:ocaml@
f << r.f;
n << r.n;
p << r.p;
c << r.c;
@@

let pieces = Str.split (Str.regexp "/") (List.hd p).file in
if not (List.mem f ignore) &&
  List.for_all (fun x -> not (List.mem x pieces)) dignore
then
  (if endnl c
  then inc withnl (f,n)
  else inc withoutnl (f,n))

@finalize:ocaml depends on !after_start@
w1 << merge.withnl;
w2 << merge.withoutnl;
@@

let names = ref [] in
let incn tbl k v =
  let cell =
    try Hashtbl.find tbl k
    with Not_found ->
      begin
	let cell = ref 0 in
	Hashtbl.add tbl k cell;
	cell
      end in
  (if not (List.mem k !names) then names := k :: !names);
  cell := !v + !cell in
List.iter (function w -> Hashtbl.iter (incn withnl) w) w1;
List.iter (function w -> Hashtbl.iter (incn withoutnl) w) w2;

List.iter
  (function name ->
    let wth = try !(Hashtbl.find withnl name) with _ -> 0 in
    let wo = try !(Hashtbl.find withoutnl name) with _ -> 0 in
    if wth > 0 && wth <= wo / 3 then Hashtbl.remove withnl name
    else (Printf.eprintf "dropping %s %d %d\n" (fst name) wth wo; Hashtbl.remove withoutnl name; Hashtbl.remove withnl name))
  !names;

let it = new iteration() in
it#add_virtual_rule After_start;
it#register()

@s1 depends on after_start@
constant char[] c;
expression list[n] es;
identifier f;
position p;
@@

f(es,c@p,...)

@script:ocaml s2@
f << s1.f;
n << s1.n;
c << s1.c;
newc;
@@

try
  let _ = Hashtbl.find withnl (f,n) in
  if endnl c
  then Coccilib.include_match false
  else newc :=
    make_expr(clean_string (String.sub c 0 (String.length c - 1)) "\\n\"")
with Not_found ->
try
  let _ = Hashtbl.find withoutnl (f,n) in
  if endnl c
  then newc :=
    make_expr(clean_string (String.sub c 0 (String.length c - 3)) "\"")
  else Coccilib.include_match false
with Not_found -> Coccilib.include_match false

@@
constant char[] s1.c;
position s1.p;
expression s2.newc;
@@

- c@p
+ newc
// </smpl>

---

 arch/arm/mach-davinci/board-da850-evm.c                 |    4 ++--
 drivers/block/DAC960.c                                  |    4 ++--
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c        |   12 ++++++++----
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c      |    2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c   |    2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c |    2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c     |    2 +-
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c                 |    3 ++-
 drivers/s390/block/dasd_diag.c                          |    3 +--
 drivers/scsi/hpsa.c                                     |    2 +-
 fs/dlm/plock.c                                          |    3 +--
 fs/ext2/super.c                                         |    2 +-
 fs/hpfs/dnode.c                                         |    3 ++-
 net/dccp/ackvec.c                                       |    2 +-
 net/openvswitch/conntrack.c                             |    4 ++--
 tools/perf/tests/dso-data.c                             |    9 +++++----
 16 files changed, 32 insertions(+), 27 deletions(-)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply

* [PATCH 03/12] net: dccp: drop unneeded newline
From: Julia Lawall @ 2017-12-27 14:51 UTC (permalink / raw)
  To: Gerrit Renker
  Cc: kernel-janitors, David S. Miller, dccp, netdev, linux-kernel
In-Reply-To: <1514386305-7402-1-git-send-email-Julia.Lawall@lip6.fr>

DCCP_CRIT prints some other text and then a newline after the message
string, so the message string does not need to include a newline
explicitly.  Done using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 net/dccp/ackvec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c
index 3de0d03..2a24f7d 100644
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -228,7 +228,7 @@ static void dccp_ackvec_add_new(struct dccp_ackvec *av, u32 num_packets,
 	}
 
 	if (num_cells + dccp_ackvec_buflen(av) >= DCCPAV_MAX_ACKVEC_LEN) {
-		DCCP_CRIT("Ack Vector buffer overflow: dropping old entries\n");
+		DCCP_CRIT("Ack Vector buffer overflow: dropping old entries");
 		av->av_overflow = true;
 	}
 

^ permalink raw reply related

* [PATCH 05/12] openvswitch: drop unneeded newline
From: Julia Lawall @ 2017-12-27 14:51 UTC (permalink / raw)
  To: Pravin Shelar
  Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA, David S. Miller,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1514386305-7402-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>

OVS_NLERR prints a newline at the end of the message string, so the
message string does not need to include a newline explicitly.  Done
using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org>

---
 net/openvswitch/conntrack.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index b27c5c6..62f36cc9 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1266,14 +1266,14 @@ static int parse_nat(const struct nlattr *attr,
 		/* Do not allow flags if no type is given. */
 		if (info->range.flags) {
 			OVS_NLERR(log,
-				  "NAT flags may be given only when NAT range (SRC or DST) is also specified.\n"
+				  "NAT flags may be given only when NAT range (SRC or DST) is also specified."
 				  );
 			return -EINVAL;
 		}
 		info->nat = OVS_CT_NAT;   /* NAT existing connections. */
 	} else if (!info->commit) {
 		OVS_NLERR(log,
-			  "NAT attributes may be specified only when CT COMMIT flag is also specified.\n"
+			  "NAT attributes may be specified only when CT COMMIT flag is also specified."
 			  );
 		return -EINVAL;
 	}

^ permalink raw reply related

* Pravin Shelar
From: Julia Lawall @ 2017-12-27 15:22 UTC (permalink / raw)
  To: netdev, dev

The email address pshelar@nicira.com listed for Pravin Shelar in
MAINTAINERS (OPENVSWITCH section) seems to bounce.

julia

^ permalink raw reply

* Re: [PATCH net] RDS: Check cmsg_len before dereferencing CMSG_DATA
From: David Miller @ 2017-12-27 15:37 UTC (permalink / raw)
  To: avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA
  Cc: santosh.shilimkar-QHcLZuEGTsvQT0dZR+AlfA,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	rds-devel-N0ozoZBvEnrZJqsBc5GL+g,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1513916224-9445-1-git-send-email-avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

From: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Date: Thu, 21 Dec 2017 20:17:04 -0800

> RDS currently doesn't check if the length of the control message is
> large enough to hold the required data, before dereferencing the control
> message data. This results in following crash:
 ...
> To fix this, we verify that the cmsg_len is large enough to hold the
> data to be read, before proceeding further.
> 
> Reported-by: syzbot <syzkaller-bugs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> Signed-off-by: Avinash Repaka <avinash.repaka-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [patch iproute2 v3 3/4] tc: Add -bs option to batch mode
From: David Ahern @ 2017-12-27 15:39 UTC (permalink / raw)
  To: Chris Mi, netdev; +Cc: gerlitz.or, stephen
In-Reply-To: <20171225084658.24076-4-chrism@mellanox.com>

On 12/25/17 2:46 AM, Chris Mi wrote:
> Signed-off-by: Chris Mi <chrism@mellanox.com>
> ---
>  tc/m_action.c  |  91 +++++++++++++++++++++++++++++++++----------
>  tc/tc.c        |  47 ++++++++++++++++++----
>  tc/tc_common.h |   8 +++-
>  tc/tc_filter.c | 121 +++++++++++++++++++++++++++++++++++++++++----------------
>  4 files changed, 204 insertions(+), 63 deletions(-)
> 
> diff --git a/tc/m_action.c b/tc/m_action.c
> index fc422364..c4c3b862 100644
> --- a/tc/m_action.c
> +++ b/tc/m_action.c
> @@ -23,6 +23,7 @@
>  #include <arpa/inet.h>
>  #include <string.h>
>  #include <dlfcn.h>
> +#include <errno.h>
>  
>  #include "utils.h"
>  #include "tc_common.h"
> @@ -546,40 +547,88 @@ bad_val:
>  	return ret;
>  }
>  
> +typedef struct {
> +	struct nlmsghdr		n;
> +	struct tcamsg		t;
> +	char			buf[MAX_MSG];
> +} tc_action_req;
> +
> +static tc_action_req *action_reqs;
> +static struct iovec msg_iov[MSG_IOV_MAX];
> +
> +void free_action_reqs(void)
> +{
> +	free(action_reqs);
> +}
> +
> +static tc_action_req *get_action_req(int batch_size, int index)
> +{
> +	tc_action_req *req;
> +
> +	if (action_reqs == NULL) {
> +		action_reqs = malloc(batch_size * sizeof (tc_action_req));
> +		if (action_reqs == NULL)
> +			return NULL;
> +	}
> +	req = &action_reqs[index];
> +	memset(req, 0, sizeof (*req));
> +
> +	return req;
> +}
> +
>  static int tc_action_modify(int cmd, unsigned int flags,
> -			    int *argc_p, char ***argv_p)
> +			    int *argc_p, char ***argv_p,
> +			    int batch_size, int index, bool send)
>  {
>  	int argc = *argc_p;
>  	char **argv = *argv_p;
>  	int ret = 0;
> -	struct {
> -		struct nlmsghdr         n;
> -		struct tcamsg           t;
> -		char                    buf[MAX_MSG];
> -	} req = {
> -		.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcamsg)),
> -		.n.nlmsg_flags = NLM_F_REQUEST | flags,
> -		.n.nlmsg_type = cmd,
> -		.t.tca_family = AF_UNSPEC,
> +	tc_action_req *req;
> +	struct sockaddr_nl nladdr = { .nl_family = AF_NETLINK };
> +	struct iovec *iov = &msg_iov[index];
> +
> +	req = get_action_req(batch_size, index);
> +	if (req == NULL) {
> +		fprintf(stderr, "get_action_req error: not enough buffer\n");
> +		return -ENOMEM;
> +	}
> +
> +	req->n.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcamsg));
> +	req->n.nlmsg_flags = NLM_F_REQUEST | flags;
> +	req->n.nlmsg_type = cmd;
> +	req->t.tca_family = AF_UNSPEC;
> +	struct rtattr *tail = NLMSG_TAIL(&req->n);
> +
> +	struct msghdr msg = {
> +		.msg_name = &nladdr,
> +		.msg_namelen = sizeof(nladdr),
> +		.msg_iov = msg_iov,
> +		.msg_iovlen = index + 1,
>  	};
> -	struct rtattr *tail = NLMSG_TAIL(&req.n);
>  
>  	argc -= 1;
>  	argv += 1;
> -	if (parse_action(&argc, &argv, TCA_ACT_TAB, &req.n)) {
> +	if (parse_action(&argc, &argv, TCA_ACT_TAB, &req->n)) {
>  		fprintf(stderr, "Illegal \"action\"\n");
>  		return -1;
>  	}
> -	tail->rta_len = (void *) NLMSG_TAIL(&req.n) - (void *) tail;
> +	tail->rta_len = (void *) NLMSG_TAIL(&req->n) - (void *) tail;
> +
> +	*argc_p = argc;
> +	*argv_p = argv;
> +
> +	iov->iov_base = &req->n;
> +	iov->iov_len = req->n.nlmsg_len;
> +
> +	if (!send)
> +		return 0;
>  
> -	if (rtnl_talk(&rth, &req.n, NULL) < 0) {
> +	ret = rtnl_talk_msg(&rth, &msg, NULL);
> +	if (ret < 0) {
>  		fprintf(stderr, "We have an error talking to the kernel\n");
>  		ret = -1;
>  	}
>  
> -	*argc_p = argc;
> -	*argv_p = argv;
> -
>  	return ret;
>  }
>  
> @@ -679,7 +728,7 @@ bad_val:
>  	return ret;
>  }
>  
> -int do_action(int argc, char **argv)
> +int do_action(int argc, char **argv, int batch_size, int index, bool send)
>  {
>  
>  	int ret = 0;
> @@ -689,12 +738,14 @@ int do_action(int argc, char **argv)
>  		if (matches(*argv, "add") == 0) {
>  			ret =  tc_action_modify(RTM_NEWACTION,
>  						NLM_F_EXCL | NLM_F_CREATE,
> -						&argc, &argv);
> +						&argc, &argv, batch_size,
> +						index, send);
>  		} else if (matches(*argv, "change") == 0 ||
>  			  matches(*argv, "replace") == 0) {
>  			ret = tc_action_modify(RTM_NEWACTION,
>  					       NLM_F_CREATE | NLM_F_REPLACE,
> -					       &argc, &argv);
> +					       &argc, &argv, batch_size,
> +					       index, send);
>  		} else if (matches(*argv, "delete") == 0) {
>  			argc -= 1;
>  			argv += 1;
> diff --git a/tc/tc.c b/tc/tc.c
> index ad9f07e9..7ea2fc89 100644
> --- a/tc/tc.c
> +++ b/tc/tc.c
> @@ -189,20 +189,20 @@ static void usage(void)
>  	fprintf(stderr, "Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }\n"
>  			"       tc [-force] -batch filename\n"
>  			"where  OBJECT := { qdisc | class | filter | action | monitor | exec }\n"
> -	                "       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [filename] | -n[etns] name |\n"
> +	                "       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [filename] | -bs | -batchsize [size] | -n[etns] name |\n"
>  			"                    -nm | -nam[es] | { -cf | -conf } path } | -j[son]\n");
>  }
>  
> -static int do_cmd(int argc, char **argv)
> +static int do_cmd(int argc, char **argv, int batch_size, int index, bool send)
>  {
>  	if (matches(*argv, "qdisc") == 0)
>  		return do_qdisc(argc-1, argv+1);
>  	if (matches(*argv, "class") == 0)
>  		return do_class(argc-1, argv+1);
>  	if (matches(*argv, "filter") == 0)
> -		return do_filter(argc-1, argv+1);
> +		return do_filter(argc-1, argv+1, batch_size, index, send);
>  	if (matches(*argv, "actions") == 0)
> -		return do_action(argc-1, argv+1);
> +		return do_action(argc-1, argv+1, batch_size, index, send);
>  	if (matches(*argv, "monitor") == 0)
>  		return do_tcmonitor(argc-1, argv+1);
>  	if (matches(*argv, "exec") == 0)
> @@ -217,11 +217,16 @@ static int do_cmd(int argc, char **argv)
>  	return -1;
>  }
>  
> -static int batch(const char *name)
> +static int batch(const char *name, int batch_size)
>  {
> +	int msg_iov_index = 0;
>  	char *line = NULL;
>  	size_t len = 0;
>  	int ret = 0;
> +	bool send;
> +
> +	if (batch_size > 1)
> +		setcmdlinetotal(name);
>  
>  	batch_mode = 1;
>  	if (name && strcmp(name, "-") != 0) {
> @@ -248,15 +253,30 @@ static int batch(const char *name)
>  		if (largc == 0)
>  			continue;	/* blank line */
>  
> -		if (do_cmd(largc, largv)) {
> +		/*
> +		 * In batch mode, if we haven't accumulated enough commands
> +		 * and this is not the last command, don't send the message
> +		 * immediately.
> +		 */
> +		if (batch_size > 1 && msg_iov_index + 1 != batch_size
> +		    && cmdlineno != cmdlinetotal)
> +			send = false;
> +		else
> +			send = true;
> +
> +		ret = do_cmd(largc, largv, batch_size, msg_iov_index++, send);

What happens if tc commands are interlaced in the file -- qdisc add,
class add, filter add, then a delete, show, exec, etc.? Right now each
command is handled one at a time so an add followed by a delete will
work. Your proposed batching loop won't work for this case as some
commands are executed when that line is reached and others are batched
for later send. Not all of the tc commands need to be batched in a
single message so perhaps those commands cause the queue to be flushed
(ie, message sent), then that command is executed and you start the
batching over.

Further, I really think the batching can be done without the global
variables and without the command handlers knowing it is batching or
part of an iov. e.g., in the case of batching try having the commands
malloc the request buffer and return the pointer back to this loop in
which case this loop calls rtnl_talk_msg and frees the buffers.

> +		if (ret < 0) {
>  			fprintf(stderr, "Command failed %s:%d\n", name, cmdlineno);
>  			ret = 1;
>  			if (!force)
>  				break;
>  		}
> +		msg_iov_index %= batch_size;
>  	}
>  	if (line)
>  		free(line);
> +	free_filter_reqs();
> +	free_action_reqs();
>  
>  	rtnl_close(&rth);
>  	return ret;

^ permalink raw reply

* Re: [PATCH iproute2-next 00/10] RDMAtool cleanup and refactoring code
From: David Ahern @ 2017-12-27 15:45 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: Leon Romanovsky, netdev, Stephen Hemminger
In-Reply-To: <20171227075759.15289-1-leon@kernel.org>

On 12/27/17 1:57 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> Hi,
> 
> The following patchset comes as a preparation to more complex code,
> which will add resource tracking visibility to the rdmatool, where
> the kernel part is under review of RDMA community.
> 
> Thanks
> 
> [1] https://marc.info/?l=linux-rdma&m=151412508816802&w=2
> 
> Leon Romanovsky (10):
>   rdma: Reduce scope of _dev_map_lookup call
>   rdma: Protect dev_map_lookup from wrong input
>   rdma: Move per-device handler function to generic code
>   rdma: Fix misspelled SYS_IMAGE_GUID
>   rdma: Check that port index exists before operate on link layer
>   rdma: Print supplied device name in case of wrong name
>   rdma: Get rid of dev_map_free call
>   rdma: Rename free function to be rd_cleanup
>   rdma: Rename rd_free_devmap to be rd_free
>   rdma: Move link execution logic to common code
> 
>  rdma/dev.c   |  28 +----------------
>  rdma/link.c  |  51 +++---------------------------
>  rdma/rdma.c  |   7 ++---
>  rdma/rdma.h  |   5 +--
>  rdma/utils.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
>  5 files changed, 100 insertions(+), 91 deletions(-)
> 
> --
> 2.15.1
> 


Applied to net-next. Thanks, Leon.

^ permalink raw reply

* Re: [PATCH iproute2 3/3] ip/tunnel: Document "external" parameter
From: William Tu @ 2017-12-27 15:45 UTC (permalink / raw)
  To: Serhey Popovych; +Cc: Linux Kernel Network Developers
In-Reply-To: <1514374096-1473-4-git-send-email-serhe.popovych@gmail.com>

Hi Serhey,

On Wed, Dec 27, 2017 at 3:28 AM, Serhey Popovych
<serhe.popovych@gmail.com> wrote:
> Also add "noexternal" variant to be inline
> with geneve and vxlan tunnel types.
>
> Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
> ---
>  ip/link_gre.c         |    3 +++
>  ip/link_ip6tnl.c      |    4 +++-
>  ip/link_iptnl.c       |    4 +++-
>  man/man8/ip-link.8.in |    6 ++++++
>  4 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/ip/link_gre.c b/ip/link_gre.c
> index 896bb19..b383061 100644
> --- a/ip/link_gre.c
> +++ b/ip/link_gre.c
> @@ -43,6 +43,7 @@ static void print_usage(FILE *f)
>                 "                            [ [no]encap-csum ]\n"
>                 "                            [ [no]encap-csum6 ]\n"
>                 "                            [ [no]encap-remcsum ]\n"
> +               "                            [ [no]external ]\n"
>                 "                            [ fwmark MARK ]\n"
>                 "                            [ erspan IDX ]\n"
>                 "\n"
> @@ -288,6 +289,8 @@ get_failed:
>                         encapflags &= ~TUNNEL_ENCAP_FLAG_REMCSUM;
>                 } else if (strcmp(*argv, "external") == 0) {
>                         metadata = 1;
> +               } else if (strcmp(*argv, "noexternal") == 0) {
> +                       metadata = 0;
>                 } else if (strcmp(*argv, "ignore-df") == 0) {
>                         ignore_df = 1;
>                 } else if (strcmp(*argv, "noignore-df") == 0) {

What's the use case of noexternal?
AFAIK, setting 'noexternal' to the existing external device won't
change it to noexternal.
And if the device is created first time, then the default is noexternal.

William

^ permalink raw reply

* Re: [PATCH V5 net-next 00/17] add some features and fix some bugs for HNS3 driver
From: David Miller @ 2017-12-27 15:53 UTC (permalink / raw)
  To: lipeng321; +Cc: netdev, linux-kernel, linuxarm, salil.mehta
In-Reply-To: <1513916516-104591-1-git-send-email-lipeng321@huawei.com>

From: Peng Li <lipeng321@huawei.com>
Date: Fri, 22 Dec 2017 12:21:39 +0800

> This patchset adds some new feature support and fixes some bugs:
> [Patch 1/17 - 5/17] add the support to modify/query the tqp number
> through ethtool -L/l command, and also fix some related bugs for
> change tqp number.
> [Patch 6/17 - 9-17] add support vlan tag offload on tx&&rx direction
> for pf, and fix some related bugs.
> [patch 10/17 - 11/17] fix bugs for auto negotiation.
> [patch 12/17] adds support for ethtool command set_pauseparam.
> [patch 13/17 - 14/17] add support to update flow control settings after
> autoneg.
> [patch 15/17 - 17/17] fix some other bugs in net-next.

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH net 1/2] tipc: error path leak fixes in tipc_enable_bearer()
From: David Miller @ 2017-12-27 15:56 UTC (permalink / raw)
  To: tommi.t.rantala; +Cc: netdev, jon.maloy, ying.xue, tipc-discussion
In-Reply-To: <20171222073517.8773-1-tommi.t.rantala@nokia.com>

From: Tommi Rantala <tommi.t.rantala@nokia.com>
Date: Fri, 22 Dec 2017 09:35:16 +0200

> Fix memory leak in tipc_enable_bearer() if enable_media() fails, and
> cleanup with bearer_disable() if tipc_mon_create() fails.
> 
> Acked-by: Ying Xue <ying.xue@windriver.com>
> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>

Applied.

^ permalink raw reply

* Re: [PATCH net 2/2] tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path
From: David Miller @ 2017-12-27 15:56 UTC (permalink / raw)
  To: tommi.t.rantala; +Cc: netdev, jon.maloy, ying.xue, tipc-discussion
In-Reply-To: <20171222073517.8773-2-tommi.t.rantala@nokia.com>

From: Tommi Rantala <tommi.t.rantala@nokia.com>
Date: Fri, 22 Dec 2017 09:35:17 +0200

> Calling tipc_mon_delete() before the monitor has been created will oops.
> This can happen in tipc_enable_bearer() error path if tipc_disc_create()
> fails.
 ...
> Acked-by: Ying Xue <ying.xue@windriver.com>
> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
> Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>

Applied.

^ permalink raw reply

* Re: [PATCH net,stable 1/1] net: fec: unmap the xmit buffer that are not transferred by DMA
From: David Miller @ 2017-12-27 15:57 UTC (permalink / raw)
  To: fugang.duan; +Cc: netdev
In-Reply-To: <1513933929-24985-1-git-send-email-fugang.duan@nxp.com>

From: Fugang Duan <fugang.duan@nxp.com>
Date: Fri, 22 Dec 2017 17:12:09 +0800

> The enet IP only support 32 bit, it will use swiotlb buffer to do dma
> mapping when xmit buffer DMA memory address is bigger than 4G in i.MX
> platform. After stress suspend/resume test, it will print out:
> 
> log:
> [12826.352864] fec 5b040000.ethernet: swiotlb buffer is full (sz: 191 bytes)
> [12826.359676] DMA: Out of SW-IOMMU space for 191 bytes at device 5b040000.ethernet
> [12826.367110] fec 5b040000.ethernet eth0: Tx DMA memory map failed
> 
> The issue is that the ready xmit buffers that are dma mapped but DMA still
> don't copy them into fifo, once MAC restart, these DMA buffers are not unmapped.
> So it should check the dma mapping buffer and unmap them.
> 
> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: pull request (net): ipsec 2017-12-22
From: David Miller @ 2017-12-27 16:00 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <20171222094501.23345-1-steffen.klassert@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Fri, 22 Dec 2017 10:44:53 +0100

> 1) Check for valid id proto in validate_tmpl(), otherwise
>    we may trigger a warning in xfrm_state_fini().
>    From Cong Wang.
> 
> 2) Fix a typo on XFRMA_OUTPUT_MARK policy attribute.
>    From Michal Kubecek.
> 
> 3) Verify the state is valid when encap_type < 0,
>    otherwise we may crash on IPsec GRO .
>    From Aviv Heller.
> 
> 4) Fix stack-out-of-bounds read on socket policy lookup.
>    We access the flowi of the wrong address family in the
>    IPv4 mapped IPv6 case, fix this by catching address
>    family missmatches before we do the lookup.
> 
> 5) fix xfrm_do_migrate() with AEAD to copy the geniv
>    field too. Otherwise the state is not fully initialized
>    and migration fails. From Antony Antony.
> 
> 6) Fix stack-out-of-bounds with misconfigured transport
>    mode policies. Our policy template validation is not
>    strict enough. It is possible to configure policies
>    with transport mode template where the address family
>    of the template does not match the selectors address
>    family. Fix this by refusing such a configuration,
>    address family can not change on transport mode.
> 
> 7) Fix a policy reference leak when reusing pcpu xdst
>    entry. From Florian Westphal.
> 
> 8) Reinject transport-mode packets through tasklet,
>    otherwise it is possible to reate a recursion
>    loop. From Herbert Xu.
> 
> Please pull or let me know if there are problems.

Pulled, thank you very much!

^ permalink raw reply

* Re: [PATCH net-next] phylib: rename reset-(post-)delay-us to reset-(de)assert-us
From: David Miller @ 2017-12-27 16:07 UTC (permalink / raw)
  To: dev-M/VWbR8SM2SsTnJN9+BGXg
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	andrew-g2DYL2Zd6BY, f.fainelli-Re5JQEeQqe8AvxtiuMwx3w,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	richard.leitner-WcANXNA0UjBBDgjK7y7TUQ,
	geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ, lukma-ynQEQJNshbs,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg,
	david.wu-TNX95d0MmH7DzftRWevZcw, baruch-NswTu9S1W3P6gbPvEgmw2w,
	devicetree-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20171222100809.18826-1-dev-M/VWbR8SM2SsTnJN9+BGXg@public.gmane.org>

From: Richard Leitner <dev-M/VWbR8SM2SsTnJN9+BGXg@public.gmane.org>
Date: Fri, 22 Dec 2017 11:08:09 +0100

> From: Richard Leitner <richard.leitner-WcANXNA0UjBBDgjK7y7TUQ@public.gmane.org>
> 
> As suggested by Rob Herring [1] rename the previously introduced
> reset-{,post-}delay-us bindings to the clearer reset-{,de}assert-us
> 
> [1] https://patchwork.kernel.org/patch/10104905/
> 
> Signed-off-by: Richard Leitner <richard.leitner-WcANXNA0UjBBDgjK7y7TUQ@public.gmane.org>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH net 0/3] update on copyright and couple of fixes
From: David Miller @ 2017-12-27 16:09 UTC (permalink / raw)
  To: siva.kallam; +Cc: netdev, michael.chan, prashant, satish.baddipadige
In-Reply-To: <1513938929-115972-1-git-send-email-siva.kallam@broadom.com>

From: Siva Reddy Kallam <siva.kallam@broadom.com>
Date: Fri, 22 Dec 2017 16:05:26 +0530

> First patch:
> 	Update copyright
> 
> Second patch:
> 	Add workaround to restrict 5762 MRRS
> 
> Third patch:
> 	Add PHY reset in change MTU path for 5720

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH v3 1/4] security: Add support for SCTP security hooks
From: Richard Haines @ 2017-12-27 16:22 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner, Casey Schaufler, paul
  Cc: selinux, netdev, linux-sctp, linux-security-module, vyasevich,
	nhorman, sds, eparis
In-Reply-To: <20171222174510.GB6123@localhost.localdomain>

On Fri, 2017-12-22 at 15:45 -0200, Marcelo Ricardo Leitner wrote:
> On Fri, Dec 22, 2017 at 09:20:45AM -0800, Casey Schaufler wrote:
> > On 12/22/2017 5:05 AM, Marcelo Ricardo Leitner wrote:
> > > From: Richard Haines <richard_c_haines@btinternet.com>
> > > 
> > > The SCTP security hooks are explained in:
> > > Documentation/security/LSM-sctp.rst
> 
> Thanks Casey for your comments. However, I'm not that acquainted with
> these area of codes and I cannot work on them. I'll just wait for
> Richard then.

I'm back online and will post a V4 set of patches within a week. These
will address Paul's comments as per [1] and Casey's regarding the
documentation.
Sorry for the delay


[1] https://marc.info/?l=selinux&m=151274018809822&w=2

> 
>   Marcelo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" 
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox