1. 02 4月, 2014 8 次提交
    • D
      net: ptp: move PTP classifier in its own file · 408eccce
      Daniel Borkmann 提交于
      This commit fixes a build error reported by Fengguang, that is
      triggered when CONFIG_NETWORK_PHY_TIMESTAMPING is not set:
      
        ERROR: "ptp_classify_raw" [drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.ko] undefined!
      
      The fix is to introduce its own file for the PTP BPF classifier,
      so that PTP_1588_CLOCK and/or NETWORK_PHY_TIMESTAMPING can select
      it independently from each other. IXP4xx driver on ARM needs to
      select it as well since it does not seem to select PTP_1588_CLOCK
      or similar that would pull it in automatically.
      
      This also allows for hiding all of the internals of the BPF PTP
      program inside that file, and only exporting relevant API bits
      to drivers.
      
      This patch also adds a kdoc documentation of ptp_classify_raw()
      API to make it clear that it can return PTP_CLASS_* defines. Also,
      the BPF program has been translated into bpf_asm code, so that it
      can be more easily read and altered (extensively documented in [1]).
      
      In the kernel tree under tools/net/ we have bpf_asm and bpf_dbg
      tools, so the commented program can simply be translated via
      `./bpf_asm -c prog` where prog is a file that contains the
      commented code. This makes it easily readable/verifiable and when
      there's a need to change something, jump offsets etc do not need
      to be replaced manually which can be very error prone. Instead,
      a newly translated version via bpf_asm can simply replace the old
      code. I have checked opcode diffs before/after and it's the very
      same filter.
      
        [1] Documentation/networking/filter.txt
      
      Fixes: 164d8c66 ("net: ptp: do not reimplement PTP/BPF classifier")
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@plumgrid.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Jiri Benc <jbenc@redhat.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      408eccce
    • D
      net: sxgbe: make "core_ops" static · 7baea6ef
      Dan Carpenter 提交于
      The "core_ops" variable isn't referenced outside this file and Sparse
      complains about it:
      
      	drivers/net/ethernet/samsung/sxgbe/sxgbe_core.c:239:29: warning:
      	symbol 'core_ops' was not declared. Should it be static?
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7baea6ef
    • D
      net: sxgbe: fix logical vs bitwise operation · 4f6ed914
      Dan Carpenter 提交于
      Bitwise '|' was intended here instead of logical '||'.
      
      Fixes: 1edb9ca6 ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f6ed914
    • D
      net: sxgbe: sxgbe_mdio_register() frees the bus · ca231f83
      Dan Carpenter 提交于
      "err" is always zero at this point so we always unregister and free the
      mdio_bus before returning success.  This seems like left over code and
      I have deleted it.
      
      Fixes: 1edb9ca6 ('net: sxgbe: add basic framework for Samsung 10Gb ethernet driver')
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca231f83
    • D
      Call efx_set_channels() before efx->type->dimension_resources() · 52ad762b
      Daniel Pieczko 提交于
      When using the "separate_tx_channels=1" module parameter, the TX queues are
      initially numbered starting from the first TX-only channel number (after all the
      RX-only channels).  efx_set_channels() renumbers the queues so that they are
      indexed from zero.
      
      On EF10, the TX queues need to be relabelled in this way before calling the
      dimension_resources NIC type operation, otherwise the TX queue PIO buffers can be
      linked to the wrong VIs when using "separate_tx_channels=1".
      
      Added comments to explain UC/WC mappings for PIO buffers
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52ad762b
    • W
      xen-netback: disable rogue vif in kthread context · e9d8b2c2
      Wei Liu 提交于
      When netback discovers frontend is sending malformed packet it will
      disables the interface which serves that frontend.
      
      However disabling a network interface involving taking a mutex which
      cannot be done in softirq context, so we need to defer this process to
      kthread context.
      
      This patch does the following:
      1. introduce a flag to indicate the interface is disabled.
      2. check that flag in TX path, don't do any work if it's true.
      3. check that flag in RX path, turn off that interface if it's true.
      
      The reason to disable it in RX path is because RX uses kthread. After
      this change the behavior of netback is still consistent -- it won't do
      any TX work for a rogue frontend, and the interface will be eventually
      turned off.
      
      Also change a "continue" to "break" after xenvif_fatal_tx_err, as it
      doesn't make sense to continue processing packets if frontend is rogue.
      
      This is a fix for XSA-90.
      Reported-by: NTörök Edwin <edwin@etorok.net>
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Reviewed-by: NDavid Vrabel <david.vrabel@citrix.com>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9d8b2c2
    • O
      net/mlx4: Set proper build dependancy with vxlan · a66132f3
      Or Gerlitz 提交于
      Make sure that vxlan_get_rx_port() is present in the kernel build in a manner
      consistent with mlx4, else mlx4 can be made built-in where vxlan a module and
      the phase of the build linking fails. Add CONFIG_MLX4_EN_VXLAN for that.
      
      Also, #ifdef the advertizement and implementation of the mlx4 vxlan ndo
      calls and related code under this config directive.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a66132f3
    • S
      be2net: fix build dependency on VxLAN · c5abe7c0
      Sathya Perla 提交于
      Introduce a CONFIG_BE2NET_VXLAN define to control be2net's build
      dependency on the VXLAN driver.
      
      Without this fix, the kernel build fails when VxLAN driver is
      selected to be built as a module while be2net is built-in.
      
      fixes: c9c47142 ("be2net: csum, tso and rss steering offload support for VxLAN")
      Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5abe7c0
  2. 01 4月, 2014 26 次提交
  3. 31 3月, 2014 3 次提交
  4. 30 3月, 2014 3 次提交