Netdev List
 help / color / mirror / Atom feed
* Re: [Patch net-next] net_sched: act: Dont increment refcnt on replace
From: David Miller @ 2014-01-06 21:47 UTC (permalink / raw)
  To: jhs; +Cc: netdev, xiyou.wangcong, eric.dumazet
In-Reply-To: <52B83580.2010601@mojatatu.com>

From: Jamal Hadi Salim <jhs@mojatatu.com>
Date: Mon, 23 Dec 2013 08:07:12 -0500

> Ok, let me know how this one went ;->
> I think i know how to send this way if you find it fits your workflow.

Looks better, for sure.  But somehow got lost on the way to patchwork.

^ permalink raw reply

* Re: Possible to add netfilter hooks to IFB driver?
From: Stephen Hemminger @ 2014-01-06 21:51 UTC (permalink / raw)
  To: Brad Johnson; +Cc: netdev
In-Reply-To: <522653F1.6090902@ecessa.com>

On Tue, 03 Sep 2013 16:26:09 -0500
Brad Johnson <bjohnson@ecessa.com> wrote:

> I would like to add netfilter hooks to the IFB driver so I can do 
> iptables -j IFB (just like we can with IMQ). But I would like to know 
> first if there are any reasons this can not work. Please advise if this 
> is possible, and if so any tips would be appreciated.
> 
> Cheers,
> Brad

The risk is creating the same races that made IMQ unacceptable.

^ permalink raw reply

* Re: [PATCH] netfilter: nf_conntrack: release conntrack from rcu callback
From: Florian Westphal @ 2014-01-06 21:53 UTC (permalink / raw)
  To: Andrew Vagin
  Cc: Florian Westphal, Andrey Vagin, netfilter-devel, netfilter,
	coreteam, netdev, linux-kernel, vvs, Pablo Neira Ayuso,
	Patrick McHardy, Jozsef Kadlecsik, David S. Miller,
	Cyrill Gorcunov
In-Reply-To: <20140106205414.GA19788@gmail.com>

Andrew Vagin <avagin@gmail.com> wrote:
> On Mon, Jan 06, 2014 at 06:02:35PM +0100, Florian Westphal wrote:
> > Andrey Vagin <avagin@openvz.org> wrote:
> > > Lets look at destroy_conntrack:
> > > 
> > > hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode);
> > > ...
> > > nf_conntrack_free(ct)
> > > 	kmem_cache_free(net->ct.nf_conntrack_cachep, ct);
> > > 
> > > The hash is protected by rcu, so readers look up conntracks without
> > > locks.
> > > A conntrack is removed from the hash, but in this moment a few readers
> > > still can use the conntrack, so if we call kmem_cache_free now, all
> > > readers will read released object.
> > > 
> > > Bellow you can find more tricky race condition of three tasks.
> > > 
> > > task 1			task 2			task 3
> > > 			nf_conntrack_find_get
> > > 			 ____nf_conntrack_find
> > > destroy_conntrack
> > >  hlist_nulls_del_rcu
> > >  nf_conntrack_free
> > >  kmem_cache_free
> > > 						__nf_conntrack_alloc
> > > 						 kmem_cache_alloc
> > > 						 memset(&ct->tuplehash[IP_CT_DIR_MAX],
> > > 			 if (nf_ct_is_dying(ct))
> > > 
> > > In this case the task 2 will not understand, that it uses a wrong
> > > conntrack.
> > 
> > Can you elaborate?
> > Yes, nf_ct_is_dying(ct) might be called for the wrong conntrack.
> > 
> > But, in case we _think_ that its the right one we call
> > nf_ct_tuple_equal() to verify we indeed found the right one:
> 
> Ok. task3 creates a new contrack and nf_ct_tuple_equal() returns true on
> it. Looks like it's possible.

IFF we're recycling the exact same tuple (i.e., flow was destroyed/terminated
AND has been re-created in identical fashion on another cpu)
AND it is not yet confirmed (ie. its not in hash table any more but in
unconfirmed list) then, yes, I think you're right.

> unitialized contrack. It's really bad, because the code supposes that
> conntrack can not be initialized in two threads concurrently. For
> example BUG can be triggered from nf_nat_setup_info():
> 
> BUG_ON(nf_nat_initialized(ct, maniptype));

Right, since a new conntrack entry is not supposed to be in the hash
table.

> >                 ct = nf_ct_tuplehash_to_ctrack(h);
> >                 if (unlikely(nf_ct_is_dying(ct) ||
> >                              !atomic_inc_not_zero(&ct->ct_general.use)))
> > 			// which means we should hit this path (0 ref).
> >                         h = NULL;
> >                 else {
> > 			// otherwise, it cannot go away from under us, since
> > 			// we own a reference now.
> >                         if (unlikely(!nf_ct_tuple_equal(tuple, &h->tuple) ||
> >                                      nf_ct_zone(ct) != zone)) {

Perhaps this needs additional !nf_ct_is_confirmed()?

It would cover your case (found a recycled element that has been put on
the unconfirmed list (refcnt already set to 1, ct->tuple is set) on another cpu,
extensions possibly not yet fully initialised), and the same tuple).

Regards,
Florian

^ permalink raw reply

* Re: [PATCH net-next v4] IPv6: use anycast addresses as source addresses in echo reply
From: François-Xavier Le Bail @ 2014-01-06 21:53 UTC (permalink / raw)
  To: hannes, David Miller; +Cc: netdev, kuznet, jmorris, yoshfuji, kaber

On Mon, 1/6/14, David Miller <davem@davemloft.net> wrote:

> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Date: Mon, 6 Jan 2014 00:05:05 +0100

>> On Fri, Jan 03, 2014 at 05:43:31PM +0100, Francois-Xavier Le Bail wrote:
>>> diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
>>> index 5d42009..65c8619 100644
>>> --- a/net/ipv6/icmp.c
>>> +++ b/net/ipv6/icmp.c
>>> @@ -556,7 +556,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
>>>  
>>>      saddr = &ipv6_hdr(skb)->daddr;
>>>  
>>> -    if (!ipv6_unicast_destination(skb))
>>> +    if (!ipv6_unicast_destination(skb) &&
>>> +        !(net->ipv6.anycast_src_echo_reply &&
>>> +          ipv6_chk_acast_addr(net, NULL, saddr)))
>>>          saddr = NULL;
>> 
>> I am not sure why you left out the device at ipv6_chk_acast_addr?
>> 
>> IMHO this logic is a bit more complex, we can pass NULL for ipv6 addresses of
>> scope global but need to check the interface for scope link.
>> 
>> It is already possible via setsockopt JOIN_ANYCAST that an ll address is
>> anycast on another interface which may not be checked here.

> I think we should pass a valid device in unless it breaks something
> obvious.

The problem is that "saddr" is not necessarily an address on "skb->dev"
in icmpv6_echo_reply(). It may be an address on another interface.

If dev arg is NULL, ipv6_chk_acast_addr() searches all devices for "saddr", that what we need.

It works for global scope and link-local anycast address.

So passing a valid device to ipv6_chk_acast_addr() breaks the goal of the patch.

Thanks.

^ permalink raw reply

* 'net' README
From: David Miller @ 2014-01-06 22:02 UTC (permalink / raw)
  To: netdev


I intend to shortly submit what I hope is the final set of networking
fixes to Linus for 3.13

Please give extra consideration to any bug fixes you might be thinking
about sending from this point forward.

Is it REALLY necessary?  Does it impact significantly a large group of
users?

If you can't answer yes to those two questions, at a minimum, just
target it to net-next.

Thanks.

^ permalink raw reply

* Re: [PATCH v2 00/16] wl1251 patches from linux-n900 tree
From: Pavel Machek @ 2014-01-06 22:03 UTC (permalink / raw)
  To: John W. Linville
  Cc: Pali Rohár, Luciano Coelho, linux-wireless, netdev,
	linux-kernel, freemangordon, aaro.koskinen, sre, joni.lapilainen,
	Johannes Berg, Felipe Contreras
In-Reply-To: <20140106200050.GG10885@tuxdriver.com>

Hi!

> > > Hello, I'm sending wl1251 patches from linux-n900 tree [1] for
> > > comments. More patches come from David's monitor & packet
> > > injection work. Patches are tested with 3.12 rc5 kernel on
> > > Nokia N900.
> > > 
> > > Second version contains new patch for fixing NULL pointer
> > > dereference which sometimes cause kernel panic and fixes code
> > > suggested by Pavel Machek.
>  
> > So far, there are no new comments for patches 01, 03-13 and 16. 
> > Are there any other problems with that patches or can be accepted 
> > for upstream?
>  
> They are probably fine to merge now.  Of course, I was still deleting
> wl12xx patches when they were originally posted, so I'll need someone
> to resend the patches to me...

I'll try to help with that (Pali has his development machine under
repairs), but I'll have to hunt it in archives, too...

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply

* [PATCH net-next] gre_offload: statically build GRE offloading support
From: Eric Dumazet @ 2014-01-06 22:03 UTC (permalink / raw)
  To: H.K. Jerry Chu, David Miller; +Cc: herbert, ogerlitz, netdev
In-Reply-To: <1388896679-23152-1-git-send-email-hkchu@google.com>

From: Eric Dumazet <edumazet@google.com>

GRO/GSO layers can be enabled on a node, even if said
node is only forwarding packets.

This patch permits GSO (and upcoming GRO) support for GRE
encapsulated packets, even if the host has no GRE tunnel setup.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: H.K. Jerry Chu <hkchu@google.com>
---
Note : We probably can remove EXPORT_SYMBOL() on inet_add_offload()
and inet_del_protocol() on a followup patch if there is interest.

 include/net/gre.h      |    3 ---
 net/ipv4/Makefile      |    4 ++--
 net/ipv4/gre_demux.c   |    9 ---------
 net/ipv4/gre_offload.c |    7 +++++--
 4 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/include/net/gre.h b/include/net/gre.h
index dcd9ae3270d3..70046a0b0b89 100644
--- a/include/net/gre.h
+++ b/include/net/gre.h
@@ -33,9 +33,6 @@ struct gre_cisco_protocol {
 int gre_cisco_register(struct gre_cisco_protocol *proto);
 int gre_cisco_unregister(struct gre_cisco_protocol *proto);
 
-int gre_offload_init(void);
-void gre_offload_exit(void);
-
 void gre_build_header(struct sk_buff *skb, const struct tnl_ptk_info *tpi,
 		      int hdr_len);
 
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index 4b81e91c80fe..f8c49ce5b283 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -11,7 +11,7 @@ obj-y     := route.o inetpeer.o protocol.o \
 	     tcp_offload.o datagram.o raw.o udp.o udplite.o \
 	     udp_offload.o arp.o icmp.o devinet.o af_inet.o igmp.o \
 	     fib_frontend.o fib_semantics.o fib_trie.o \
-	     inet_fragment.o ping.o ip_tunnel_core.o
+	     inet_fragment.o ping.o ip_tunnel_core.o gre_offload.o
 
 obj-$(CONFIG_NET_IP_TUNNEL) += ip_tunnel.o
 obj-$(CONFIG_SYSCTL) += sysctl_net_ipv4.o
@@ -19,7 +19,7 @@ obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o
 obj-$(CONFIG_IP_MROUTE) += ipmr.o
 obj-$(CONFIG_NET_IPIP) += ipip.o
-gre-y := gre_demux.o gre_offload.o
+gre-y := gre_demux.o
 obj-$(CONFIG_NET_IPGRE_DEMUX) += gre.o
 obj-$(CONFIG_NET_IPGRE) += ip_gre.o
 obj-$(CONFIG_NET_IPVTI) += ip_vti.o
diff --git a/net/ipv4/gre_demux.c b/net/ipv4/gre_demux.c
index 5893e99e8299..1863422fb7d5 100644
--- a/net/ipv4/gre_demux.c
+++ b/net/ipv4/gre_demux.c
@@ -355,14 +355,7 @@ static int __init gre_init(void)
 		goto err_gre;
 	}
 
-	if (gre_offload_init()) {
-		pr_err("can't add protocol offload\n");
-		goto err_gso;
-	}
-
 	return 0;
-err_gso:
-	gre_del_protocol(&ipgre_protocol, GREPROTO_CISCO);
 err_gre:
 	inet_del_protocol(&net_gre_protocol, IPPROTO_GRE);
 err:
@@ -371,8 +364,6 @@ err:
 
 static void __exit gre_exit(void)
 {
-	gre_offload_exit();
-
 	gre_del_protocol(&ipgre_protocol, GREPROTO_CISCO);
 	inet_del_protocol(&net_gre_protocol, IPPROTO_GRE);
 }
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index e5d436188464..a26e6fbf79be 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -120,12 +120,15 @@ static const struct net_offload gre_offload = {
 	},
 };
 
-int __init gre_offload_init(void)
+static int __init gre_offload_init(void)
 {
 	return inet_add_offload(&gre_offload, IPPROTO_GRE);
 }
 
-void __exit gre_offload_exit(void)
+static void __exit gre_offload_exit(void)
 {
 	inet_del_offload(&gre_offload, IPPROTO_GRE);
 }
+
+module_init(gre_offload_init);
+module_exit(gre_offload_exit);

^ permalink raw reply related

* [GIT] Networking
From: David Miller @ 2014-01-06 22:17 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


I'm hoping this is the very last batch of networking fixes for
3.13, here goes nothing:

1) Fix crashes in VLAN's header_ops passthru.

2) Bridge multicast code needs to use BH spinlocks to prevent deadlocks
   with timers.  From Curt Brune.

3) ipv6 tunnels lack proper synchornization when updating percpu statistics.
   From Li RongQing.

4) Fixes to bnx2x driver from Yaniv Rosner, Dmitry Kravkov and Michal
   Kalderon.

5) Avoid undefined operator evaluation order in llc code, from Daniel
   Borkmann.

6) Error paths in various GSO offload paths do not unwind properly, in
   particular they must undo any modifications they have made to the
   SKB.  From Wei-Chun Chao.

7) Fix RX refill races during restore in virtio-net, from Jason Wang.

8) Fix SKB use after free in LLC code, from Daniel Borkmann.

9) Missing unlock and OOPS in netpoll code when VLAN tag handling
   fails.

10) Fix vxlan device attachment wrt. ipv6, from Fan Du.

11) Don't allow creating infiniband links to non-infiniband devices,
    from Hangbin Liu.

12) Revert FEC phy reset active low change, it breaks things.  From
    Fabio Estevam.

13) Fix header pointer handling in 6lowpan header building code, from
    Daniel Borkmann.

14) Fix RSS handling in be2net driver, from Vasundhara Volam.

15) Fix modem port indexing in HSO driver, from Dan Williams.

Please pull, thanks a lot!

The following changes since commit 71ce176ee6ed1735b9a1160a5704a915d13849b1:

  Merge tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux (2013-12-30 14:31:11 -0800)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master

for you to fetch changes up to fe0d692bbc645786bce1a98439e548ae619269f5:

  bridge: use spin_lock_bh() in br_multicast_set_hash_max (2014-01-06 16:39:47 -0500)

----------------------------------------------------------------
Curt Brune (1):
      bridge: use spin_lock_bh() in br_multicast_set_hash_max

Dan Williams (1):
      hso: fix handling of modem port SERIAL_STATE notifications

Daniel Borkmann (3):
      net: llc: fix order of evaluation in llc_conn_ac_inc_vr_by_1
      net: llc: fix use after free in llc_ui_recvmsg
      net: 6lowpan: fix lowpan_header_create non-compression memcpy call

David S. Miller (4):
      vlan: Fix header ops passthru when doing TX VLAN offload.
      netpoll: Fix missing TXQ unlock and and OOPS.
      Merge branch 'bnx2x'
      Merge branch 'be2net'

Dmitry Kravkov (1):
      bnx2x: limit number of interrupt vectors for 57711

Fabio Estevam (1):
      fec: Revert "fec: Do not assume that PHY reset is active low"

Guenter Roeck (1):
      isdn: Drop big endian cpp checks from telespci and hfc_pci drivers

Hangbin Liu (1):
      infiniband: make sure the src net is infiniband when create new link

Hannes Frederic Sowa (1):
      ipv6: don't install anycast address for /128 addresses on routers

Jason Wang (1):
      virtio-net: fix refill races during restore

Josh Boyer (1):
      xen-netback: Include header for vmalloc

Li RongQing (3):
      ipv6: fix the use of pcpu_tstats in sit
      ipv6: fix the use of pcpu_tstats in ip6_tunnel
      ipv6: fix the use of pcpu_tstats in ip6_vti.c

Manish Chopra (2):
      qlcnic: Fix loopback diagnostic test
      qlcnic: Fix resource allocation for TX queues

Michal Kalderon (2):
      bnx2x: Correct number of MSI-X vectors for VFs
      bnx2x: Clean before update RSS arrives

Octavian Purdila (1):
      usbnet: mcs7830: rework link state detection

Shahed Shaikh (1):
      qlcnic: Fix bug in Tx completion path

Suresh Reddy (2):
      be2net: increase the timeout value for loopback-test FW cmd
      be2net: fix max_evt_qs calculation for BE3 in SR-IOV config

Thadeu Lima de Souza Cascardo (1):
      cxgb4: allow large buffer size to have page size

Vasundhara Volam (1):
      be2net: disable RSS when number of RXQs is reduced to 1 via set-channels

Vlad Yasevich (1):
      sctp: Remove outqueue empty state

Wei-Chun Chao (1):
      ipv4: fix tunneled VM traffic over hw VXLAN/GRE GSO NIC

Yaniv Rosner (5):
      bnx2x: Fix 578xx-KR 1G link
      bnx2x: Fix passive DAC cable detection
      bnx2x: Fix Duplex setting for 54618se
      bnx2x: Fix incorrect link-up report
      bnx2x: Fix KR2 work-around detection of BCM8073

Yasushi Asano (1):
      ipv6 addrconf: fix preferred lifetime state-changing behavior while valid_lft is infinity

Yuval Mintz (2):
      bnx2x: fix AFEX memory overflow
      bnx2x: fix VLAN configuration for VFs.

fan.du (1):
      {vxlan, inet6} Mark vxlan_dev flags with VXLAN_F_IPV6 properly

 drivers/infiniband/ulp/ipoib/ipoib_netlink.c         |   3 +-
 drivers/isdn/hisax/hfc_pci.c                         |   4 -
 drivers/isdn/hisax/telespci.c                        |   4 -
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h          |   7 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c     |  94 +++++++++++--------
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c     |   6 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h      |   1 +
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c       |  15 +++-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h       |   7 ++
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c    | 254 +++++++++++++++++++++++++++++-----------------------
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h    |   1 +
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c     |  26 +++++-
 drivers/net/ethernet/chelsio/cxgb4/sge.c             |   2 +-
 drivers/net/ethernet/emulex/benet/be.h               |   3 +-
 drivers/net/ethernet/emulex/benet/be_cmds.c          |  33 ++++---
 drivers/net/ethernet/emulex/benet/be_main.c          |  29 +++---
 drivers/net/ethernet/freescale/fec_main.c            |  14 +--
 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h          |   5 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c  |   7 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c     |   4 +
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c       |  12 ++-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c     |   4 +-
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c |   3 +-
 drivers/net/usb/hso.c                                |  13 ++-
 drivers/net/usb/mcs7830.c                            |  19 +---
 drivers/net/virtio_net.c                             |  11 +--
 drivers/net/vxlan.c                                  |   3 +-
 drivers/net/xen-netback/interface.c                  |   1 +
 include/linux/netdevice.h                            |  22 +++++
 include/net/llc_pdu.h                                |   2 +-
 include/net/sctp/structs.h                           |   3 -
 net/8021q/vlan_dev.c                                 |  19 +++-
 net/bridge/br_multicast.c                            |   4 +-
 net/core/neighbour.c                                 |   2 +-
 net/core/netpoll.c                                   |  11 ++-
 net/ieee802154/6lowpan.c                             |   2 +-
 net/ipv4/gre_offload.c                               |  11 ++-
 net/ipv4/udp.c                                       |   6 +-
 net/ipv4/udp_offload.c                               |  37 ++++----
 net/ipv6/addrconf.c                                  |  17 ++--
 net/ipv6/ip6_tunnel.c                                |  21 +++--
 net/ipv6/ip6_vti.c                                   |  24 +----
 net/ipv6/sit.c                                       |   2 +
 net/llc/af_llc.c                                     |   5 +-
 net/sctp/outqueue.c                                  |  32 ++-----
 45 files changed, 478 insertions(+), 327 deletions(-)

^ permalink raw reply

* Re: mmotm 2014-01-02-14-35 uploaded (brocade/bna)
From: David Miller @ 2014-01-06 22:24 UTC (permalink / raw)
  To: rdunlap; +Cc: akpm, rmody, linux-kernel, netdev, linux-next
In-Reply-To: <52C700B9.8040504@infradead.org>

From: Randy Dunlap <rdunlap@infradead.org>
Date: Fri, 03 Jan 2014 10:26:01 -0800

> as reported for linux-next of Dec.20, 2013
> when CONFIG_NEED_DMA_MAP_STATE is not enabled:
> 
> drivers/net/ethernet/brocade/bna/bnad.c: In function 'bnad_start_xmit':
> drivers/net/ethernet/brocade/bna/bnad.c:3074:26: error: 'struct bnad_tx_vector' has no member named 'dma_len'

Sorry for taking so long, I plan to look into this tonight Randy.

^ permalink raw reply

* [PATCH] bgmac: fix typos
From: Hauke Mehrtens @ 2014-01-06 22:24 UTC (permalink / raw)
  To: davem; +Cc: zajec5, netdev, Hauke Mehrtens

This fixes some typos found by Sergei.

Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 drivers/net/ethernet/broadcom/bgmac.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 5d41f41..7f968a9 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1481,10 +1481,10 @@ static int bgmac_probe(struct bcma_device *core)
 
 		/* Northstar has 4 GMAC cores */
 		for (ns_gmac = 0; ns_gmac < 4; ns_gmac++) {
-			/* As northstar requirement, we have to reset all GAMCs
+			/* As Northstar requirement, we have to reset all GMACs
 			 * before accessing one. bgmac_chip_reset() call
 			 * bcma_core_enable() for this core. Then the other
-			 * three GAMCs didn't reset.  We do it here.
+			 * three GMACs didn't reset.  We do it here.
 			 */
 			ns_core = bcma_find_core_unit(core->bus,
 						      BCMA_CORE_MAC_GBIT,
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH net-next] gre_offload: statically build GRE offloading support
From: Eric Dumazet @ 2014-01-06 22:34 UTC (permalink / raw)
  To: H.K. Jerry Chu; +Cc: David Miller, herbert, ogerlitz, netdev
In-Reply-To: <1389045787.26646.9.camel@edumazet-glaptop2.roam.corp.google.com>

On Mon, 2014-01-06 at 14:03 -0800, Eric Dumazet wrote:

> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: H.K. Jerry Chu <hkchu@google.com>
> ---
> Note : We probably can remove EXPORT_SYMBOL() on inet_add_offload()
> and inet_del_protocol() on a followup patch if there is interest.


There is a typo on this note, of course : inet_del_offload() was
intended, not inet_del_protocol()

^ permalink raw reply

* net has been merged into net-next
From: David Miller @ 2014-01-06 22:39 UTC (permalink / raw)
  To: netdev


Just FYI.

Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: merge net into net-next ?
From: David Miller @ 2014-01-06 22:39 UTC (permalink / raw)
  To: antonio; +Cc: netdev
In-Reply-To: <52C93D6D.7050101@meshcoding.com>

From: Antonio Quartulli <antonio@meshcoding.com>
Date: Sun, 05 Jan 2014 12:09:33 +0100

> Do you have any plan about merging net into net-next?

This is now done.

^ permalink raw reply

* Re: Possible to add netfilter hooks to IFB driver?
From: Andrew Collins @ 2014-01-06 22:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Brad Johnson, netdev@vger.kernel.org
In-Reply-To: <20140106135123.3c7e6645@nehalam.linuxnetplumber.net>

On Mon, Jan 6, 2014 at 2:51 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> The risk is creating the same races that made IMQ unacceptable.
> --

I believe openwrt nowadays uses a TC action which runs the packet
through prerouting then pulls in the mark off the ct entry into the
skb, so ingress+IFB can take action on it.

Perhaps a cleaned up version of this would be suitable for upstream?

^ permalink raw reply

* REPLY
From: Presidential Fund @ 2014-01-07  7:46 UTC (permalink / raw)


Attention:

Get in touch with me as a matter of urgency as your fund have been
approved for release.

Dr. Abraham Nwankwo

^ permalink raw reply

* Re: [PATCHv2 0/5] wl1251 device tree support
From: Sebastian Reichel @ 2014-01-06 22:57 UTC (permalink / raw)
  To: Luciano Coelho, Tony Lindgren, John W. Linville
  Cc: linux-kernel, linux-wireless, linux-omap, netdev
In-Reply-To: <1386289336-26704-1-git-send-email-sre@debian.org>

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Hi John,

> The following patchset adds device tree support to
> the spi variant of the wl1251 driver.
>
> Luciano Coelho (1):
>   wl1251: split wl251 platform data to a separate structure
> 
> Sebastian Reichel (4):
>   wl1251: move power GPIO handling into the driver
>   wl1251: spi: add vio regulator support
>   wl1251: spi: add device tree support
>   Documentation: dt: wireless: Add wl1251

What's the status of this patchset? Tony prepared an immutable
branch for patches 1+2 [0]. I think the other patches are also ok
(at least there were no more complains from the DT binding
maintainers). It would be nice to have wl1251 DT support in 3.14.

[0] http://www.spinics.net/lists/linux-omap/msg101165.html

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* single process receives own frames due to PACKET_MMAP
From: Norbert van Bolhuis @ 2014-01-06 22:58 UTC (permalink / raw)
  To: netdev; +Cc: Daniel Borkmann, David Miller, uaca
In-Reply-To: <52B4465E.2090904@aimvalley.nl>


Our application uses raw AF_PACKET socket to send and receive
on one particular ethernet interface.

Recently we started using PACKET_MMAP (TPACKET_V2). This makes
the Appl use a TX socket and a RX socket.
Both sockets are bound to the same (eth) interface. I noticed
the RX socket receives all frames that are sent via the
TX socket (same process, different thread). This I do not want.

I know it is supposed to happen for different processes
(otherwise wireshark won't work), but I did not expect it to
happen for one single process (with different threads).

I can filter them out in user-space (PACKET_OUTGOING)
or via kernel packet filter (SO_ATTACH_FILTER), but performance is
critical.

I wonder whether this (PACKET_MMAP) behaviour is OK.

It did not happen before (with a non-PACKET_MMAP AF_PACKET socket
which was used by both threads of the same Appl process). So
why is it happening now ?
I'd say it makes no sense to make the same process receive its
own transmitted frames on that same interface (unless its lo).

If I'm not doing something wrong, this means this behaviour
causes my CPU to be loaded much more (since all transmitted frames
have to be filtered out).

Let me know what you think.

thanks,
Norbert van Bolhuis

^ permalink raw reply

* Re: [PATCH net-next v4] IPv6: use anycast addresses as source addresses in echo reply
From: Hannes Frederic Sowa @ 2014-01-06 23:05 UTC (permalink / raw)
  To: François-Xavier Le Bail
  Cc: David Miller, netdev, kuznet, jmorris, yoshfuji, kaber
In-Reply-To: <1389045229.42277.YahooMailBasic@web125505.mail.ne1.yahoo.com>

On Mon, Jan 06, 2014 at 01:53:49PM -0800, François-Xavier Le Bail wrote:
> On Mon, 1/6/14, David Miller <davem@davemloft.net> wrote:
> 
> > From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> > Date: Mon, 6 Jan 2014 00:05:05 +0100
> 
> >> On Fri, Jan 03, 2014 at 05:43:31PM +0100, Francois-Xavier Le Bail wrote:
> >>> diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
> >>> index 5d42009..65c8619 100644
> >>> --- a/net/ipv6/icmp.c
> >>> +++ b/net/ipv6/icmp.c
> >>> @@ -556,7 +556,9 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
> >>>  
> >>>      saddr = &ipv6_hdr(skb)->daddr;
> >>>  
> >>> -    if (!ipv6_unicast_destination(skb))
> >>> +    if (!ipv6_unicast_destination(skb) &&
> >>> +        !(net->ipv6.anycast_src_echo_reply &&
> >>> +          ipv6_chk_acast_addr(net, NULL, saddr)))
> >>>          saddr = NULL;
> >> 
> >> I am not sure why you left out the device at ipv6_chk_acast_addr?
> >> 
> >> IMHO this logic is a bit more complex, we can pass NULL for ipv6 addresses of
> >> scope global but need to check the interface for scope link.
> >> 
> >> It is already possible via setsockopt JOIN_ANYCAST that an ll address is
> >> anycast on another interface which may not be checked here.
> 
> > I think we should pass a valid device in unless it breaks something
> > obvious.
> 
> The problem is that "saddr" is not necessarily an address on "skb->dev"
> in icmpv6_echo_reply(). It may be an address on another interface.

Maybe you're right, but then I don't get it. Could you make an example?

Thanks,

  Hannes

^ permalink raw reply

* [PATCH] net: Do not enable tx-nocache-copy by default
From: Benjamin Poirier @ 2014-01-06 23:20 UTC (permalink / raw)
  To: David S. Miller; +Cc: Eric Dumazet, netdev, linux-kernel, Tom Herbert
In-Reply-To: <1389041855.12212.210.camel@edumazet-glaptop2.roam.corp.google.com>

There are many cases where this feature does not improve performance or even
reduces it. See the following discussion for example perf numbers:
http://thread.gmane.org/gmane.linux.network/298345

CC: Tom Herbert <therbert@google.com>
Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
---
 net/core/dev.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 153ee2f..2e242583 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5783,13 +5783,8 @@ int register_netdevice(struct net_device *dev)
 	dev->features |= NETIF_F_SOFT_FEATURES;
 	dev->wanted_features = dev->features & dev->hw_features;
 
-	/* Turn on no cache copy if HW is doing checksum */
 	if (!(dev->flags & IFF_LOOPBACK)) {
 		dev->hw_features |= NETIF_F_NOCACHE_COPY;
-		if (dev->features & NETIF_F_ALL_CSUM) {
-			dev->wanted_features |= NETIF_F_NOCACHE_COPY;
-			dev->features |= NETIF_F_NOCACHE_COPY;
-		}
 	}
 
 	/* Make NETIF_F_HIGHDMA inheritable to VLAN devices.
-- 
1.8.4

^ permalink raw reply related

* Re: [Patch net] cls_cgroup: fix memory leak in cls_cgroup_change()
From: Cong Wang @ 2014-01-06 23:23 UTC (permalink / raw)
  To: David Miller
  Cc: Linux Kernel Network Developers, Thomas Graf, Jamal Hadi Salim
In-Reply-To: <20140103.210209.901517258686201934.davem@davemloft.net>

On Fri, Jan 3, 2014 at 6:02 PM, David Miller <davem@davemloft.net> wrote:
> From: Cong Wang <xiyou.wangcong@gmail.com>
> Date: Fri,  3 Jan 2014 11:13:19 -0800
>
>> Fix it by moving allocation to ->init().
>>
>> Cc: Thomas Graf <tgraf@suug.ch>
>> Cc: David S. Miller <davem@davemloft.net>
>> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
>> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>
> I don't understand how the memory leak can happen, please explain
> it in your commit message.
>

The leak happens when ->change() fails after the allocation
inside  cls_cgroup_change(), its caller only does cleanup
when itself creates one. So, the callee should do cleanup
on error path by itself. But I may miss something.

Since it is not urgent at all, I will explain this in changelog
and resend it for net-next.

> Also:
>
>>  {
>> +     struct cls_cgroup_head *head;
>> +     head = kzalloc(sizeof(*head), GFP_KERNEL);
>
> Please add an empty line between local variable declarations
> and code.
>

OK.

^ permalink raw reply

* Re: [PATCH net-next v3 1/3] ipv4: introduce ip_dst_mtu_secure and protect forwarding path against pmtu spoofing
From: Hannes Frederic Sowa @ 2014-01-07  0:11 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, eric.dumazet, johnwheffner, steffen.klassert, fweimer
In-Reply-To: <20140106.160846.544525591241855516.davem@davemloft.net>

On Mon, Jan 06, 2014 at 04:08:46PM -0500, David Miller wrote:
> From: Hannes Frederic Sowa <hannes@stressinduktion.org>
> Date: Mon, 6 Jan 2014 09:48:27 +0100
> 
> > I want to put these patches up for discussion again. I did more testing
> > to them (xfrm, tunnel), did some rewording and rewrote the IPv6 patch.
> 
> I'm still thinking about this series.
> 
> I would have been nice if you provided a "0/3" introductory posting
> discussing your point of view, and giving a more detailed analysis of
> your view of the situation so that John and others have something to
> reply to.

I'll do next time, sorry.

I am around for discussion. Have you seen that Steffen did test these
patches with his pmtu testsuite successfully and they showed no obvious
regressions (he posted to the old thread)?

Thanks,

  Hannes

^ permalink raw reply

* [GIT net-next] Open vSwitch
From: Jesse Gross @ 2014-01-07  0:15 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA

Open vSwitch changes for net-next/3.14. Highlights are:
 * Performance improvements in the mechanism to get packets to userspace
   using memory mapped netlink and skb zero copy where appropriate.
 * Per-cpu flow stats in situations where flows are likely to be shared
   across CPUs. Standard flow stats are used in other situations to save
   memory and allocation time.
 * A handful of code cleanups and rationalization.

The following changes since commit 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae:

  Linux 3.13-rc1 (2013-11-22 11:30:55 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git master

for you to fetch changes up to 443cd88c8a31379e95326428bbbd40af25c1d440:

  ovs: make functions local (2014-01-06 15:54:39 -0800)

----------------------------------------------------------------
Andy Zhou (1):
      openvswitch: Change ovs_flow_tbl_lookup_xx() APIs

Ben Pfaff (2):
      openvswitch: Correct comment.
      openvswitch: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).

Daniel Borkmann (1):
      net: ovs: use kfree_rcu instead of rcu_free_{sw_flow_mask_cb,acts_callback}

Jesse Gross (1):
      openvswitch: Silence RCU lockdep checks from flow lookup.

Pravin B Shelar (1):
      openvswitch: Per cpu flow stats.

Stephen Hemminger (1):
      ovs: make functions local

Thomas Graf (9):
      genl: Add genlmsg_new_unicast() for unicast message allocation
      netlink: Avoid netlink mmap alloc if msg size exceeds frame size
      openvswitch: Enable memory mapped Netlink i/o
      net: Export skb_zerocopy() to zerocopy from one skb to another
      openvswitch: Allow user space to announce ability to accept unaligned Netlink messages
      openvswitch: Drop user features if old user space attempted to create datapath
      openvswitch: Pass datapath into userspace queue functions
      openvswitch: Use skb_zerocopy() for upcall
      openvswitch: Compute checksum in skb_gso_segment() if needed

Wei Yongjun (1):
      openvswitch: remove duplicated include from flow_table.c

 include/linux/skbuff.h               |   3 +
 include/net/genetlink.h              |   4 +
 include/uapi/linux/openvswitch.h     |  14 ++-
 net/core/skbuff.c                    |  85 +++++++++++++
 net/netfilter/nfnetlink_queue_core.c |  59 +--------
 net/netlink/af_netlink.c             |   4 +
 net/netlink/genetlink.c              |  21 ++++
 net/openvswitch/datapath.c           | 231 +++++++++++++++++++----------------
 net/openvswitch/datapath.h           |   6 +-
 net/openvswitch/flow.c               |  96 +++++++++++++--
 net/openvswitch/flow.h               |  33 +++--
 net/openvswitch/flow_netlink.c       |  66 ++++++++--
 net/openvswitch/flow_netlink.h       |   1 +
 net/openvswitch/flow_table.c         |  60 ++++++---
 net/openvswitch/flow_table.h         |   6 +-
 net/openvswitch/vport.c              |   6 +-
 net/openvswitch/vport.h              |   1 -
 17 files changed, 483 insertions(+), 213 deletions(-)

^ permalink raw reply

* [PATCH net-next 01/17] openvswitch: Correct comment.
From: Jesse Gross @ 2014-01-07  0:16 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1389053776-62865-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

Signed-off-by: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/flow_table.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index e425427..f96ebd5 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -514,11 +514,7 @@ static struct sw_flow_mask *flow_mask_find(const struct flow_table *tbl,
 	return NULL;
 }
 
-/**
- * add a new mask into the mask list.
- * The caller needs to make sure that 'mask' is not the same
- * as any masks that are already on the list.
- */
+/* Add 'mask' into the mask list, if it is not already there. */
 static int flow_mask_insert(struct flow_table *tbl, struct sw_flow *flow,
 			    struct sw_flow_mask *new)
 {
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH net-next 02/17] openvswitch: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit).
From: Jesse Gross @ 2014-01-07  0:16 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1389053776-62865-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

We won't normally have a ton of flow masks but using a size_t to store
values no bigger than sizeof(struct sw_flow_key) seems excessive.

This reduces sw_flow_key_range and sw_flow_mask by 4 bytes on 32-bit
systems.  On 64-bit systems it shrinks sw_flow_key_range by 12 bytes but
sw_flow_mask only by 8 bytes due to padding.

Compile tested only.

Signed-off-by: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Acked-by: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/flow.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index 1510f51..176406d 100644
--- a/net/openvswitch/flow.h
+++ b/net/openvswitch/flow.h
@@ -122,8 +122,8 @@ struct sw_flow_key {
 } __aligned(BITS_PER_LONG/8); /* Ensure that we can do comparisons as longs. */
 
 struct sw_flow_key_range {
-	size_t start;
-	size_t end;
+	unsigned short int start;
+	unsigned short int end;
 };
 
 struct sw_flow_mask {
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH net-next 03/17] openvswitch: Change ovs_flow_tbl_lookup_xx() APIs
From: Jesse Gross @ 2014-01-07  0:16 UTC (permalink / raw)
  To: David Miller; +Cc: dev-yBygre7rU0TnMu66kgdUjQ, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1389053776-62865-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

From: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>

API changes only for code readability. No functional chnages.

This patch removes the underscored version. Added a new API
ovs_flow_tbl_lookup_stats() that returns the n_mask_hits.

Reported by: Ben Pfaff <blp-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Thomas Graf <tgraf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Andy Zhou <azhou-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
 net/openvswitch/datapath.c   | 16 ++++------------
 net/openvswitch/flow_table.c | 10 +++++++++-
 net/openvswitch/flow_table.h |  4 +++-
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 6f5e1dd..fcaed98 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -234,7 +234,7 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
 	}
 
 	/* Look up flow. */
-	flow = ovs_flow_tbl_lookup(&dp->table, &key, &n_mask_hit);
+	flow = ovs_flow_tbl_lookup_stats(&dp->table, &key, &n_mask_hit);
 	if (unlikely(!flow)) {
 		struct dp_upcall_info upcall;
 
@@ -751,14 +751,6 @@ static struct sk_buff *ovs_flow_cmd_build_info(struct sw_flow *flow,
 	return skb;
 }
 
-static struct sw_flow *__ovs_flow_tbl_lookup(struct flow_table *tbl,
-					      const struct sw_flow_key *key)
-{
-	u32 __always_unused n_mask_hit;
-
-	return ovs_flow_tbl_lookup(tbl, key, &n_mask_hit);
-}
-
 static int ovs_flow_cmd_new_or_set(struct sk_buff *skb, struct genl_info *info)
 {
 	struct nlattr **a = info->attrs;
@@ -809,7 +801,7 @@ static int ovs_flow_cmd_new_or_set(struct sk_buff *skb, struct genl_info *info)
 		goto err_unlock_ovs;
 
 	/* Check if this is a duplicate flow */
-	flow = __ovs_flow_tbl_lookup(&dp->table, &key);
+	flow = ovs_flow_tbl_lookup(&dp->table, &key);
 	if (!flow) {
 		/* Bail out if we're not allowed to create a new flow. */
 		error = -ENOENT;
@@ -921,7 +913,7 @@ static int ovs_flow_cmd_get(struct sk_buff *skb, struct genl_info *info)
 		goto unlock;
 	}
 
-	flow = __ovs_flow_tbl_lookup(&dp->table, &key);
+	flow = ovs_flow_tbl_lookup(&dp->table, &key);
 	if (!flow || !ovs_flow_cmp_unmasked_key(flow, &match)) {
 		err = -ENOENT;
 		goto unlock;
@@ -969,7 +961,7 @@ static int ovs_flow_cmd_del(struct sk_buff *skb, struct genl_info *info)
 	if (err)
 		goto unlock;
 
-	flow = __ovs_flow_tbl_lookup(&dp->table, &key);
+	flow = ovs_flow_tbl_lookup(&dp->table, &key);
 	if (!flow || !ovs_flow_cmp_unmasked_key(flow, &match)) {
 		err = -ENOENT;
 		goto unlock;
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index f96ebd5..261a54e 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -429,7 +429,7 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
 	return NULL;
 }
 
-struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl,
+struct sw_flow *ovs_flow_tbl_lookup_stats(struct flow_table *tbl,
 				    const struct sw_flow_key *key,
 				    u32 *n_mask_hit)
 {
@@ -447,6 +447,14 @@ struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl,
 	return NULL;
 }
 
+struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl,
+				    const struct sw_flow_key *key)
+{
+	u32 __always_unused n_mask_hit;
+
+	return ovs_flow_tbl_lookup_stats(tbl, key, &n_mask_hit);
+}
+
 int ovs_flow_tbl_num_masks(const struct flow_table *table)
 {
 	struct sw_flow_mask *mask;
diff --git a/net/openvswitch/flow_table.h b/net/openvswitch/flow_table.h
index fbe45d5..f54aa82 100644
--- a/net/openvswitch/flow_table.h
+++ b/net/openvswitch/flow_table.h
@@ -69,9 +69,11 @@ void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow);
 int  ovs_flow_tbl_num_masks(const struct flow_table *table);
 struct sw_flow *ovs_flow_tbl_dump_next(struct table_instance *table,
 				       u32 *bucket, u32 *idx);
-struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *,
+struct sw_flow *ovs_flow_tbl_lookup_stats(struct flow_table *,
 				    const struct sw_flow_key *,
 				    u32 *n_mask_hit);
+struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *,
+				    const struct sw_flow_key *);
 
 bool ovs_flow_cmp_unmasked_key(const struct sw_flow *flow,
 			       struct sw_flow_match *match);
-- 
1.8.3.2

^ permalink raw reply related


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